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

Stabilize the Title Bar #50378

Closed
Tracked by #33094
mtias opened this issue May 5, 2023 · 27 comments
Closed
Tracked by #33094

Stabilize the Title Bar #50378

mtias opened this issue May 5, 2023 · 27 comments
Labels
[Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing")

Comments

@mtias
Copy link
Member

mtias commented May 5, 2023

Related #50369, #50260, #50218, #50217, #48641

Let's solidify the design and describe all the states in detail so that implementation can go smoothly. There are functions being introduced (#44461) that necessitate the title bar.

Site Editor

  • Show page and template. Switch between the two edit behaviours.
  • Include "view page" and "view post" actions.
  • Connect with command center
    • Allow quick switching of templates or pages
  • Show how template parts and focused template part mode work regarding the title bar. Same for menus.

Post Editor

It's unclear if we need to bring the title bar to the post editor at the same time or it can be in stages, but it'd be good to design the aspects that are necessary for the post editor context. Particularly editing the title and the permalink.

Mockups

Main site editor title bar:

Title bar, desktop
  • Shows page title with icon, and ⌘K commandbar affordance in its resting state
  • In "top toolbar" mode, it's hidden until you go back to the top level
  • In the content template split (Site Editor: Add ability to focus only on editing page content #49980), when you edit the template, a "back" button appears on the left
  • In the resting state, the entire area is clickable to invoke the command bar, which can show contextually related commands (Command Palette: Mapping Contextual Commands #50407)
  • When editing a template part, the template part name is shown with its rhomboid symbol
  • When first editing a template, then diving a step deeper into a template part, the "back" button behaves as a breadcrumb system

Scaling to mobile, and considering the top toolbar option across breakpoints:

Top toolbar, desktop and mobile, site editor
  • As the viewport grows thinner, the width of the commandbar is flexible
  • At smaller breakpoints the template "back" button loses its visible label.
  • The title bar is not shown on mobile.

It is likely useful to keep this component site-editor first in the near future, but here is a sketch that explores adding it to the post editor.

Top toolbar, desktop and mobile, post editor
@mtias mtias added the Needs Design Needs design efforts. label May 5, 2023
@mtias mtias mentioned this issue May 5, 2023
57 tasks
@jameskoster

This comment was marked as outdated.

@richtabor

This comment was marked as resolved.

@SaxonF

This comment was marked as resolved.

@jasmussen

This comment was marked as resolved.

@SaxonF
Copy link
Contributor

SaxonF commented May 8, 2023

Just to clarify, this is mostly @jameskoster and @richtabor great work, I just copied over from Figma :)

@jasmussen

This comment was marked as resolved.

@jasmussen

This comment was marked as resolved.

@jasmussen
Copy link
Contributor

Want to connect some dots, we can potentially close #48481 in favor of this one, perhaps.

@jasmussen

This comment was marked as resolved.

@mtias
Copy link
Member Author

mtias commented May 8, 2023

If the whole bar triggers the command palette, I'm not sure that the "view link" should sit within. Might make more sense to keep it next to the "preview" button (and change that one to icon button).

@jasmussen

This comment was marked as resolved.

@richtabor

This comment was marked as resolved.

@SaxonF

This comment was marked as resolved.

@jasmussen jasmussen added Needs Dev Ready for, and needs developer efforts [Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") and removed Needs Design Feedback Needs general design feedback. labels May 9, 2023
@jasmussen
Copy link
Contributor

Based on the feedback, I went ahead and tentatively updated this issue with the latest decisions and added the dev tag. If anything pops up as problematic, let's revisit.

@jameskoster
Copy link
Contributor

Is there a reason for the exclusion of the cmd+k hint when editing a template?

@jasmussen
Copy link
Contributor

No, we can keep it. I'll update.

@mtias
Copy link
Member Author

mtias commented May 9, 2023

Not to distract here, but it'd be good to start exploring how things behave if we move the primary button to the right of the ellipsis menu, or right before it but after everything else; how plugins would look, etc.

@SaxonF
Copy link
Contributor

SaxonF commented May 16, 2023

Kicked off work here if anyone wants to contribute.

@jasmussen
Copy link
Contributor

Not to distract here, but it'd be good to start exploring how things behave if we move the primary button to the right of the ellipsis menu, or right before it but after everything else; how plugins would look, etc.

Quick sketch:

Top toolbar with save on the right

Figma.

@jasmussen
Copy link
Contributor

For reference, I shared some updated mockups for the mobile behavior here, and depending on feedback I will update this issue.

@mtias
Copy link
Member Author

mtias commented May 18, 2023

Another use case to consider is the focused template part mode when engaged from a higher level template. The "back" breadcrumb never made much sense in the canvas and it'd be a nice opportunity to absorb it in the title bar:

image

@jarekmorawski
Copy link

Hi there! This is exciting to see come to life as we have a flow in WooCommerce that could benefit from a similar solution. In the new block-based product editing experience, the product description will launch the visual editor, which could look and feel like a template part.

Borrowing ideas from some of the explorations I saw, we could show the template part name (in our case: Product description) in the new Title Bar and let the user easily go back to the main editor/form without switching contexts.

switch-part.mov

@talldan
Copy link
Contributor

talldan commented May 25, 2023

Just noticing that the top toolbar and title bar don't seem to be playing well together in the latest trunk:
Screen Shot 2023-05-25 at 1 01 48 pm

edit: this was a regression, made a revert in #50937 to resolve the issue.

@mtias
Copy link
Member Author

mtias commented Jun 2, 2023

What's pending here to wrap the issue?

@jameskoster
Copy link
Contributor

One detail we might consider is the view-on-frontend button. In the post editor we have:

Screenshot 2023-06-05 at 11 31 43

We could just paste that into the site editor as well, but it might be a bit strange for a button in the top bar to appear / disappear as you move between editing content / templates. Instead, we might incorporate it into the title bar:

Screenshot 2023-06-05 at 11 36 25

@ndiego
Copy link
Member

ndiego commented Jun 15, 2023

One detail we might consider is the view-on-frontend button.

This would be a great addition. A question came up in the latest call for testing about how to view a page once you have made edits in the Site Editor, and it's currently a bit tricky. Any chance this enhancement could make it into 6.3? 🤞

@jasmussen
Copy link
Contributor

The bulk here has been addressed, so I'm closing this one in favor of #51711 (a bugfix followup) and #52032, an enhancement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing")
Projects
Status: Done
Status: Done
Development

No branches or pull requests

9 participants