Skip to content
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

Closed
mtias opened this issue Mar 29, 2020 · 13 comments
Closed

Move Gallery "Add new / Media Library" actions to the Toolbar #21247

mtias opened this issue Mar 29, 2020 · 13 comments
Assignees
Labels
[Block] Gallery Affects the Gallery Block - used to display groups of images Needs Dev Ready for, and needs developer efforts [Type] Enhancement A suggestion for improvement.

Comments

@mtias
Copy link
Member

mtias commented Mar 29, 2020

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.

@mtias mtias added [Type] Enhancement A suggestion for improvement. Needs Design Needs design efforts. [Block] Gallery Affects the Gallery Block - used to display groups of images labels Mar 29, 2020
@mtias mtias changed the title Move Gallery "Add new / Media Library" to the Toolbar Move Gallery "Add new / Media Library" actions to the Toolbar Mar 29, 2020
@paaljoachim
Copy link
Contributor

Visuals.

Screen Shot 2020-03-30 at 09 42 23

Here is what it looks like for single images.

Screen Shot 2020-03-30 at 09 43 38

That means having somewhat similar controls for the gallery in the toolbar as exist for single image blocks.

@dwolfe
Copy link

dwolfe commented Mar 30, 2020

Is this all we need? ("Current media URL" wouldn't apply at the level of the gallery.)

Add-Add-Menu-to-Gallery-Block-Toolbar

@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?

@mtias
Copy link
Member Author

mtias commented Mar 31, 2020

I'd hope we can replace them initially. Eventually gallery items will be blocks and we could use the actual inserter.

@paaljoachim
Copy link
Contributor

paaljoachim commented Mar 31, 2020

Gallery items will likely become nested image blocks inside a parent gallery.
That means something like this: #11436 (comment)

@MichaelArestad
Copy link
Contributor

@dwolfe Perhaps a + icon would be more fitting than "Add" in that toolbar. I also would remove the dropdown actions in favor of just opening the media modal. What do you think?

@dwolfe
Copy link

dwolfe commented Mar 31, 2020

@MichaelArestad:

  1. Why do you think a + icon would be more successful than an explicit label?
  2. What advantage does opening the media modal have, over the dropdown actions?

@dwolfe
Copy link

dwolfe commented Apr 6, 2020

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.

@dwolfe
Copy link

dwolfe commented Apr 6, 2020

Updated comp incorporating @mtias' feedback above:

Gallery-add-new

To summarize:

  • Removes the trailing appender
  • Introduces an "Add" button with a text label (see: image block "Replace" button)
  • "Add" button invokes a dropdown menu with "Open Media Library" and "Upload" options (see: image block "Replace" button, but omit "Current Media URL" item)

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.

@dwolfe dwolfe added Needs Design Feedback Needs general design feedback. and removed Needs Design Needs design efforts. labels Apr 6, 2020
@MichaelArestad
Copy link
Contributor

Why do you think a + icon would be more successful than an explicit label?

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).

@dwolfe
Copy link

dwolfe commented Apr 7, 2020

Thanks for adding rationale, @MichaelArestad. Just a couple of points:

It follows the toolbar (and inserter) paradigm. It will have a label on focus/hover like other toolbar actions.

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.

It won't take up much space (translations).

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.

@dwolfe dwolfe added Needs Dev Ready for, and needs developer efforts and removed Needs Design Feedback Needs general design feedback. labels Apr 7, 2020
@obenland obenland self-assigned this Sep 14, 2020
@paaljoachim
Copy link
Contributor

paaljoachim commented Oct 18, 2020

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:
Screen Shot 2020-10-18 at 11 32 21

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)

@glendaviesnz
Copy link
Contributor

Some additional background discussion on this on a PR that was started to add this to v1 of the gallery #25321

@glendaviesnz
Copy link
Contributor

Closing as implemented in #38036. The question of adding the use of the block inserter is covered in #38094

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Gallery Affects the Gallery Block - used to display groups of images Needs Dev Ready for, and needs developer efforts [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants