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

feat(filters): adding filter type icons in filter config modal. #31330

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

rusackas
Copy link
Member

@rusackas rusackas commented Dec 6, 2024

SUMMARY

Adds filter/divider icons in the Filter config modal, so that you can finally tell what these darn things are.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Pasted_Image_12_6_24__2_39 PM

TESTING INSTRUCTIONS

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@dosubot dosubot bot added the dashboard:native-filters Related to the native filters of the Dashboard label Dec 6, 2024
@michael-s-molina
Copy link
Member

@rusackas It looks like the icons are vertically misaligned in the screenshot.

@rusackas rusackas requested a review from mistercrunch December 9, 2024 20:23
@justinpark
Copy link
Member

I think having the divider designed similarly to the filter can cause confusion.
How about changing it to make the divider block easily recognizable, rather than using an icon like this?

USA_Births_Names

@michael-s-molina
Copy link
Member

@justinpark Are you suggesting a horizontal line? If yes, I don't think it would work given the different title lengths.

@rusackas rusackas requested review from kgabryje and geido December 10, 2024 15:26
Copy link
Member

@mistercrunch mistercrunch left a comment

Choose a reason for hiding this comment

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

Approving as net positive as it addresses the main issue. Can follow up with another PR if/when we get a design improvement

Copy link
Member

@michael-s-molina michael-s-molina left a comment

Choose a reason for hiding this comment

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

@rusackas Can you check this comment?

@rusackas
Copy link
Member Author

@rusackas Can you check this comment?

This is because the (custom) icons themselves are goofy, with different SVG bounding boxes. I can add custom CSS overrides to bump things up or down a pixel, but that seems like the wrong fix. I'd rather go fiddle with the sizing/alignment of the icons themselves in a subsequent PR.

@michael-s-molina
Copy link
Member

I'd rather go fiddle with the sizing/alignment of the icons themselves in a subsequent PR.

I would argue that the whole point of this PR is to add icons and that their alignment seems to be essential for what you're doing. In other words, it looks weird that in one PR you add misaligned icons and in another PR you fix the alignment.

@rusackas
Copy link
Member Author

rusackas commented Dec 11, 2024

The fix for misaligned icons is exponentially more complex, with cleanup of overrides throughout the product and arguably contingent upon completing the migration to AntD 5. I suppose the options are:

  1. Add some ugly CSS overrides to shift a pixel here and there.
  2. Close this PR, and have no indication as to which items are dividers or filters.

I lean toward option 2 if you're worried about it.

@mistercrunch
Copy link
Member

Just noting that there are no icon currently. You could remove the icons and that would make this PR focussed on the trigger.

In terms of design, one option could be to border-bottom the container div, looking like an underline going across the panel. I would look similar to what it looks like in the dashboard (text with a horizontal bar underneat)

@michael-s-molina
Copy link
Member

I'm ok with option 1 with a TODO to review the CSS after the Ant Design upgrade. From a user's perspective the icons will be aligned.

@mistercrunch
Copy link
Member

for reference -> Screenshot 2024-12-11 at 1 00 42 PM

@rusackas
Copy link
Member Author

rusackas commented Dec 11, 2024

Ok, seems I've stepped in it again...

Pinging Dr. @kasiazjc for good measure.

The options continue to proliferate...

  1. Icons to differentiate dividers/filters (i.e. this PR)
  2. No icons, and treat the divider differently (underline, or some other treatment)
  3. Skip all this and consider a revamp, wherein:
  • Filters in the filter bar get drag/drop reordering and "edit" buttons (on hover)
  • "Add/edit filters" becomes "Add filter" and "Add divider" in the filter bar ⚙️ menu.
  • Filter config modal now only needs to support a single filter... so just ditch its left panel entirely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dashboard:native-filters Related to the native filters of the Dashboard size/S
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants