-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
DataViews: Add missing styles and remove opinionated ones for generic usage #64711
Conversation
@@ -29,6 +29,10 @@ | |||
} | |||
} | |||
|
|||
.dataviews-settings-section:has(.dataviews-settings-section__content:empty) { | |||
display: none; | |||
} |
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.
you can define fields that can't be hidden and if all your fields are non hideable, the "properties" section of the view config should be hidden entirely.
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. |
text-decoration: none; | ||
color: $gray-900; | ||
font-weight: 500; | ||
} |
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.
The links within the dataviews fields shouldn't be that opinionated, they should just inherit the global link styles applied in the current app.
This is the change this is the most impactful in this PR but I didn't notice any regression.
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.
Agreed, but shouldn't we add those styles to our current usages?
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.
It seems you don't see a regression because we have similar opinionated styles for dataviews-view-grid__primary-field
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, I guess these were needed before the introduction of the primary fields.
Size Change: +3 B (0%) Total Size: 1.77 MB
ℹ️ View Unchanged
|
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.
I didn't spot any regressions
I've marked this PR to be backported to the 19.1 release as it has a fix (hide visible properties panel) for something introduced in that release (view config redesign). |
… usage (#64711) Co-authored-by: youknowriad <[email protected]> Co-authored-by: ntsekouras <[email protected]> Co-authored-by: jameskoster <[email protected]>
* DataViews: Add missing styles and remove opinionated ones for generic usage (#64711) Co-authored-by: youknowriad <[email protected]> Co-authored-by: ntsekouras <[email protected]> Co-authored-by: jameskoster <[email protected]> * Shuffle: Don't call '__experimentalGetAllowedPatterns' for every block (#64736) Co-authored-by: Mamaduka <[email protected]> Co-authored-by: tyxla <[email protected]> Co-authored-by: wpsoul <[email protected]> * DataViews: hide sort direction control if there is no sortable fields (#64817) Co-authored-by: oandregal <[email protected]> Co-authored-by: ntsekouras <[email protected]> * Block Bindings: Refactor utils file. (#64740) * Refactor block binding utils * Add security checks Co-authored-by: cbravobernal <[email protected]> Co-authored-by: gziolo <[email protected]> Co-authored-by: SantosGuillamot <[email protected]> Co-authored-by: jsnajdr <[email protected]> * Interactivity API: Fix computeds without scope in Firefox (#64825) * Replace NO_SCOPE symbol with an object * Update changelog Co-authored-by: DAreRodz <[email protected]> Co-authored-by: luisherranz <[email protected]> Co-authored-by: Marc-pi <[email protected]> --------- Co-authored-by: Riad Benguella <[email protected]> Co-authored-by: youknowriad <[email protected]> Co-authored-by: ntsekouras <[email protected]> Co-authored-by: jameskoster <[email protected]> Co-authored-by: George Mamadashvili <[email protected]> Co-authored-by: Mamaduka <[email protected]> Co-authored-by: tyxla <[email protected]> Co-authored-by: wpsoul <[email protected]> Co-authored-by: André <[email protected]> Co-authored-by: oandregal <[email protected]> Co-authored-by: Carlos Bravo <[email protected]> Co-authored-by: cbravobernal <[email protected]> Co-authored-by: gziolo <[email protected]> Co-authored-by: SantosGuillamot <[email protected]> Co-authored-by: jsnajdr <[email protected]> Co-authored-by: David Arenas <[email protected]> Co-authored-by: DAreRodz <[email protected]> Co-authored-by: luisherranz <[email protected]> Co-authored-by: Marc-pi <[email protected]>
I just cherry-picked this PR to the release/19.1 branch to get it included in the next release: #64876 |
… usage (WordPress#64711) Co-authored-by: youknowriad <[email protected]> Co-authored-by: ntsekouras <[email protected]> Co-authored-by: jameskoster <[email protected]>
Related #55083
What?
As I was using the DataViews component in a third-party project, I noticed that the styles make some assumptions that don't hold true everywhere. This PR updates the styles to make it easier to integrate in different contexts.
Testing Instructions
1- Open the DataViews in the site editor
2- Ensure there are no style regressions.