Repository navigation
Try: add icons to media type dropdowns - #8566
Draft
adamsilverstein wants to merge 14 commits into
Draft
adamsilverstein wants to merge 14 commits into
adamsilverstein wants to merge 14 commits into
Conversation
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
Member
Author
|
@argyleink any tips on showing the icon in the selected element at the top, do I need to handle that manually? (see note in PR description & screenshots) |
|
I got you: codepen doing exactly what you want
<button>
<selectedcontent></selectedcontent>
</button>
selectedcontent {
display: flex;
align-items: center;
gap: .5ch;
}you can also use this technique to have the selected state only show the icon |
Member
Author
Excellent, thank you! I suspected I was missing something. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
The new Customizable Select API enables HTML select elements that can include images to make select elements more helpful for users.
This PR uses this new feature to add icons next to the media type dropdown in the media library.
Screenshots
Before PR
Before this PR, the media filter looks like this:
Grid view
List view
After PR
Grid view
List view
Notes
Trac ticket: None: this is an experiment so far.
Testing Instructions
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.