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

Add support for "more" dropdown for additional tools in Write mode #66455

Closed
jasmussen opened this issue Oct 25, 2024 · 2 comments · Fixed by #66605
Closed

Add support for "more" dropdown for additional tools in Write mode #66455

jasmussen opened this issue Oct 25, 2024 · 2 comments · Fixed by #66605
Assignees
Labels
[Block] Image Affects the Image Block [Feature] Edit Mode [Status] In Progress Tracking issues with work in progress [Type] Enhancement A suggestion for improvement.

Comments

@jasmussen
Copy link
Contributor

jasmussen commented Oct 25, 2024

When writing in contentOnly mode, selecting an image block will render tools for adding a link, adding alt text, and adding title text (if there is title text present on the block already. This proposal here is oriented towards keeping the "Write" tooling simple and intuitive, leveraging the existing "More" down caret employed within text blocks, for additional controls.

This way we can continue flexing content blocks within Write mode, without introducing further complexity.

Visuals

Let's start with the Image block, moving the "Alternative text" control inside this more menu, as well as surfacing the "Title" control, instead of having it only render when a title exists previously.

Image

Image

Requirements

  • Provide a mechanism for write mode block controls to be defined within a more menu.
  • When a block control in the more menu is engaged, it should be active in the toolbar and complete its associated action. For example, the "Alternative text" control engages the popover with the control for modifying the alternative text.
  • Modify the image block's write mode block controls as a basis for this effort.

Related to #66054 and #66116.

Edited by @richtabor

@jasmussen jasmussen added the [Type] Enhancement A suggestion for improvement. label Oct 25, 2024
@richtabor richtabor changed the title Content Only toolbar: Add a "more" dropdown, like inline text has, for additional tools Add a "more" dropdown for additional tools in Write mode Oct 25, 2024
@richtabor richtabor added [Block] Image Affects the Image Block [Feature] Edit Mode labels Oct 25, 2024
@richtabor richtabor changed the title Add a "more" dropdown for additional tools in Write mode Add support for "more" dropdown for additional tools in Write mode Oct 25, 2024
@ntsekouras ntsekouras self-assigned this Oct 30, 2024
@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Oct 30, 2024
@ntsekouras
Copy link
Contributor

I opened a draft PR to get some feedback, but I don't think the approach we have already started is scaleable. There are too many conditional display of controls and I'm not sure how we could abstract this. Maybe with declarative controls and DataForms in the future?

@t-hamano
Copy link
Contributor

One idea I have is to always place the two items inside the More dropdown, and if data exists, apply the pressed state:

b2611362757702b5760e87ab088f70e4.mp4

However, I think the problem is that there is no space between the two items when both data exists:

Image

Of course, we can inject space between the two items by using the VStack component or something, but that might break the consistency with other dropdowns.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Image Affects the Image Block [Feature] Edit Mode [Status] In Progress Tracking issues with work in progress [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants