-
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
Add new Media section to preferences modal #64846
Conversation
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. |
Size Change: +350 B (+0.02%) Total Size: 1.78 MB
ℹ️ View Unchanged
|
Flaky tests detected in 0dad32e. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/10582887608
|
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 can confirm it works as advertised:
- no Media section in the Preferences modal by default
- Media section and two options available when the experiment is enabled.
Code looks good.
) } | ||
> | ||
<PreferenceToggleControl | ||
scope="core/media" |
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 must admit that I don't fully understand these scopes, but it seems fine to me for the sake of the experiment. Everything else in the file is core
.
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's essentially just a namespace for grouping similar settings. Other common ones are core/edit-post
or core/customize-widgets
.
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 scope is used for setting preferences for different packages. core
setting was introduced recently for preferences that are on top of editor
package (like edit-post and edit-site
) and they are shared across these packages. Meaning if you make a change in site editor the same preference will be effective for post editor.
Personally I'd add the in core
scope.. --cc @youknowriad
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 would have used the core
scope as these are global preferences too but I don't feel very strongly. I think some normalization about these would be good.
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.
Thank you for providing more details about the scope.
What?
Add new Media section to preferences modal, behind an experimental flag (
window.__experimentalMediaProcessing
).Why?
This is for client-side media processing in #61447, which provides some new features such as compressing existing images in the browser. More preferences will likely added in the future as work progresses.
How?
Testing Instructions
Tip: review with whitespace changes hidden, as there's a lot of formatting changes.
Testing Instructions for Keyboard
N/A
Screenshots or screencast