-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
(Feat) : Added "Clear All" filter to Invoices #6776
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(Feat) : Added "Clear All" filter to Invoices #6776
Conversation
Signed-off-by: Abhijay jain <Abhijay007j@gmail.com>
WalkthroughThe invoice list view is updated to enhance the search input styling with flex-shrink and width constraints. A "Clear All" button is conditionally added next to existing filter dropdowns, displayed only when any status, app, date filters, or search text are active. This button uses Bootstrap secondary styling, has a minimum width of 7rem, and includes a localized tooltip. A client-side script listens for clicks on this button; when triggered, it clears the hidden "SearchText" and "SearchTerm" input values in the filter form and submits the form to reset all filters. Minor whitespace and formatting adjustments are also made. No changes were made to exported or public entity declarations. 📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
@rockstardev review required |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
BTCPayServer/Views/UIInvoice/ListInvoices.cshtml
(2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: build_and_test
🔇 Additional comments (2)
BTCPayServer/Views/UIInvoice/ListInvoices.cshtml (2)
291-296
: Well-implemented conditional rendering.The conditional logic correctly shows the Clear All button when any filters are active (status, app, date, or search text). The button structure includes proper accessibility attributes and ID for JavaScript targeting.
298-317
: Solid JavaScript implementation with proper error handling.The script correctly handles the clear button functionality with:
- Proper event initialization using DOMContentLoaded
- Defensive null checks for DOM elements
- Appropriate clearing of SearchText and SearchTerm fields
- Form submission to apply the filter reset
The implementation follows good practices and should work reliably.
Nice! Thanks for picking this up - will get a review in today or tomorrow! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Immediate nit:
- The search bar shrinks with the addition of the
Clear All
button, but we should bump the column size up one tocol-xxl-9
or append theClear All
button and not shrink the search. Defer to you on implementation.
The addition of the Clear button should wrap well onto the next line for mobile, but I need to test this explicitly along with functional tests.
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
…cpayserver into InvoiceClearFilter
…into InvoiceClearFilter
Signed-off-by: Abhijay jain <Abhijay007j@gmail.com>
Signed-off-by: Abhijay jain <Abhijay007j@gmail.com>
Signed-off-by: Abhijay jain <Abhijay007j@gmail.com>
Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>
Related to: #5156
invoice.mp4