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: inline header or footer, via 'sticky' display group param #2564

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

jfmcquade
Copy link
Collaborator

@jfmcquade jfmcquade commented Nov 27, 2024

PR Checklist

  • PR title descriptive (can be used in release notes)

Description

Allows for inline template authoring of elements that stick to the top or bottom of the page.

This is achieved with a new param for the display group:

  • sticky
    • Possible values
      • top
        • The display group element will stick to the top of the main content (below any app header). Scrollable content will scroll behind it
      • bottom
        • The display group element will stick to the bottom of the main content (above any app header). Scrollable content will scroll behind it

Also introduces a new parameter for the title component:

  • variant: header
    • This centres the text and adds padding so that the title takes up space to be suitably used as a header

This feature can also be used to set the header/footer inside a nav-stack (#2550). See below for demo. This PR adds a new parameter for the nav_stack: open action, which should be used in this case (to hide the default nav-stack header):

  • header: false (default true)
    • Set to false to hide the default nav-stack header, e.g. when using an inline sticky header on the target template.
    • NB, the template header should then handle its own nav-stack close button if required.

Usage notes

  • These display groups must sit at the top and bottom of the template respectively (this is because a dummy element is created on the page in their place so that content doesn't disappear behind them unless scrolled).
  • A sticky display group centres its content by default
  • Currently no specific padding or margins are applied to the content in a sticky display group. The thought is that any such styling should be applied to the enclosed content itself.
  • New components will be required to achieve certain visual use cases, for example the component added in Kuwait Theme: Module Details Header #2546, and the blue module header in this image (from these designs):
    Screenshot 2024-11-27 at 16 52 43

Git Issues

Closes #

Screenshots/Videos

feat_display_group_sticky

Screenshot 2024-11-28 at 17 33 27
sticky.dg.2.mov

Integration with nav-stacks:

Ssticky.w.nav.stack.mov

@jfmcquade jfmcquade marked this pull request as ready for review November 28, 2024 17:42
@github-actions github-actions bot added feature Work on app features/modules and removed feature Work on app features/modules labels Nov 28, 2024
Copy link

Visit the preview URL for this PR (updated for commit 14b3abb):

https://plh-teens-app1--pr2564-feat-sticky-display-kdd0s6lh.web.app

(expires Fri, 13 Dec 2024 16:34:10 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: e4c0bab6b08dd290fbf002fd6e07987fa4b5fce1

Copy link
Collaborator

@esmeetewinkel esmeetewinkel left a comment

Choose a reason for hiding this comment

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

I tried this out on the plh_kids_kw deployment (with same theme selected) and found that some components don't disappear properly behind the sticky header.

Screenity.video.-.Nov.29.2024.webm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Work on app features/modules test - preview Create a preview deployment of the PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants