(fix) O3-4463: Hide sidebar on wider workspaces to fix multi-section form layout#700
(fix) O3-4463: Hide sidebar on wider workspaces to fix multi-section form layout#700praneeth622 wants to merge 7 commits into
Conversation
…orm spacing PR openmrs#461 changed the sidebar visibility to show on all workspaces except narrow. This caused a layout issue on wider workspaces where the sidebar and form content compete for space. Adding wider to the too-narrow check restores the intended behavior: sidebar only shows on extra-wide and ultra-wide workspaces where there is sufficient room.
There was a problem hiding this comment.
Pull request overview
Adjusts the FormEngine layout rules to prevent the multi-section sidebar from rendering on wider workspaces, addressing a regression where the sidebar and form content competed for space.
Changes:
- Treat
widerworkspaces as “too narrow” for the multi-section sidebar. - As a result, multi-page forms on
widernow use bottom navigation controls instead of the left sidebar.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Could you please take a look at this PR when you get a chance? Would really appreciate your review and approval for merge Thanks! |
|
Hi @NethmiRodrigo , gentle ping on this PR. It addresses O3-4463 (Blocker priority, targeted for RefApp 3.8.0) which causes a layout/spacing issue with multi-section forms using left navigation. The fix hides the sidebar on wider workspaces to prevent the layout from breaking. Happy to address any feedback or make changes. Would you (or @jayasanka-sack / @denniskigen ) be able to take a look? Thank you! |
|
This PR addresses BLOCKER-priority O3-4463 (reported by @gracepotma) and has been awaiting review for 5 weeks. I've now addressed Copilot's feedback, renamed the memoized flag from Test added in No change to the sidebar visibility logic itself only rename + new test coverage. Requesting review from @dkayiwa @ibacher @samuelmale happy to jump on a call if there are design concerns about hiding the sidebar on wider workspaces vs the earlier behavior |
Requirements
Summary
PR #461 (O3-4410) changed the sidebar visibility logic so that the sidebar shows on all workspace sizes except
narrow. This caused a layout regression onwiderworkspaces — the sidebar (180px) and form content compete for space, resulting in a cramped/squished layout for multi-section forms.This fix adds
'wider'to theisFormWorkspaceTooNarrowcheck, so the sidebar only renders onextra-wideandultra-wideworkspaces where there is sufficient room. Onnarrowandwiderworkspaces, multi-section forms use bottom navigation buttons instead.narrowwiderextra-wideultra-wideScreenshots
Before (bug — sidebar cramped on
widerworkspace)After (fix — sidebar hidden on
wider, bottom buttons used instead)Related Issue
https://openmrs.atlassian.net/browse/O3-4463
Other
src/form-engine.component.tsx