-
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
Move Gallery "Add new / Media Library" actions to the Toolbar #21247
Comments
Is this all we need? ("Current media URL" wouldn't apply at the level of the gallery.) @mtias, should we keep the bar at the bottom with (now duplicate) Upload and Media Library buttons, or do you envision the controls at the top replacing them? |
I'd hope we can replace them initially. Eventually gallery items will be blocks and we could use the actual inserter. |
Gallery items will likely become nested image blocks inside a parent gallery. |
@dwolfe Perhaps a |
|
In the interest of moving this forward, I think the word "Add" is clearer than an icon, and it reuses the "Replace" pattern from the image block toolbar. Also, the dropdown surfaces the option to upload a new image more clearly than the Media Library's "Add New" button, which has to compete visually with a thumbnail grid; so I think the dropdown (which also aligns with the "Replace" control) is a better compromise than immediately opening the Media Library. I think this is good enough for now, and we can iterate based on any feedback we get once it's merged. |
Updated comp incorporating @mtias' feedback above: To summarize:
NOTE: This is a temporary fix, given that the Gallery block will at some point transition to a nested block architecture as @paaljoachim mentioned above. |
It follows the toolbar (and inserter) paradigm. It will have a label on focus/hover like other toolbar actions. It won't take up much space (translations). |
Thanks for adding rationale, @MichaelArestad. Just a couple of points:
We're already breaking that paradigm with the image block "Replace" button. We need additional clarity here also, because we're removing the trailing appender, meaning that the "Add" button in the block toolbar will be the only way to add images to a gallery. We need to do what we can to prevent users from missing it, so in this case, standing out from the other block controls is an asset, not a drawback. Hover interactions are an enhancement and nice to have, but shouldn't be required to understand the interface.
This is a good point, but less of a concern on a container block with four controls. Again, we'll have a chance to revisit this when the gallery block becomes a container of nested image blocks. I think this solution works well enough for now. |
Here is a PR for nesting of Image blocks in a Gallery block. #25940 During my latest test of the PR it looked like this: Which means (as I see it) we can remove the bottom Media Library bar as there is now an inline inserter for adding new images. Then center align the Gallery caption just below the images. EDIT: It is being handled in this PR: #25321 (mentioned just above) |
Some additional background discussion on this on a PR that was started to add this to v1 of the gallery #25321 |
Right now we have a trailing appender on the Gallery block which is a bit problematic — it only allows inserting new images or editing the gallery if you are at the bottom of it. On large galleries that requires scrolling. We should move these controls to the toolbar instead, which scrolls with the user.
The text was updated successfully, but these errors were encountered: