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

Adds a Filtered property and visual indicator to PropretyColumn in FluentDataGrid #1625

Merged

Conversation

NickHirras
Copy link
Contributor

@NickHirras NickHirras commented Mar 4, 2024

Pull Request

📖 Description

Adds a Filtered boolean property to the PropertyColumn component of the FluentDataGrid. When set to true, it renders a visual indicator on the column header filter button, letting the user know this column is currently filtered.

The Demo for DataGrid Typical Usage has been updated to demonstrate this paramter.

See RFC

#1620

Recording.2024-03-03.200438.mp4

🎫 Issues

#1620

👩‍💻 Reviewer Notes

📑 Test Plan

✅ Checklist

General

  • I have added tests for my changes.
  • I have tested my changes.
  • I have updated the project documentation to reflect my changes.
  • I have read the CONTRIBUTING documentation and followed the standards for this project.

Component-specific

  • I have added a new component
  • I have added Unit Tests for my new compontent
  • I have modified an existing component
  • I have validate Unit Tests for an existing component

⏭ Next Steps

Sorry, something went wrong.

@NickHirras NickHirras changed the title Adds a Filtered property do FluentDataGrid Columns and renders a visual indicator on ColumnOptions Control when set to true Adds a Filtered property to FluentDataGrid Columns and renders a visual indicator on ColumnOptions Control when set to true Mar 4, 2024
@NickHirras NickHirras changed the title Adds a Filtered property to FluentDataGrid Columns and renders a visual indicator on ColumnOptions Control when set to true Adds a Filtered property and visual indicator to PropretyColumn in FluentDataGrid Mar 4, 2024
@NickHirras
Copy link
Contributor Author

Added same comment to the RFC. Does it make sense to use this red dot as the visual indicator, or should a new badge be created?

Copy link
Collaborator

@dvoituron dvoituron left a comment

Choose a reason for hiding this comment

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

I also think it's nicer to use another icon instead of a badge. For example, FilterAdd can be used to explain that this column has added a filter.

image

@vnbaaij
Copy link
Collaborator

vnbaaij commented Mar 4, 2024

@NickHirras I agree with Denis. Use the available Filter icons. There are sort of a badge as well but more clear then a red dot.
...But I would say to use FilterDismiss for when a filter is set

@NickHirras
Copy link
Contributor Author

NickHirras commented Mar 4, 2024

@vnbaaij @dvoituron When trying to reference the FilterDismiss icon, it doesn't exist and getting a compiler error. Is this part of the Project Trimming / Generators? What do I need to do to make the FilterDismiss icon available in CoreIcons?

@dvoituron
Copy link
Collaborator

When trying to reference the FilterDismiss icon, it doesn't exist and getting a compiler error. Is this part of the Project Trimming / Generators? What do I need to do to make the FilterDismiss icon available in CoreIcons?

In fact, all "internal" icons are located in the file CoreIcons.cs.
In the beginning we used the AssetsGenerator project to create this file.
But now it only contains occasional updates.
So, you can manually put your code into this file, and you can remove the comment <auto-generated>...

@NickHirras
Copy link
Contributor Author

Here's latest version, using the Filter and FilterDismiss icons.

No filter applied:

image

With a filter applied:

image

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@vnbaaij vnbaaij added this to the V4.5.0 milestone Mar 4, 2024
@vnbaaij vnbaaij merged commit 5409ab5 into microsoft:dev Mar 4, 2024
2 checks passed
@NickHirras NickHirras deleted the nh-add-filtered-indicator-to-datagrid-column branch March 4, 2024 21:01
vnbaaij added a commit that referenced this pull request Mar 6, 2024
…uentDataGrid (#1625)

* adds filtered indicator

* use a FilterDismiss icon instead of a badge

* Removed comment about file being auto-generated, no longer applies

---------

Co-authored-by: Vincent Baaij <vnbaaij@outlook.com>
@vnbaaij vnbaaij added the v3 label Mar 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants