-
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
Global styles: update return values from getGlobalStylesChanges() #58707
Conversation
…es. This includes adding a period at the end of any sentences.
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 Core SVNIf you're a Core Committer, use this list when committing to
GitHub Merge commitsIf 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. |
@@ -36,7 +36,7 @@ function ChangesSummary( { revision, previousRevision } ) { | |||
data-testid="global-styles-revision-changes" | |||
className="edit-site-global-styles-screen-revisions__changes" | |||
> | |||
{ changes.join( ', ' ) } | |||
{ changes.join( ', ' ) }. |
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.
Pretty crude but it was the simplest approach after having tried the following:
- passing a "suffix" option value of
"."
togetGlobalStylesChanges()
. Rejected because the function returns an array of strings and requires appending the suffix to the last item. Too weird. - Changing the return value of
getGlobalStylesChanges()
to be a joined string. Rejected because it removes all the flexibility of astring[]
return value. - Creating a new function to return
changes.join( ', ' ) }.
. Rejected, or at least postponed, until we need it. We're only usinggetGlobalStylesChanges()
in two places.
In summary, I'm of the opinion that the component should decide how to present the changes.
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 we're already using ,
to join the changes together, I think appending a .
character here is likely fine!
Size Change: -10 B (0%) Total Size: 1.69 MB
ℹ️ View Unchanged
|
Flaky tests detected in 7a79094. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/7794124238
|
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.
What?
"Audio"
vs"Audio block"
Why?
Design feedback from:
Also, let's leave it up to the consuming component as to how to present the changes.
Testing Instructions
Screenshots or screencast