-
Notifications
You must be signed in to change notification settings - Fork 4.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
Adding a filter from the column-header-menu should open the filter panel #64683
base: trunk
Are you sure you want to change the base?
Adding a filter from the column-header-menu should open the filter panel #64683
Conversation
…with column header filters
Do we think that having two places to add filters is a good idea? Why can't we just remove the filters from the table headers (no other view outside table allows this inline filtering) |
I think it's quite handy, as are the other actions in that menu (re-ordering, hiding). Other actions like pinning (#64679) could be contained here in the future. Thinking about custom fields you might also be able to rename, or go and edit other field properties from this menu. |
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Unlinked AccountsThe following contributors have not linked their GitHub and WordPress.org accounts: @[email protected]. Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases. If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Hey @jameskoster, Can you please review the PR? |
@imrraaj this one needs a code review from someone like @youknowriad or @jorgefilipecosta. |
Interestingly, it works in the storybook (where DataViews is a standalone component), so I wonder if there's some Gravacao.do.ecra.2024-09-02.as.12.29.04.mov |
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.
@jameskoster, would the change I described above be something we are ok with? Or is it something we want to avoid? |
@jorgefilipecosta Ideally the bundled views all behave the same in this respect.
As we can see Templates are the odd one out. But this is an issue on trunk, so we don't necessarily have to fix it here. What do you think? |
What?
The fix shows the filter component when selected via column headers
Why?
Fixes #64612
How?
The initial state for
isShowingFilter
is set to true, so when the filter option is selected in column header the filter component renders just like when we select it using dropdown menu icongutenberg/packages/dataviews/src/components/dataviews/index.tsx
Lines 96 to 98 in 5e77997
to
Testing Instructions
npm install
andnpm run storybook:dev
categories
column headerAdd filter
optionScreenshots or screencast
Before
Screen.Recording.2024-08-21.at.7.32.56.PM.mov
After
Screen.Recording.2024-08-21.at.7.30.31.PM.mov