-
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
Navigation Overlay customisation via Template Parts #43852
Comments
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as outdated.
This comment was marked as outdated.
yeah, I wonder about that as well, @getdave @scruffian @draganescu is that what's going to happen with the overlay in the future? |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as outdated.
This comment was marked as outdated.
This issue has been updated to tackle the idea of making the overlay menu a separate block that can be edited in focus mode. If you're subscribed, it could use both technical and design feedback! |
I think it should be a template part, not a separate block. |
I agree w/ @mtias because I think it's a good idea:
Whill this template part be able to include the block that references it? 😁 |
The point of it being a separate block is so it has different customization options: the overlay usually doesn't share the same spacing options or typography settings as the desktop navigation does. How can we accomplish that with template parts? |
A template part seems like a more flexible way to go. I see use cases where the navigation overlay needs to contain other elements than menus. it could be
Or maybe multiple menus. Maybe the desktop site has more than one menu, and instead creating a third specific mobile menu you want the mobile menu to combine the two desktop menus in order to reduce maintenance burden for editors. |
@MaggieCabrera with #40318 |
With the addition of #40318 the template part route seems like a good choice. The obvious downside would be that we'll need to find a way to making it obvious/easy for the user to know that they need to do this in order to create a different overlay. |
Let's move this to the dev category! @getdave feel free to update the title to reflect the template part mechanics. 🙏 |
@jasmussen I've gone ahead and updated the title and the description to reflect the "template part" route. However, I don't see this as being ready for dev in the sense that we don't have a clear UX for how the interactions for creating and associating template parts with a given Navigation block will work. There are lots of edge cases to be explored and I believe this will be quicker and more effective to explore in Figma than in code. This project will have a good degree of complexity involved and in order to be as efficient as possible it would be very helpful if we could (collectively) explore this model in more detail before we proceed. Do you agree? |
Sure, can you list out a couple of flows that you'd like to see outlined better? The current mockups assume as little UI as possible, as a goal to strive for: you toggle the "Mobile" or "Always" part of the segmented control, and boom: now you have a separately editable overlay with no other action needing to be taken. Do we need user-steps in between? |
I've updated this Issue's description with a proposed set of User Requirements. I expect these to act as a north star for the work on this feature. I think it's important that we don't loose sight of user goals/expectations. |
Composites of expected flows: Simple: Intermediate: Advanced: Thoughts? |
@richtabor These seems to align nicely with the existing user stories although the |
Hey team, I summarized much of the conversations, concepts, and feedback into a prototype, and make a video walkthrough. There are a few rough edges to iron out yet, but I think we're on the right path. Not shown is editing overlays in the site editor > patterns view, and a next iteration where you may potentially change the ref of the menu within the overlay. Thoughts? nav-overlay-walkthrough.mp4 |
@richtabor Clicking Edit to enter the Edit overlay mode -> Shows Navigation overlay in the top which is very helpful. In relation to editing the menu elements specific to the overlay. Can we add a bigger font or change the text color which will only impact the overlay and not the regular menu? |
Yes, the goal is that the styles of the nav block within the overlay can be totally different than outside of it, included justification/alignment and any other styling controls that you know have |
Thank you for the feedback Maggie! |
@richtabor This aligns nicely with the current direction of this PR 👍 |
UpdateNow contributors are back at the start of the new year, I felt now was a good time to revisit this effort and provide an update on status. During the course of working on that PR it has become apparent that there are a number of different UX routes that could be taken in regard to determining how the correct template part is chosen and also the various scenarios that arise when making changes to the contents of the Overlay. In short, it's my view that from a UX perspective this project is much more complex than anyone first appreciated. In addition, this PR is currently only a prototype and is far from being a refined experience. There are a number of edges to the problem that need to be explored and resolved and the amount of effort required to resolve these is unknown. As a result, I'm feeling ever less confident that we can land this PR for the 6.5 release. Even if we were to settle on a UX and solve all the technical issues in the few weeks left before Beta 1, that leaves very little time for user testing and feedback before it lands in a major WordPress release. Therefore, I think we ought to consider removing the Navigation Overlay feature from the roadmap for 6.5 and instead target it for a future release. We can however, continue to work on the feature during the 6.5 cycle and aim for its inclusion within the Gutenberg Plugin. As the feature is opt-in, it should be possible to achieve this. We will still continue to work on the feature during the 6.5 cycle but without the pressure involved in aiming for it to be included in the release. This will give contributors more breathing room to have the opportunity to receive feedback and refine the implementation. Do we agree that, given the issues outlined above, it would be premature to target this for 6.5 and we should look to refine the feature prior to inclusion in a major release? |
Absolutely |
Yes! |
Moving this to punted to 6.6 due to the feedback and discussion here. Thanks for the clear communication. Noted in the 6.5 release leads channel for good measure. |
Noting here that I think it will be very difficult to merge this PR and target this PR at the Gutenberg Plugin only (i.e. keep the change in the Plugin and not allow it into a release). Why? Because then we'd be maintaining two versions of the block.
This is branching and is going to introduce more maintenance overhead into an already complex block. Instead I suggest we investigate whether it's possible to place it behind a flag. That way we can ship the same code to Plugin and Core and it's clear where the branching logic occurs. |
Feedback from a client in relation to the hamburger/overlay menu as it is today. Mobile.menu.2024.mp4Items are crammed into the right side. Needs padding. Align left - center - right. Btw going to the site I changed Justify items right to Justify items center as it looked a lot nicer. EDIT: EDIT 2: Padding right existed on another Full Site Editing web site using the default theme Twenty Twenty Four. So the main point goes back into having top level with sub levels items easier to notice. |
The lack of padding is probably a theme issue. You need to add a global horizontal padding for it (and if it's 0, make sure it's not a unitless zero) |
I've been thinking more about this and I think we should explore what it would take to allow a link/button to open a template part in an overlay, as a first step. |
Hi folks, |
Closes #39142 and #38201
Update
Following discussion in this Issue the aim is now to make it possible to define the overlay as a separate template part.
This will allow users to create a totally custom overlay and associate that with a given Navigation block via the template part's unique identifier.
As template parts are a blank canvas, it will be possible to have a different Navigation block within the template part itself which will solve the requirement whereby some users wish to have a different menu on "mobile".
Styling of this template will be achieved via #40318.
This Issue is an "epic" and will need to be further broken down into it's constituent parts.
User Requirements
These are the high level requirements for the feature.
Glossary
Issue update: Dec 23
To enable full customization of the contents of the Navigation overlay menu, it could become a separate block, with its own possible inner blocks, paddings, and global styles properties. To enable that, we could have the overlay button invoke a "focus mode" editing of the overlay block:An additional affordance, for example for when the overlay only invokes on mobile, could be to add an Edit button in the Display panel of the inspector:
The Overlay could be surfaced in the List View in the same style as position: sticky; group blocks in #30121:
However it would not be a requirement for this issue, and if helpful to the development effort, there is no need to optimize for more than a single navigation menu with a single overlay that are directly tied together with no ability to replace one overlay with another.
There are technical questions to consider (please see this conversation), it would be good to consider these in light of template parts as well, since ideally the experience of entering and existing focused mode can feel similar.
The overlay block should be stylable in Global Styles (a la
"core/navigation-overlay": {)
, so custom paddings and styles can be applied. This should also address #44182.Figma.
Initial proposal (Issue updated Nov 7.)
As of #43576, it is now easier to position the little navigation overlay menu icon (burger menu) so that the close icon from the overlay will perfectly overlap it. To do that, you:
The result is that the menu icon will sit in the exact place where the close icon will sit:
This is working well. However, it works mainly well for themes that look good with the menu icon in the extreme top right corners. Other designs would benefit from a little vertical padding above the menu item, to optically balance, for example, a site title with the burger icon. Like so:
At the moment, all 4 paddings for the overlay menu are set to be the same as any root padding applied to your site. It would be nice to be able to customize these paddings further, by simply surfacing this padding control for the overlay menu, so for example the top padding could be set just a bit higher, to match any custom header padding, making things line up.
For starters, this could be implemented in theme.json only, and a padding control for the overlay could be added to the block at a later point.
The text was updated successfully, but these errors were encountered: