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

Position "sticky" - Gutenberg 15.1.0 killed sidebar option #47892

Closed
burnuser opened this issue Feb 8, 2023 · 9 comments · Fixed by #49321
Closed

Position "sticky" - Gutenberg 15.1.0 killed sidebar option #47892

burnuser opened this issue Feb 8, 2023 · 9 comments · Fixed by #49321
Labels
[Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi Needs Design Feedback Needs general design feedback.

Comments

@burnuser
Copy link

burnuser commented Feb 8, 2023

Description

Position "sticky" has two main usages in classic themes:
A) Header / Site-Menu
B) (Navigation) Widgets like Table of Content in Sidebars

The new sticky feature worked for both positions with Gutenberg 15.0.1
=> A) Grouping the Header
=> B) Columns: Content in first column, Group (= Widget) in second column (= sidebar)

But In Gutenberg 15.1.0 the "sticky" feature was only visible in root blocks => no longer "sticky" feature within columns (= sidebars)

Step-by-step reproduction instructions

  1. site-editor: add 2 columns for content and sidebar
  2. add group in "sidebar"
  3. Try to add "sticky" feature to sidebar group

Screenshots, screen recording, code snippet

No response

Environment info

WP 6.1.1
Gutenberg 15.1.0

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@ghost
Copy link

ghost commented Feb 8, 2023

I agree with the issue. Try to reproduce Twitter sticky sidebar and it isn't possible when the layout is made by Columns instead of groups side by side. It used to be possible in Gutenberg 15.0 to create this kind of sticky layout.

@Mamaduka
Copy link
Member

Mamaduka commented Feb 9, 2023

cc @andrewserong

@andrewserong
Copy link
Contributor

Thanks for the ping! I love the idea of exposing the controls in a non-root position, however feedback on the position controls that landed in 15.0 was that it would confusing for users to have access at the non-root level, so #47334 landed to only show the controls at the root level. The thinking there was that since this feature is slated for inclusion in WordPress 6.2, it would be best to start out with the feature conservatively in a way that will (hopefully) reduce confusion, and then iteratively add support back in within the Gutenberg plugin where we can experiment with exposing position controls more broadly.

Before introducing non-root sticky positioning again, it'd be good to come up with a solution to better communicate in the UI how sticky positioning works (that it locks to the next parent). One exploration for this was in #47207 which looked at adding a warning label when the block is in a non-root position. This area probably needs a bit more design exploration, so I'll add the needs design feedback label to this one.

Just copying in some folks who were involved in the discussions that settled on the scope for WordPress 6.2: @richtabor @mtias @apeatling @tellthemachines @jameskoster @jasmussen

@masteradhoc
Copy link
Contributor

@andrewserong any update on this? Wanted to use it but dont see a position option available for me.

@andrewserong
Copy link
Contributor

andrewserong commented May 29, 2023

@andrewserong any update on this? Wanted to use it but dont see a position option available for me.

There are still some nuances to resolve for this feature, but there's a WIP PR being explored over in #49321 that I'm chipping away at.

@phil-sola
Copy link

Is their any update on this? I'm amazed how quickly stuff breaks and changes still in the editor. I built a site last week with position sticky on a group block (inside a reusable block). Starting a new site today and after hitting my head against a wall, realise that the position sticky dissapears if it's not a root block. This doesn't cater for reusable blocks at all and many other use cases.

Sooner this gets added back in the better

@mtias
Copy link
Member

mtias commented May 31, 2023

We are working on adding it back, it was only pulled from the plugin based on the UI not being super clear. Features that make it into the plugin are generally within the spirit of gathering as much early testing and feedback as possible, both on whether something is actually useful (so thanks for expressing the desire!) and that it performs its function as clearly as possible.

@marbaque
Copy link

Is there a way to override this behavior, by css or js, If you really really need to add sticky position to a non root element?

@sebastopolys
Copy link

sebastopolys commented Oct 30, 2024

I figured out how to add a sticky sidebar, on a two column column bolck.

Blocks organized in following way:

_Columns
_ _Column
_ _ _Group
_ _ _ _ Heading
_ _ _ _ (more sidebar bolcks)
_ _ Column
_ _ _Group
_ _ _ _(Content blocks)

If I select "sticky" on the 1st column group, it does work. It saty sticky when scrolling, while second column does not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi Needs Design Feedback Needs general design feedback.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants