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

[WIP] Chore (UI): Resizable component #11049

Draft
wants to merge 7 commits into
base: feat/db
Choose a base branch
from

Conversation

sprocketc
Copy link
Collaborator

@sprocketc sprocketc commented Feb 26, 2024

The goal here is to replace our custom resizable panels with https://ui.shadcn.com/docs/components/resizable

A few notes about this

  • The shadcn component is based on react-resizable-panels
  • It doesn't support pixels, so we might have to use a workaround for the left sidebar (setting a css min-width in pixels kind of works)
  • It uses localStorage to persist layouts by default. Although we can maintain the current persisting functionality, there is no reason to do that (see next point)
  • We cannot set the width reactively. There is only an imperative API currently exposed
  • The auto-collapsible panels cannot be combined with conditional panels (the collapsed panel is part of the dom but its width or height is zero), and conditional panels are required in our case because of the previous point, if we also want to avoid maintaining and passing around a reference of each panel

@github-actions github-actions bot added the :type/dev This label is used to indicate that an issue or PR is related to development tasks or changes that label Feb 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:type/dev This label is used to indicate that an issue or PR is related to development tasks or changes that
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant