mirror of
https://github.com/supabase/supabase.git
synced 2026-10-15 06:09:08 +03:00
## I have read the [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) file. YES ## What kind of change does this PR introduce? Bug fix. One liner. ## What is the current behavior? The resizable product menu to the left on drag responds with a slow drag animation. This is inconsistent with other resizable drag animations.  ## What is the new behavior? the drag animation is consistent and snappy!  ## Additional context As far as I can tell the transition animation on the `ResizablePanel` is for the open and closing of the menu and not for resizing. It looks like a just overly broad transition target (`transition-all`). The react-resizable-panels seems to use flex grow to do the animation. The `transition-all` which is currently on the `ResizablePanel` component is causing the flex grow to animate and this in turn is causing some minor layout thrashing. <img width="406" height="579" alt="Screenshot 2026-01-21 at 8 40 24 PM" src="https://github.com/user-attachments/assets/9282731a-f1d6-411d-9092-25f0bddff29f" /> After this update the layout thrashing from flex-grow is fixed. <img width="539" height="520" alt="Screenshot 2026-01-21 at 6 38 00 PM" src="https://github.com/user-attachments/assets/dc2b2e28-8298-400e-8f19-77edaf6b9884" /> Related to [this](https://github.com/supabase/supabase/issues/27801) issue. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Style** * Refined sidebar animation to animate width-related properties only, delivering smoother and more responsive open/close transitions without changing timing. <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai -->
Writing components
Where to create your components
- For components that declare the general structure and layout of a page:
/components/layouts/xxx
- For components that are tightly coupled to a specific interface:
/components/interfaces/xxx
- For components that are meant to be reusable across multiple pages:
/components/ui/xxx
- Note: We're gradually moving files out of the
to-be-cleanedfolder into the respective folders as we refactor
Component structure
- If a component has constants and utility methods that are tightly coupled to itself, keep them close to the component and enclose them in a folder with an
index.tsxas an entry point - Otherwise it can just be a file on its own
- For example:
-
components/ui - SampleComponentA - SampleComponentA.tsx - SampleComponentA.constants.ts - SampleComponentA.utils.ts - SampleComponentA.types.ts - index.ts - SampleComponentB.tsx
-
Template for building components
// Declare the prop types of your component
interface ComponentAProps {
sampleProp: string
}
// Name your component accordingly
const ComponentA = ({ sampleProp }: ComponentAProps) => {
return <div>ComponentA: {sampleProp}</div>
}
export default ComponentA