-
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
Group templates in sidebar list #57711
Conversation
Size Change: +552 B (0%) Total Size: 1.69 MB
ℹ️ View Unchanged
|
I installed the Sensei LMS plugin, which installs WooCommerce as well. This is what I see: Gravacao.do.ecra.2024-01-10.as.11.34.45.movFeedback:
|
I'm not really sure the list layout will be ready to be stabilized for 6.5. I'd like feedback from other on this one too.. |
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 agree with the need for more visible headings, but otherwise it's looking good, thanks!
packages/edit-site/src/components/sidebar-navigation-screen-templates/index.js
Outdated
Show resolved
Hide resolved
( accumulator, template ) => { | ||
const { | ||
original_source: originalSource, | ||
author_text: authorText, |
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.
Since I'm not familiar enough with the domain: any chance that a plugin template could be missing author_text
? If so, should we capture those templates in a special group?
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.
author_text
is always filled with something. The issue is though that for a while(from the old templates list) we were showing information about the author based on the original_source
value. Now it seems by just checking one more plugin(Sensei) that plugins could add templates in different ways without filling the original_source
property with plugin
value. So I'm not really sure what's the way forward here. Maybe it would be useful to find how most plugins add templates and explore our options..
packages/edit-site/src/components/sidebar-navigation-screen-templates/index.js
Outdated
Show resolved
Hide resolved
Flaky tests detected in fee398e. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/7489306204
|
This PR seems mostly ready, other than the question about how to classify templates. I'd ship as it is and explore this separately. We don't need to ship the list view as root everywhere. For example, we could ship grid with patterns as the root page, table with templates (as it is now, as listing), and list view with pages. That way we'd get feedback from every layout. We should evaluate what's missing to make that happen and putting the work hours in those places, if the plan sounds good. |
Totally happy to explore the data view stuff separately. I'll push some style tweaks here shortly. |
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 updated the type styles to match similar headers elsewhere. Also added a border, and changed the color, this will hopefully make the headings easier to recognise at a glance.
What?
Resolves: #48651
This PR separates the custom templates and the templates added by plugins. Currently the check for plugin templates is based on the
original_source
property(internally checks if there is file and if theorigin
has valueplugin
), but it's very possible other plugins add templates differently.I'm not very familiar of all the ways plugins add templates, but in general this can also affect the
author
filter in templates list. So if this doesn't work well, we'll probably need to see if we can have an API for that - although it seems convoluted at first sight since there are also filters in place for changing/overriding templates.Testing Instructions
Templates
in navigation sidebar and observe the grouping.Screenshots or screencast
Screen.Recording.2024-01-10.at.10.56.19.AM.mov