-
Notifications
You must be signed in to change notification settings - Fork 44
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
✨ Add DateRangeFilter #1913
Merged
Merged
✨ Add DateRangeFilter #1913
Conversation
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
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1913 +/- ##
==========================================
+ Coverage 39.20% 42.17% +2.97%
==========================================
Files 146 166 +20
Lines 4857 5318 +461
Branches 1164 1293 +129
==========================================
+ Hits 1904 2243 +339
- Misses 2939 3059 +120
- Partials 14 16 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
rszwajko
added a commit
that referenced
this pull request
May 29, 2024
Before this PR, all values were matched in the same way: 1. value needs to be string or have string representation via getItemValue 2. positive match is returned if (lowercased) value contains (lowercased) filter value. After this PR, a custom algorithm can be provided using "matcher" property. Direct motivation is DateRange filter which stores filter values as ISO 8601 time intervals i.e. "2024-04-01/2024-05-01". Positive match (value is in the range) requires parsing to date objects. Reference-Url: https://en.wikipedia.org/wiki/ISO_8601#Time_intervals Reference-Url: #1913 Signed-off-by: Radoslaw Szwajkowski <rszwajko@redhat.com>
Create a filter widget based on DateRangeFilter developed for Forklift plugin. Use the new widget to filter migration waves on both start and end date. Key points: 1. filter values are stored as strings in ISO 8601 time interval format (date part only) i.e. "2024-04-01/2024-05-01". 2. date range is a closed range (both ends are included) 3. browser local time zone is used 4. date format is hard-coded to "MM/DD/YYYY" to match the format used in the UI Additional changes: 1. force TZ=UTC for jest unit tests to ensure the same test results 2. initialize dayjs plugins for tests Reference-Url: kubev2v/forklift-console-plugin#754 Reference-Url: https://en.wikipedia.org/wiki/ISO_8601#Time_intervals Signed-off-by: Radoslaw Szwajkowski <rszwajko@redhat.com>
ibolton336
approved these changes
Jun 7, 2024
sjd78
approved these changes
Jun 9, 2024
This was referenced Jun 22, 2024
This was referenced Jul 30, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Create a filter widget based on DateRangeFilter developed
for Forklift plugin.
Use the new widget to filter migration waves on both start and end date.
Key points:
format (date part only) i.e. "2024-04-01/2024-05-01".
used in the UI
Additional changes:
Reference-Url: kubev2v/forklift-console-plugin#754
Reference-Url: https://en.wikipedia.org/wiki/ISO_8601#Time_intervals