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] ThemedSiderV2 Persist Collapsed State #6508

Open
aress31 opened this issue Nov 19, 2024 · 4 comments
Open

[FEAT] ThemedSiderV2 Persist Collapsed State #6508

aress31 opened this issue Nov 19, 2024 · 4 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers up for grabs

Comments

@aress31
Copy link

aress31 commented Nov 19, 2024

Is your feature request related to a problem? Please describe.

Would be nice to persist out of the box the collapsed state, or add an option to do so, maybe a "peristCollapsed" boolean. This would avoid having to write extra code for this important UX feature.

Describe alternatives you've considered

No response

Additional context

No response

Describe the thing to improve

See above.

@aress31 aress31 added the enhancement New feature or request label Nov 19, 2024
@BatuhanW BatuhanW self-assigned this Nov 20, 2024
@BatuhanW
Copy link
Member

@aress31 thanks for the issue. We've discussed this one and decided to accept onSiderCollapsed function to ThemedLayoutV2 component.

Then onSiderCollapsed will be passed to ThemedLayoutContextProvider

Here, we should replace existing setSiderCollapsed with a wrapper, where we call setSiderCollapsed state action and also onSiderCollapsed coming from user.

Here is a pseudo implementation:
Screenshot 2024-11-20 at 14 16 42

This will allow users to persist their collapsed state into localstorage in onSiderCollapsed method. And then users can read this from localStorage and pass initial value initialSiderCollapsed from here.

We need to do these changes in ThemedLayoutV2 component for

  • Ant Design
  • Material UI
  • Mantine
  • Chakra UI

They all have almost exact same code, so it should be straightforward to implement.

We are open to contributions for this one.

@wannabecsguy2
Copy link

Hey @BatuhanW, can I work on this?

@OmkarBansod02
Copy link

Hey @BatuhanW, I am up for this.

@BatuhanW
Copy link
Member

@wannabecsguy2 Assigning issue to you since you were first to ask 🚀

@OmkarBansod02 If we don't hear back from @wannabecsguy2 you can take this next. We also have other issues that you may want to work on, you can check up for grabs labelled issues ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers up for grabs
Projects
None yet
Development

No branches or pull requests

4 participants