-
Notifications
You must be signed in to change notification settings - Fork 71
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(datagrid): add built-in date filter #250
base: main
Are you sure you want to change the base?
Conversation
👋 @derkoe,
Thank you, 🤖 Clarity Release Bot |
The PR is not the right time for design to first see this. This may be delayed until we have the bandwidth to assess - there are some changes to the date picker component itself currently in flight. |
Hi, this is Patrick : designer on Clarity. I'd like to see functioning demo of the functionality and be able to test with voiceover for accessibility. Until I can see it working I can't approve the design. |
This should be added to demo (or storybook, but we don't have datagrid filters in the storybook yet) so that @Partick can see a working demo via the preview link. |
@derkoe: Sorry about that. I should have checked. I must have forgotten since the last time I looked at this. @Partick: You can see this filter at https://250--storybook-clarity-design.netlify.app/demo/datagrid/string-filtering. |
@Partick any updates on this? |
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.
The tests are not imported and executed in the datagrid all.spec.ts
. This means the tests are not actually executed. Also, changes need to be made after #279. (I can do these changes, but I want to make sure we don't forget.)
78a20bb
to
a44f016
Compare
I went ahead and 1) rebased onto The tests do not pass. I will leave that to @derkoe to fix since this is his code. |
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.
Test are also needed for datagrid-property-date-filter.ts
.
a44f016
to
4a9cd64
Compare
@kevinbuhmann I've fixed the tests I also realized that the the spec for |
Thanks! And yeah, a PR for the other tests would be greatly appreciated! |
Fix for the |
Please rebase instead of merging. If you don't know how, I can do it for you. |
cb790f9
to
15c38a1
Compare
Done |
Heads up on this - there has been a lot of PTO with summer vacations the last month or so. Design is currently looking at this, there's some concerns about the popup in a popup behavior |
15c38a1
to
fcd272c
Compare
Embedding the date picker into the filter popup is likely to be a difficult undertaking. The future of datagrid filters is in question due to various outstanding accessibility concerns, so I don't think we should implement a date filter in Clarity until the existing datagrid filter issues are resolved. |
Yes, there are different issues but I think they could be fixed. Current issues are:
We implemented the filter now in clarity-addons: porscheinformatik/clarity-addons#1760. But this is not as nice as having a built-in filter. Built-in filters cannot be added in a third-party library because the API for that is private. Maybe we can change that? |
Our accessibility experts consistently tell us that filters should not be in the column headers, so I think there is a real possibility of the built-in datagrid filters being completely changed or even removed. So I don't think we'll consider opening up the built-in filter API at this time. Sorry! |
Hi guys, this issue should come to a decision! So this is a hop or drop decision I guess
The current state leaves everybody unclear whether to use the filter or not, plus what to use instead. @pdaigle, @kevinbuhmann, @Partick can u make or drive that decision so we at least avoid this state of confusion? |
First off, I agree generally with the concerns concerns raised by @d-m-s and @derkoe , though I think it would be helpful to maybe qualify two of the points here, just so we have a better handle on what exactly you're trying to solve for:
I think getting more detail here will help us better understand what you're trying to solve, which should help get us closer to a solution that can be applied consistently, and effectively for all of our users. -- As @colinreedmiller mentioned earlier, when a PR impacting design comes in without the design team's prior knowledge, it does require us to take a couple of steps back to ensure that what's being requested is inline with the overall design system rational, and some of our planning around future work. This isn't foot planting as much as its normal due diligence that would have ideally happened a bit earlier. We'd like to make this work for you, but we'll need you to pardon our mess a bit as we work things through. Just for context, an exacerbating factor right now is the number of things we're currently looking into around this particular topic that would need to adjust, and be adjusted by what's already submitted. You're probably not aware, but we've got a bunch of needs here we're currently looking into:
So I think the trick here is to work through a solution to the needs you're trying to resolve, while also lining that solution up against some of the other needs in 1-6 so we don't run into change management issues as we enhance further. Right now 2 & 4 seem to me like the areas most impacted by this request and vice versa. As for next steps, we can look into what would be needed to reconcile other component needs with what @Partick already shared. In the meantime, any specifics you can provide @d-m-s and @derkoe would be very helpful. |
There are many issues with this component:
|
@derkoe Thanks for getting back.
Appreciate the feedback. Are any of these three creating specific issues with your users? |
'users get frustrated when they have to perform at least 4 actions (clicks, keystrokes) to clear a number filter' @derkoe Is this your own observation, or something from prior research? Thanks for the feedback. |
Hi guys,
@lerch015 I guess it's pretty obvious - but yes we do have multiple user observations and user feedback that the current behaviour is cumbersome.
The issue was raised in the Discussions > Ideas more than 6 months ago. (see #227) How to go on?For my part, I think three major parts should be solved ... 1.) Avoiding filter-popups to close itself, when the user is acting inside the filter-popup 2.) Provide an easy way to clear the whole column-filter. 3.) Built-in Filters for default-types (like Date, DateRange, ... ) Some usecases to be considered:
For the beginning I'm sure Date would be sufficient, just to get some consistency throughout large applications - with custom filters, theses "standard-usecases" are implemented always differently and hence harm the usability as well as the efficiency of Clarity for users as well as for developers. |
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: #227
What is the new behavior?
This adds a new built-in Datagrid filter for date fields.
Does this PR introduce a breaking change?
This adds a new built-in filter for dates. The Clarity API changes with that - I am not sure if this is breaking change.
Other information
Here is a screenshot of how this looks like: