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

Hide "Sticky" position option when not available #56147

Open
Tracked by #62680
getdave opened this issue Nov 15, 2023 · 3 comments
Open
Tracked by #62680

Hide "Sticky" position option when not available #56147

getdave opened this issue Nov 15, 2023 · 3 comments
Labels
[Block] Group Affects the Group Block [Feature] Block Style Variations Issues or PRs that are related to the style variations for blocks [Type] Enhancement A suggestion for improvement.

Comments

@getdave
Copy link
Contributor

getdave commented Nov 15, 2023

If a Group block is a child of a Template Part then making it Sticky will have no effect (for explanation see #47043).

Therefore we should hide the option from any Group blocks that are children of Template Parts.

@getdave getdave added [Type] Enhancement A suggestion for improvement. [Block] Group Affects the Group Block [Feature] Block Style Variations Issues or PRs that are related to the style variations for blocks labels Nov 15, 2023
@noisysocks
Copy link
Member

Ran into this while creating a block theme. I tried to make the Group within my header template part sticky and assumed that the feature was completely broken.

Kapture.2024-06-04.at.13.42.55.mp4

@andrewserong what do you think of Dave's suggestion? I think we need to do something until #50617 can be fixed since it's really misleading right now.

@andrewserong
Copy link
Contributor

andrewserong commented Jun 4, 2024

That's actually not a bad idea! I'm a bit cautious about hiding things that have been available for a long time, and there are good use cases for nested sticky positioning, but I agree that hiding it when the Group block is a child of a template part is probably a good way to go. I suspect most use cases for sticky are either at the root of the template, or within nested content rather than nested within template parts. (I.e. patterns like sticky scrolling headers are typically part of the content of a document, rather than within a header or footer).

If we do go with hiding, I'd go with an approach where we hide if there isn't yet a sticky value set. It's important that if folks move a sticky group block to another part of a template or template part, they're still about to switch the value to off.

@richtabor
Copy link
Member

If we do go with hiding, I'd go with an approach where we hide if there isn't yet a sticky value set. It's important that if folks move a sticky group block to another part of a template or template part, they're still about to switch the value to off.

Agreed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Group Affects the Group Block [Feature] Block Style Variations Issues or PRs that are related to the style variations for blocks [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

4 participants