-
Notifications
You must be signed in to change notification settings - Fork 15
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: only allow one filter open at a time, easy closing #3084
Merged
Merged
Changes from 46 commits
Commits
Show all changes
50 commits
Select commit
Hold shift + click to select a range
5789498
first pass, back-end
angelathe f6db9d7
first pass, front-end
angelathe 502ec96
simplify date range query, dont need subquery
angelathe f56eabc
update and add tests
angelathe 23d6171
Merge branch 'main' into angela/2752-filter-by-date-p1
angelathe aa66bf0
make filtersService file, abstract components
angelathe 7fdac87
add test for convertDateOptionToDateRange
angelathe 3a72349
update date helpers, modify tests
angelathe 8110125
wip, Filters
angelathe c5b617e
update local dev default to last year
angelathe 1481bbe
Merge branch 'main' into angela/2752-filter-by-date-p1
angelathe f443b01
udpate tests to reflect local dev default
angelathe d81ba81
else if nit
angelathe bfd8fbf
refactor: moar abstraction (#3078)
mcmcgrath13 bbe6233
refactor Filters file to add BaseFilter file
angelathe 235bf63
add BaseFilter
angelathe 2d495cf
fix todays date for test
angelathe 1f09869
move FiltersService to utils as date-utils
angelathe 3c82083
add test to check reading query will result in correct date range
angelathe 50bdae1
Update dateRangelabels
angelathe b12546b
[pre-commit.ci] auto fixes from pre-commit hooks
pre-commit-ci[bot] 11bcceb
reverting change temporarily, causing test failures
angelathe d60ef8f
update default nits
angelathe 59168ec
update default nits
angelathe 3e6d179
hardcode expected start dates in tests
angelathe 5fee934
Flexible widths
angelathe 6ea3832
fix small nit, tag disappeared when no conditions were selected
angelathe ec50452
update snapshot test for tag, turn btnClass to functional prop isActive
angelathe 068a36d
refactor dateRangeLabels
angelathe 0c2c781
move default date range const to date-utils because forgot to import …
angelathe 72cfbc8
update docstrings
angelathe 1764ca5
refactor updateQueryParam
angelathe bf3631f
update today test fixture to add time
angelathe 5fa2a05
Merge branch 'main' into angela/2752-filter-by-date-p1
angelathe fcd642f
feat: only allow one filter open at a time, easy closing
mcmcgrath13 032fe1d
fix: merge in upstream
mcmcgrath13 eec5273
Update containers/ecr-viewer/src/app/components/BaseFilter.tsx
mcmcgrath13 0a39c61
fix: reset trigger
mcmcgrath13 339bc4b
fix: cleanup
mcmcgrath13 3a097b5
fix: only listen when a filter is open
mcmcgrath13 4665c0e
fix: consolidate trigger logic, add tests
mcmcgrath13 501f42d
docs: comment
mcmcgrath13 a48d94b
fix: comments, cleanup
mcmcgrath13 897c03d
fix: moar =
mcmcgrath13 227891b
fix: merge in main
mcmcgrath13 f535b28
test: focus handling
mcmcgrath13 57ccfe7
refactor: use imports
mcmcgrath13 af731d1
refactor: maybe better readability
mcmcgrath13 49f75ad
fix: appease typescript
mcmcgrath13 620937e
fix: tie up loose ends
mcmcgrath13 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Why do we want it to set filterBoxOpen to
"__submitted__"
? It's slightly unclear how filterBoxOpen gets used when it can equal either filter type or"__submitted__"
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.
There's a tricky race condition this helps us avoid. There's a comment on line 121 about it. But the problem boils down to the resetting relying on the params being correct and on submit the params don't update until the next tic, so if we go the
null
state and reset, then we reset to the old state and not the new. It feels hacky, but I haven't thought of a better way yet 🤔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.
I refactored a little to hopefully maybe improve the readability a bit, but it's still fundamentally the same approach 😞