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

Move header customization to parent theme #148

Merged
merged 2 commits into from
Feb 5, 2024
Merged

Move header customization to parent theme #148

merged 2 commits into from
Feb 5, 2024

Conversation

matt-bernhardt
Copy link
Member

@matt-bernhardt matt-bernhardt commented Jan 31, 2024

Developer

Why changes are needed

Our child theme has a forked copy of the header template, which was meant to be a stripped down version of the parent theme's header that was used on some sites. Unfortunately, we've been poor at keeping this stripped-down header in sync with the full-content version. For example, our recent work changing the favicon was made to the full-content header in the parent theme, but not to the stripped-down version.

What this does

Rather than trying to identify all the changes that have been made and catching the slim header up, this re-factors the slim header entirely.

First, it moves the feature up from the child theme to the parent theme, so that only one of our themes has any header content at all.

Second, it re-structures the logic of the slim header to not be a separate file at all - but rather a conditional in the header template that skips some elements if the slim header is desired. This helps reduce the amount of repeated content that would need to be kept in sync in the future, and makes the code implementation of the feature match what is implied in the UI.

Stylesheets

  • Any theme or plugin whose stylesheets have changed has had its version
    string incremented.
  • No stylesheets are changed

Secrets

  • All new secrets have been added to Pantheon tiers
  • Relevant secrets have been updated in Github Actions
  • All new secrets documented in README
  • No secrets are affected

Documentation

  • Project documentation has been updated
  • No documentation changes are needed

Accessibility

  • ANDI or Wave has been run in accordance to
    our guide and
    all issues introduced by these changes have been resolved or opened as new
    issues (link to those issues in the Pull Request details above)

Stakeholder approval

  • Stakeholder approval has been confirmed
  • Stakeholder approval is not needed

Dependencies

NO dependencies are updated

Code Reviewer

  • The commit message is clear and follows our guidelines
    (not just this pull request message)
  • The changes have been verified
  • The documentation has been updated or is unnecessary
  • New dependencies are appropriate or there were no changes

@JPrevost JPrevost self-assigned this Feb 5, 2024
Copy link
Member

@JPrevost JPrevost left a comment

Choose a reason for hiding this comment

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

This looks good to me and I believe I saw chatter that UX has signed off on it being functionally correct.

I'm curious if a future refactor might be to separate the html head from the site header. This is definitely fine for now but when I see a method like get_header() I'm not expecting the html head personally to be in that.

@matt-bernhardt
Copy link
Member Author

I agree about a future refactor that separates the contents of the <head> element from the markup of the navbar. Both about the refactor being needed, and about it happening in the future.

@matt-bernhardt matt-bernhardt merged commit acbf963 into master Feb 5, 2024
2 of 3 checks passed
@matt-bernhardt matt-bernhardt deleted the pw-85 branch February 5, 2024 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants