Skip to content

refactor: build the dashboard sidebar on frappe-ui's Sidebar - #708

Merged
surajshetty3416 merged 5 commits into
frappe:developfrom
surajshetty3416:sidebar-frappe-ui
Aug 3, 2026
Merged

refactor: build the dashboard sidebar on frappe-ui's Sidebar#708
surajshetty3416 merged 5 commits into
frappe:developfrom
surajshetty3416:sidebar-frappe-ui

Conversation

@surajshetty3416

Copy link
Copy Markdown
Member

Replaces the hand-rolled dashboard sidebar with frappe-ui's Sidebar, using the composition API (Sidebar + SidebarHeader + SidebarItem + SidebarLabel).

What the component now owns: the app-switcher header, row layout and active state, collapse behaviour (auto below sm, where the old one just disappeared under lg), and the trailing suffix zone — which is what a folder's menu needs, since a Dropdown cannot be nested inside the row's button.

No styling of our own is layered on top; the sidebar renders bare as the component defines it.

One extra: the header takes its logo as a prop, and only src attributes in templates get rewritten by the bundler, so the logo is imported (with a *.png module declaration) instead of passed as a literal path.

Verified on the dashboard, 13/13: 240px width, full height, All Pages / Settings / Folders label / folder rows / version footer all present, clicking a folder makes it active and filters the grid, the active folder exposes its options menu, All Pages returns to active, the app menu opens with New Page / Toggle Theme / Help, and the logo resolves and loads.

Drops the hand-rolled markup for Sidebar, SidebarHeader, SidebarItem and
SidebarLabel: the app switcher, active state, collapse behaviour and the
suffix zone that holds a folder's options menu all come from the
component now.

A png import declaration comes with it, since the header takes its logo
as a prop and only template src attributes get resolved by the bundler.
@greptile-apps

greptile-apps Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains within the eligible follow-up-review scope.

Reviews (4): Last reviewed commit: "fix: add padding to SidebarHeader in Das..." | Re-trigger Greptile

Rows were bleeding to both edges: the composition API leaves the scroll
region to the app, and the component's own example pads it so an active
row's shadow is not clipped. Use ScrollArea the same way, and shape the
new-folder button like the example's.
They sat flush against each other, so a hovered row ran straight into the
active one above it.
The section label sat right under the last nav row, and without a right
border the sidebar ran into the content area.
@codecov

codecov Bot commented Aug 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 59.59%. Comparing base (c60696f) to head (8aa8634).
⚠️ Report is 3 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop     #708   +/-   ##
========================================
  Coverage    59.59%   59.59%           
========================================
  Files           35       35           
  Lines         4413     4413           
========================================
  Hits          2630     2630           
  Misses        1783     1783           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@surajshetty3416
surajshetty3416 merged commit 672da75 into frappe:develop Aug 3, 2026
10 of 11 checks passed
@surajshetty3416
surajshetty3416 deleted the sidebar-frappe-ui branch August 3, 2026 08:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant