fix: align sidebar controls, fix nav padding jump, add theme toggle - #2433
fix: align sidebar controls, fix nav padding jump, add theme toggle#2433aaniya22 wants to merge 6 commits into
Conversation
Resolves formatting-hygiene CI check failure (git diff --check).
- Sidebar.tsx now consumes SidebarContext (useSidebar) instead of
local useState, fixing the corrupted/non-boolean localStorage bug
(JSON.parse crash and '[object Object]' aria-expanded value) and
enabling other components to react to sidebar width changes,
resolving the nav padding jump.
- Toggle button now has a proper dynamic aria-label ('Collapse
sidebar' / 'Expand sidebar') instead of relying on title only.
- Added missing focus-ring classes to the toggle button.
Fixes 8 failing Sidebar.test.tsx tests surfaced by the
formatting-hygiene / frontend-run-checks CI jobs.
utksh1
left a comment
There was a problem hiding this comment.
Request changes: this patch removes the existing Sign Out action and Workflows navigation while fixing sidebar layout/theme controls. Those are unrelated functional regressions. Restore both existing actions, keep the layout change focused, and add a sidebar regression test for the retained navigation and authentication actions.
Restored the Sign Out action and Workflows nav link that were accidentally dropped in the layout refactor — both now match main's original behavior. Added regression tests covering: Workflows/Reports/Settings nav retained, Sign Out visibility tied to auth state, signOut() firing on click, and the theme toggle still present alongside them. Layout/theme changes are otherwise untouched. |
…actor, add regression tests
Description
Fixes multiple sidebar alignment/consistency issues:
py-2.5→py-3) and collapsed states so icons no longer visually shift position when the sidebar is toggled."Registry"isExpanded— missing space) that was silently breaking props.useTheme()context. Both controls now sit in a consistently aligned, evenly spaced row/column depending on expanded state.Related Issues
Fixes #2362
Type of Change
How Has This Been Tested?
Ran
npm run dev, toggled the sidebar between expanded/collapsed states and confirmed nav icons no longer jump. Clicked the new theme toggle and confirmed the icon swaps between moon/sun and the theme context updates correctly. Tested in Chrome.Checklist