Repository navigation
feat: add history filter - #610
ECWireless wants to merge 9 commits into
Conversation
* feat: add history filter to user account * fix: apply linter and prettier * fix: add margin on popover from window * fix: add UI changes to filter * fix: remove auto scroll * fix: remove lint error --------- Co-authored-by: ECWireless <40322776+ECWireless@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
Adds an event-type filter UI to the Account History view so users can narrow the displayed history entries by transaction/event type.
Changes:
- Introduces a
useHistoryFilterhook to manage selected event types, filtered results, and popover open/close behavior. - Adds a
HistoryFilterpopover component (with a new filter icon) and wires it intocomponents/HistoryView. - Updates history rendering to use the filtered event list and show an empty-state message when no events match.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| hooks/index.tsx | Re-exports the new history filter hook from the hooks barrel. |
| hooks/filter/useHistoryFilter.ts | Implements filter state + memoized filtering + auto-close behavior on outside scroll. |
| components/Icons/FilterIcon.tsx | Adds a small SVG filter icon used by the filter button. |
| components/HistoryView/index.tsx | Integrates the filter hook/component and switches rendering from mergedEvents to filteredEvents. |
| components/HistoryView/HistoryFilter.tsx | Implements the filter popover UI (trigger, header actions, event-type list). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
rickstaa
left a comment
There was a problem hiding this comment.
@ECWireless looks clean to me. I only have two comments:
- Please also add the author of #720 as a co-author. Due to some unclear communication, we accidentally had two people working on this in parallel.
- Could you add support for selecting the filters via query parameters? This would make it easier to link directly to specific votes from places in the Explorer that reference the vote history. If you can link these places to the right url that would also be great.
Once those are addressed, we can merge.
Restore event filters from query parameters and update the URL with shallow navigation when filters change. Link governance participation and voting modals to the matching account history filters, and select account tabs from the pathname so query strings do not hide the History view. Co-authored-by: Moudi Network <lpt@moudi.network>
Apply selections optimistically so rapid toggles and Clear use the latest selection before a shallow route change finishes. Only the latest navigation can release that selection back to the URL, preserving browser navigation and restoring the URL state after a failed or cancelled push. Add delayed-navigation regression tests and await navigation in the HistoryView integration tests.
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The filtering behavior, URL synchronization, loading states, and edge cases are implemented consistently and covered by focused tests.
Review effort: Balanced
Findings: None
Resolved since last review (1)
rickstaa
left a comment
There was a problem hiding this comment.
Thanks, for applying my suggestions.

See #513 for all details. Original PR created by @Roaring30s .