-
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
Templates: Allow browsing by source, grouping all Custom templates #58946
Open
mcsf
wants to merge
7
commits into
trunk
Choose a base branch
from
update/templates-dataview-sidebar
base: trunk
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 4 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
de462a7
Data views: Use File icon for "All templates" view
mcsf 8794a32
Data views: Group templates by source, collapsing custom ones
mcsf ebaef85
Add `original_source` field to support "Custom" filter
mcsf 9e43201
Rename field to `source`. Simplify theme filtering
mcsf 7f00290
Try: Remove `source` field definition, keep filtering logic
mcsf 8dd4ebe
Rename "Custom" sidebar entry to "User"
mcsf 14a264c
Try: Add "My templates" entry, revert source support
mcsf File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
In the sidebar of the site editor, it says "custom" and here it says "user". I believe we should use the same label no?
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.
Good question, that's one thing I'd like to get feedback on:
What should we do? Both directions seem weird to me.
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 think "User" templates in the sidebar is fine by me too. But would love feedback from @jameskoster
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.
Thanks for the ping. Given this filter shows any user-generated templates, I agree it's fine for the label in the sidebar to be 'User'.
However, it would be good to have a 'Custom' view as well, which should show any
$custom
templates according to the template hierarchy. This would match the 'Custom' section in the current template list. I acknowledge there's no way to filter in this manner yet, so I guess it'll need to happen separately. Perhaps we should add a 'type' taxonomy?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 mean if the goal is to have separation according to "custom", "non custom" templates, that's possible to, it's just a different field. But the question is also what to do for "plugin templates" because these also can be custom or not.
So I guess before moving on here, let's get some clarity about what we want for 6.5 from a design perspective.
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.
If a plugin (or theme) template is custom then it should appear in the "Custom" view, just as those templates appear currently under the "Custom" heading in the Templates sidebar:
For 6.5, at the least, I would suggest replicating the current list, IE a view for custom templates, and a view for each plugin that adds templates. Source = user is a nice-to-have, but since it doesn't exist already not essential.