Skip to content
This repository was archived by the owner on Jul 9, 2026. It is now read-only.
This repository was archived by the owner on Jul 9, 2026. It is now read-only.

Toolbar #55

Closed
Closed

Description

@koke

Implement a toolbar component to put the block formatting controls.

screen shot 2018-10-17 at 3 55 14 pm

API:

  • Blocks/components should be able to use the same API/code to define their toolbar

UI:

  • The toolbar should stay attached to the bottom of the screen, or the top of the keyboard when visible.
  • If the toolbar contains more buttons than fit in the screen width, the user should be able to scroll
  • When the keyboard is visible, the toolbar should show a button that allows to toggle/hide the keyboard

What we're not doing as part of this issue (but good to keep in mind):

Tasks

Slot/Fill pattern with Toolbar (1 week)

  • Fix : is block focused logic on Android platform
  • Implement Slot/Fill "portal" pattern in gutenberg mobile
  • Test Slot/Fill pattern with existing InlineToolbar
  • Create Toolbar container with Format Toolbar Slot and Heading Toolbar Slot on top of the screen
  • Test Slot/Fill pattern with Format Toolbar Slot and existing Format Toolbar

Context (Consumer, Provider) pattern with Toolbar (3 days)

  • Provide isSelected logic to Toolbar level

Toolbar Style (2 days)

  • Implement toolbar button style by specs
  • Implement toolbar style by specs

Keyboard with Toolbar (4 days)

  • Move Toolbar to the bottom of the screen and make it keyboard sticky
  • Create Keyboard control with the corresponding Slot
  • Implement keyboard toggle functionality

Tests (3 days)

  • Make proper tests

Activity

  1. added this to the M2: Toolbar, Inserter milestone on Jul 4, 2018
  2. SergioEstevao commented on Aug 14, 2018

    @SergioEstevao
    Contributor

    I started to look at this task and at the moment I'm planning to break this on the following tasks:

    • Make the format bar code (format-toolbar) compatible with React Native
    • Implement Buttons with text only
    • Implement Buttons using an image and or SVG
    • Link Button/Toolbar actions to Aztec RN
    • Pin the toolbar to the bottom of the screen, on top of the virtual keyboard
  3. hypest commented on Sep 18, 2018

    @hypest
    Contributor

    Heads up, I went ahead and updated your list #55 (comment) @SergioEstevao to reflect current status

  4. marecar3 commented on Oct 11, 2018

    @marecar3
    Contributor

    Hey, @hypest @koke is this one WordPress/gutenberg#8989 redundant?

  5. hypest commented on Oct 12, 2018

    @hypest
    Contributor

    👋 @marecar3 , good point. Let's update and close the one in the Gutenberg repo and update and work off this one here only. WDYT?

  6. marecar3 commented on Oct 12, 2018

    @marecar3
    Contributor

    @hypest should I take on me updating and closing that one?

  7. hypest commented on Oct 12, 2018

    @hypest
    Contributor

    Feel free to @marecar3 , sure! Thanks!

  8. self-assigned this
    on Oct 12, 2018
  9. koke commented on Oct 17, 2018

    @koke
    MemberAuthor

    @iamthomasbishop can you update this issue with a better mockup of the toolbar? The one I could find had a black background that I had to remove but it looks odd. Also, can you confirm that the requirements I added for the UI in the description are accurate?

  10. iamthomasbishop commented on Oct 17, 2018

    @iamthomasbishop
    Contributor

    Here's the current iteration for the toolbar:

    screen shot 2018-10-17 at 3 55 14 pm

    Documentation sounds right, other than this part:

    When the keyboard is visible, the toolbar has a button at the end to

    Should that be "When the keyboard is visible, the toolbar should show a button that allows to toggle/hide the keyboard."?

  11. 6 remaining items

  12. koke commented on Oct 24, 2018

    @koke
    MemberAuthor

    @iamthomasbishop for the dropdown buttons (heading, text alignment) I didn't see how they would look in the designs. I'm assuming something like this (from Ulysses), showing options in the keyboard area?

    ulysses-toolbar-dropdown

  13. koke commented on Oct 24, 2018

    @koke
    MemberAuthor

    @marecar3 thanks! There's no need to create issues for those yet, we can account for them as part of this issue.

    • Create Block type control: we're not doing this as part of the alpha, and maybe not even the beta, so no need to account for this one yet
    • Keyboard toggle: is this one included in the existing estimations?
  14. hypest commented on Oct 24, 2018

    @hypest
    Contributor

    The design calls for a condensed button for the headings, for example. Like, just use a single toolbar button with a dropdown to change the heading size. I'd say that is should be fine to do that in more than one steps: in step one, just put the 3 heading buttons in the toolbar. Step two: condense them to one. I expect the second step to be non-trivial. cc @marecar3

  15. marecar3 commented on Oct 24, 2018

    @marecar3
    Contributor

    @koke Updated. Keyboard toggle is now included in the existing estimation.
    Please, let me know if there should be more adjustments to the estimation list.

  16. koke commented on Oct 24, 2018

    @koke
    MemberAuthor

    @marecar3 thanks, I think that's all I need for now.

    @hypest let's wait to hear from Thomas, but I think the collapsable buttons could wait for the beta?

  17. marecar3 commented on Oct 25, 2018

    @marecar3
    Contributor

    Hey @koke, I have added one more section in the estimation. It's Toolbar Style as toolbar buttons and toolbar itself doesn't implement the latest style provided by @iamthomasbishop.

  18. koke commented on Oct 25, 2018

    @koke
    MemberAuthor

    Thanks, good catch

  19. iamthomasbishop commented on Oct 25, 2018

    @iamthomasbishop
    Contributor

    @koke to answer your question above – I haven't provided a dropdown component design yet because I assumed (maybe wrongly) that we wouldn't implement this for a while. It sounds like that is the case, but I will start preparing some mockups for this.

    Fwiw, my first thought was that for a quick i1, we could use something along the lines of either bottom sheets, action sheets, or popovers (aka menus). I will explore this further.

  20. koke commented on Oct 25, 2018

    @koke
    MemberAuthor

    I imagined something like that, although another approach to considering is expanding the options in place inside the toolbar, a sort of horizontal accordion

  21. iamthomasbishop commented on Oct 25, 2018

    @iamthomasbishop
    Contributor

    That too was on the list of considerations, but I'd like to see if we can find an existing pattern or component to utilize. I thought about doing something like this, but I'm not sure I like this approach over the others mentioned previously.

    img_0513

  22. added a commit that references this issue on Nov 2, 2018
  23. koke commented on Nov 7, 2018

    @koke
    MemberAuthor

    @marecar3 I moved the task list to the issue description, please make sure to do any new updates there so it shows on the issue summary:

    screen shot 2018-11-07 at 11 47 44

  24. marecar3 commented on Nov 7, 2018

    @marecar3
    Contributor

    Thanks, @koke, I will do that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions