-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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(native-filters): add optional time col to time range #15117
Conversation
granularity_sqla: 'ds', | ||
granularity_sqla, |
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 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.
LGTM
Codecov Report
@@ Coverage Diff @@
## master #15117 +/- ##
==========================================
- Coverage 77.54% 77.52% -0.02%
==========================================
Files 967 967
Lines 49759 49798 +39
Branches 6352 6364 +12
==========================================
+ Hits 38585 38607 +22
- Misses 10972 10989 +17
Partials 202 202
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
I initially had it like that, but it seemed to look better when moved to the next row (this is a similar solution as that which we've opted for in Explore). But I don't mind having it on the same line if it causes less confusion.
That's not a bad idea. I left the option to clear so that it would be possible to fall back to the default dttm column in the dataset. But I agree that it would be more explicit to always specify the time column, especially as Filter Box does it like this. @junlincc thoughts? |
change request: select show only when there are more than 1 time columns |
Great idea! Thanks all for the feedback, I'll implement all changes proposed here and request a new round of reviews once done. |
const props = createProps(); | ||
const { container } = render(<ColumnSelect {...(props as any)} />, { | ||
useRedux: true, | ||
}); | ||
expect(container.children).toHaveLength(1); | ||
userEvent.type(screen.getByRole('combobox'), 'column_name'); | ||
await waitFor(() => { |
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.
You can join them all in one waitFor
}); | ||
expect(container.children).toHaveLength(1); | ||
userEvent.type(screen.getByRole('combobox'), 'column_name'); | ||
await waitFor(() => { |
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.
Same as previous comment
One nit: the sort type and sort metric have different widths. |
Merging to unblock work on a related issue (will address the test comment in a separate PR) |
SUMMARY
Adds an optional time column option to the filter config modal to achieve full feature parity with Filter Box.
BEFORE
Currently time ranges can only be applied to the default time column:
![image](https://user-images.githubusercontent.com/33317356/121689603-75e54c00-cacd-11eb-802f-d60ffba41bb5.png)
AFTER
When no time range is specified, the time column control is hidden:
![image](https://user-images.githubusercontent.com/33317356/121689193-ffe0e500-cacc-11eb-929c-23394ca61b79.png)
When a time range is specified, the optional time column control is exposed (when left unpopulated, the default time column is used):
![image](https://user-images.githubusercontent.com/33317356/121689379-3585ce00-cacd-11eb-97e9-880474f3d590.png)
In addition, the sort metric is moved to a row of it's own, and a tooltip is added to the control:
![image](https://user-images.githubusercontent.com/33317356/121689459-4b938e80-cacd-11eb-9e90-01195e2fa917.png)
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION