parse-dashboard icon indicating copy to clipboard operation
parse-dashboard copied to clipboard

feat: Make sidebar width adjustable

Open mtrezza opened this issue 5 months ago β€’ 6 comments

Summary

  • add global CSS variable for sidebar width
  • adjust layout styles to use --sidebar-width
  • add resize handle and logic to sidebar
  • install dependencies to run tests

Testing

  • npm test (fails: Cannot read properties of undefined (reading 'statusCode'))

https://chatgpt.com/codex/tasks/task_e_686bb3991f68832dbaacc10d547636ca

Summary by CodeRabbit

  • New Features

    • Added the ability for users to resize the sidebar by dragging a handle, with the chosen width saved for future sessions.
  • Style

    • Updated various interface elements (sidebar, toolbar, footers, content areas) to dynamically adjust their position and size based on the sidebar’s width.
    • Introduced a CSS variable for sidebar width, enabling consistent and flexible layout adjustments throughout the app.

mtrezza avatar Jul 07 '25 11:07 mtrezza

πŸš€ Thanks for opening this pull request!

The label codex cannot be used here.

πŸ“ Walkthrough

Walkthrough

The changes introduce a user-resizable sidebar by updating the Sidebar component to support drag-based resizing and synchronizing its width with a CSS custom property (--sidebar-width). Multiple SCSS files are updated to use this variable instead of a fixed 300px value, enabling dynamic layout adjustments across the application. A default value is set in the global stylesheet.

Changes

File(s) Change Summary
src/components/Sidebar/Sidebar.react.js Added drag-to-resize functionality for the sidebar, syncing width with a CSS variable and localStorage.
src/components/Sidebar/Sidebar.scss Updated widths to use --sidebar-width variable; added styles for a draggable resize handle.
src/stylesheets/base.scss Defined global CSS variable --sidebar-width: 300px in the :root selector.
src/components/FlowFooter/FlowFooter.scss
src/components/Toolbar/Toolbar.scss
Replaced fixed left: 300px with left: var(--sidebar-width, 300px) for dynamic positioning.
src/dashboard/Dashboard.scss
src/parse-interface-guide/PIG.scss
Changed fixed margin-left: 300px to margin-left: var(--sidebar-width, 300px) for dynamic content offset.
src/dashboard/Data/Browser/Browser.scss
src/dashboard/Data/Browser/BrowserFooter.scss
src/dashboard/TableView.scss
Replaced fixed sidebar-related values (e.g., left: 300px, width: calc(100% - 300px)) with CSS variable --sidebar-width.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Sidebar
    participant CSS
    participant LocalStorage

    User->>Sidebar: Mouse down on resize handle
    Sidebar->>Sidebar: startResize()
    Sidebar->>User: Track mousemove events
    loop While dragging
        User->>Sidebar: Mouse move
        Sidebar->>Sidebar: Update width state (min 200px)
        Sidebar->>CSS: Update --sidebar-width property
    end
    User->>Sidebar: Mouse up
    Sidebar->>LocalStorage: Save new width
    Sidebar->>Sidebar: Remove event listeners

πŸ“œ Recent review details

Configuration used: CodeRabbit UI Review profile: CHILL Plan: Pro

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between ef2f3d3a9101dec14642d5da20a198382b52292c and bff87470f75a4d8e49ebb8ce02081456af30cd97.

πŸ“’ Files selected for processing (1)
  • src/components/Sidebar/Sidebar.scss (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/components/Sidebar/Sidebar.scss
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
  • GitHub Check: Node 22
  • GitHub Check: Node 18
  • GitHub Check: Node 20
  • GitHub Check: Docker linux/amd64
  • GitHub Check: Lint

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❀️ Share
πŸͺ§ Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai auto-generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

coderabbitai[bot] avatar Jul 07 '25 11:07 coderabbitai[bot]

:tada: Snyk checks have passed. No issues have been found so far.

:white_check_mark: security/snyk check is complete. No issues have been found. (View Details)

parseplatformorg avatar Jul 07 '25 11:07 parseplatformorg

Uffizzi Ephemeral Environment deployment-64527

:watch: Updated Jul 07, 2025, 13:51 UTC

:cloud: https://app.uffizzi.com/github.com/parse-community/parse-dashboard/pull/2872

:page_facing_up: View Application Logs etc.

What is Uffizzi? Learn more

uffizzi-cloud[bot] avatar Jul 07 '25 12:07 uffizzi-cloud[bot]

Resizing works, but it needs further adjustment for min and max width of sidebar. Leaving this open for someone to pick up.

mtrezza avatar Jul 07 '25 13:07 mtrezza