-
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
Site Tagline: Add example so that it will display in style book #48300
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
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
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
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.
I'm not really sure we should add a new block attribute just for preview purposes.. I think we should revert this change.
IMO it's not worth it to have to support this and deprecate it in the future, for just showing something different in previews in the case a site doesn't have one. I mean
Write site tagline…
isn't so bad, is it?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 @ntsekouras. Having attribute just for the block previews seems odd to me.
Let's follow the example of the Site Title and Site Logo blocks.
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 feedback @ntsekouras and @Mamaduka! Here's how it would look reverted:
Just to share my thinking about introducing it: I don't feel too strongly about it, but my main concern with not having a placeholder value is that it could be fairly common for folks to not have a site tagline, but very uncommon to not have a site title, so there's a higher likelihood that the
Write site tagline...
text will display in the preview within the Style Book. If a user goes to click that, then they'll be taken to global styles, and they're not able to edit it. We already have theplaceholder
attribute and similar behaviour on the button, heading, image, list, list item, and paragraph blocks, so I thought it'd be fairly innocuous.That said, I very much agree that it's good not to have extra attributes if they're not needed, and by reverting there's nothing stopping us from tweaking how previews work in future follow-ups, so I'm happy for us to proceed with reverting. I have a PR open for that over in #48383.
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 UX might be confusing with the default placeholder, but maybe this is something we need to resolve separately. Maybe change a text copy.
Fun fact: WP only removed the default tagline a few months ago, and it broke our E2E tests 😄
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 — looking over this again today, I wasn't 100% sold on the placeholder approach as the preview should really be previewing a finished / proper Site Tagline rather than the placeholder state since the placeholder has reduced opacity. This is likely pretty low priority, though, so we could always wait and see if there's any feedback about the preview state.
Whoa! I didn't know that, good to know 😄
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 on just using the placeholder the block provides if the site doesn't have a site tagline set.
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 confirming!