Skip to content
This repository has been archived by the owner on Jan 26, 2022. It is now read-only.

Use "header" template part inside of the "header-large-dark" template part #55

Merged
merged 1 commit into from
Oct 7, 2021

Conversation

kjellr
Copy link
Collaborator

@kjellr kjellr commented Oct 7, 2021

Fixes #54.

This potential solution is thanks to a conversation I just had with @jasmussen. Rather than create a separate template part for the navigation block, we can actually just the the more generic header.html template part within the header-large-dark.html template.

When folks edit the navigation inside there, it'll update the original header.html template, and keep things in sync.

The only issue I'm seeing is that the Site Title color doesn't appear to inherit the correct white link color (even though it's properly set on the container). I also tried setting it on the template part itself, but that doesn't seem to fix it either. Seems like a Gutenberg bug?

Editor Front end
Screen Shot 2021-10-07 at 12 53 46 PM Screen Shot 2021-10-07 at 12 53 57 PM

To test:

  1. Using the site editor, edit the navigation while viewing the front-page template.
  2. Save your changes.
  3. Ensure that change is synced to the navigation on other templates as well.

@kjellr kjellr self-assigned this Oct 7, 2021
@kjellr kjellr requested a review from jffng October 7, 2021 16:58
@jasmussen
Copy link

Nice one. I'll see if I can push a separate fix got the site title color inheritance to the block editor, so it probably shouldn't block this PR.

Copy link
Collaborator

@jffng jffng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ensure that change is synced to the navigation on other templates as well

This aspect of the PR works as advertised. I did run into a visual bug though where the nav links are stacking strangely, but perhaps that's something to address separately:

Screen Shot 2021-10-07 at 3 59 29 PM

@kjellr
Copy link
Collaborator Author

kjellr commented Oct 7, 2021

That's weird! Are you seeing that without this PR too?

@jffng
Copy link
Collaborator

jffng commented Oct 7, 2021

Are you seeing that without this PR too?

Yes, so maybe let's 🚢 and follow up.

@kjellr kjellr merged commit 715f0e3 into trunk Oct 7, 2021
@kjellr kjellr deleted the fix/unsynced-nav-blocks branch October 7, 2021 20:31
@jasmussen
Copy link

What a beautiful theme. And by the way, this header template will look so much better once this PR lands:

Screenshot 2021-10-08 at 10 04 50

That said, I can't reproduce the issue. I'm correctly seeing the white color on the frontend and in the editor:
Screenshot 2021-10-08 at 10 06 32

I'm on latest gutenberg trunk. It's possible it's been fixed there inadvertently?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Edited Navigation doesn't sync between the two header template parts
3 participants