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

feat(footer): update template part to use desktop and mobile parts #282

Merged
merged 2 commits into from
Aug 28, 2024

Conversation

thomasguillot
Copy link
Contributor

All Submissions:

Changes proposed in this Pull Request:

This uses the same concept as the Header, where the main template part uses 2 "sub" template parts: 1 for desktop and 1 for mobile. These parts then contain a pattern that a publisher can choose from.

The reason for this change is that it doesn't always make sense to have the same footer on both mobile and desktop. For example, some sites have a very complex footer on desktop with many links, which doesn't scale well on mobile. By having two template parts, we give publishers more control over what they want to display depending on the screen size.

Note: For now, there's only one style for the mobile footer. However, we might add more in the future.

How to test the changes in this Pull Request:

  1. Switch to this PR
  2. Switch to a different theme and then switch back to the Block Theme (I noticed some caching issue with patterns in the past and this switch theme "trick" seem to work)
  3. Navigate to the Footer template part and see if you see the 2 sub template parts
  4. Edit the sub template parts, either by switch pattern or by just modifying the content
  5. Save and check your front-end (large and small screen)

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?
  • Have you successfully ran tests with your changes locally?

Copy link
Member

@adekbadek adekbadek left a comment

Choose a reason for hiding this comment

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

Works as described, but the resulting HTML produces a footer within a footer, which is not a semantic use of HTML.

@adekbadek adekbadek merged commit f1ea195 into trunk Aug 28, 2024
2 of 3 checks passed
@adekbadek adekbadek deleted the add/desktop-mobile-footer branch August 28, 2024 09:22
matticbot pushed a commit that referenced this pull request Aug 29, 2024
# [1.13.0-alpha.1](v1.12.0...v1.13.0-alpha.1) (2024-08-29)

### Features

* **footer:** update template part to use desktop and mobile parts ([#282](#282)) ([f1ea195](f1ea195))
@matticbot
Copy link

🎉 This PR is included in version 1.13.0-alpha.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

matticbot pushed a commit that referenced this pull request Oct 8, 2024
# [1.13.0](v1.12.0...v1.13.0) (2024-10-08)

### Features

* **footer:** update template part to use desktop and mobile parts ([#282](#282)) ([f1ea195](f1ea195))
@matticbot
Copy link

🎉 This PR is included in version 1.13.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

3 participants