Skip to content
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

Excel like behavior for grid column filtering #3894

Open
wants to merge 9 commits into
base: develop
Choose a base branch
from

Conversation

oodarluz
Copy link
Contributor

@oodarluz oodarluz commented Jan 9, 2025

Hoist P/R Checklist

Pull request authors: Review and check off the below. Items that do not apply can also be
checked off to indicate they have been considered. If unclear if a step is relevant, please leave
unchecked and note in comments.

  • Caught up with develop branch as of last change.
  • Added CHANGELOG entry, or determined not required.
  • Reviewed for breaking changes, added breaking-change label + CHANGELOG if so.
  • Updated doc comments / prop-types, or determined not required.
  • Reviewed and tested on Mobile, or determined not required.
  • Created Toolbox branch / PR, or determined not required.

If your change is still a WIP, please use the "Create draft pull request" option in the split
button below to indicate it is not ready yet for a final review.

Pull request reviewers: when merging this P/R, please consider using a squash commit to
collapse multiple intermediate commits into a single commit representing the overall feature
change. This helps keep the commit log clean and easy to scan across releases. PRs containing a
single commit should be rebased when possible.

@oodarluz oodarluz linked an issue Jan 9, 2025 that may be closed by this pull request
@oodarluz oodarluz requested a review from cnrudd January 9, 2025 21:55
@oodarluz oodarluz marked this pull request as ready for review January 9, 2025 21:55
@oodarluz oodarluz requested a review from amcclain January 9, 2025 21:57
Copy link
Member

@cnrudd cnrudd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otito and I went over this several times and ironed out the kinks. My current comments are just minor linting nits.

We confirmed that the new implementation works like Excel.
We tested the following flows/cases:

  1. commitOnChange: true|false
  2. regular grid & tree grid
  3. statefulness when switching from value to custom tab
  4. hide/show "add to existing filter"
  5. grid font size tiny, standard, large, etc.

There is a lot to test, I don't think we missed anything, but anyone reviewing should really try to break it.

@oodarluz oodarluz requested a review from cnrudd January 10, 2025 14:23
@amcclain
Copy link
Member

Great thanks guys - I would like to have a look at this. Will do so today and reach out with any questions.

@amcclain
Copy link
Member

Have only had a quick chance to try this out - will look more closely, and compare with Excel - but I ran into a usability issue pretty quick where I wanted to search for and select multiple values that required different searches to find.

E.g. using Toolbox's primary grid filtering example, let's say:

  • I want to filter on two companies - Anderson LLC and Batz Group
  • Open Company col filter
  • Type "anderson" - list and grid filters down to a collection of matches
  • Click header to uncheck all, then check only Anderson LLC - first company now showing as desired - leave col filter open
  • Clear search within filter dialog, then type "batz" to find and select my second company
  • All "batz" results are now selected, and I've lost my Anderson filter.

Seems problematic, no? Will be interested to see how the Excel model we are looking to track handles this same "search for and filter this then that" use case.

@amcclain
Copy link
Member

Well, I see Excel (on my Mac) doing something very similar - to be honest, it feels just as confusing if not more in Excel, not sure how to feel about it but a good thing in terms of our goal of replicating Excel.

It's surprising how difficult I find it to intuit how this control works (or how I want it to work, speaking about the Excel version just as much as ours). But wanted to chat back here quick to confirm what you say above re. this working much like Excel

@amcclain
Copy link
Member

One thing to note - on Excel for Mac there is a user-driven "auto-apply" toggle in the control itself. I wonder if we need this, given how differently the filtering works between commitOnChange true/false.

Previously we've thought about that as something a developer sets based on (I think) the volume of expected data, thinking about how fast or slow or disruptive "eager" filtering might be.

Now I wonder if it should be something the user can control right here, while filtering. Specifically so they could untick it if they wanted to build up the multi-step filter described above - seeing that if commitOnChange:false we get the "add selection to current filter" option.

Screenshot 2025-01-10 at 10 08 22 AM

Note Excel here choosing to simply disable "Apply" button when checked:
Screenshot 2025-01-10 at 10 08 46 AM

I'm going to switch now to looking at Excel on Windows - they are different, and admittedly the Windows version always more important to us.

@amcclain
Copy link
Member

OK - last comment for now - very helpful to try on Windows, as that's clearly (and correctly!) the version that matches the behavior we're implementing with this change.

Note that Excel for Windows does not show the "auto apply" checkbox we see on Mac above. I was wondering what the default commitOnChange value was for our control - the docs say true but it didn't look like that to me scanning the code, could you please confirm?

/** True (default) to update filters immediately after each change made in the column-based filter UI.*/

I am thinking it should be false

@oodarluz
Copy link
Contributor Author

The default commit on change is True, should I make the change to have it false and update the documentation?

{bind, commitOnChange = true, fieldSpecs, fieldSpecDefaults}: GridFilterModelConfig,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Grid Column Filter Value Tab UX improvements
3 participants