-
Notifications
You must be signed in to change notification settings - Fork 4.6k
DataViews: Simplify the properties config #73064
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
Conversation
|
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 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. |
|
Size Change: -3.04 kB (-0.12%) Total Size: 2.47 MB
ℹ️ View Unchanged
|
|
Flaky tests detected in c9b2c6c. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/19181084358
|
|
I like the simplicity but this means it's no longer possible to re-order fields on non-table layouts, was that discussed? If fields are now just toggles, should we go ahead and use ToggleControl? |
Yes, briefly, the idea is that it's not a huge use-case really but potentially we could have another secondary UI for this later if there's a big demand. |
This design was suggested based on other similar patterns like the MacOS finder. |
|
MacOS Finder uses a dedicated menu which seems a little different, the DataView appearance options UI is more like a form. I don't really see much value in a one-off design just for this UI, and would rather use an existing/familiar component. Just my 2c though, not a strong opinion. |
|
Happy to switch the design as needed assuming there's agreements. cc @mtias |
|
@jameskoster what UI did you have in mind? |
|
Shouldn't it be checkboxes in this case? :D |
| /> | ||
| ) } | ||
| </HStack> | ||
| <Item onClick={ field.enableHiding ? onToggleVisibility : undefined }> |
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.
We can revise later if it makes sense to extract something from dropdown menu with checkboxes, which behaves similar to 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.
Yes, this feels like a shared component, basically a "multi select" component that is "open always"
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.
Sounds like a Listbox :D #65801
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.
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.
No idea why 'Status' is an option in the Status filter for templates. I'll open an issue about that 😪
6ae7a65 to
c9b2c6c
Compare
|
@youknowriad I had the content preview option enabled for pages, now that this has merged I'm getting an error when I load the pages dataview:
|
|
@jameskoster Mind creating an issue for this? Happy to look afterwards. My guess is that it's probably a pre-existing issue made visible by this PR as this doesn't really impact rendering. |
| ( f ) => | ||
| ! visibleFieldIds.includes( f.id ) && | ||
| ! togglableFields.includes( f.id ) && | ||
| f.type !== 'media' && |
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.
How should we handle the featured image and content-preview fields? Right now with this check, we end up not allowing to display more than one media field. Should we just remove this check?
Another thing related to the above is that before we had a specific place for media fields and opinionated styles. If we allow more media fields, should we add some basic styles to such fields to avoid layout issues (maybe super tall images etc..)..




What
Why
We were optimizing for advanced cases at the expense of the common cases.
Testing Instructions
- Visible fields show checkmark on left
- Hidden fields show no checkmark
- Click any field to toggle visibility
- Field order remains consistent when toggling
- No arrows, no media menu, no descriptions
- At least one field must remain visible (cannot hide all)