https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43576

            Bug ID: 43576
           Summary: Add icon-only collapsed mode to staff interface
                    sidebar menus
   Initiative type: ---
        Sponsorship ---
            status:
           Product: Koha
           Version: Main
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P5 - low
         Component: Staff interface
          Assignee: [email protected]
          Reporter: [email protected]
        QA Contact: [email protected]
                CC: [email protected]
  Target Milestone: ---

This patch enhances the sidebar collapse feature added in bug 42322. Currently,
collapsing the sidebar hides all menu links, leaving only the toggle button.
This wastes the remaining horizontal space and removes quick access to the
menu's options entirely.

This patch:
- Moves the collapse toggle button inside the grey sidebar background, so it
visually reads as part of the menu it controls, rather than a separate floating
button.
- Introduces an opt-in icon-collapse mode: once a sidebar menu is enhanced with
icons, collapsing it shows a narrow icon-only rail (with hover tooltips and the
current page still highlighted) instead of hiding everything.
- Persists the collapsed/expanded state across page loads using localStorage.
- Converts the following sidebar menus to icon-collapse mode: Circulation
(patron-context menu and module nav), Cataloguing, Tools, System preferences,
Reports, Bibliographic record view, Serials, Labels, Point of sale, Guided
reports view, and the Vue-driven Vendor, Acquisitions and Administration menus.

Menus not yet converted (facets/tags/search-filter sidebars, and the
ERM/ILL/Preservation/SIP2 Vue module navigation) keep today's collapse-to-blank
behaviour and can be converted in follow-up patches using the same pattern.

Test plan:
1. Apply the patch and rebuild the staff interface assets (yarn build).
2. Log in to the staff interface and go to a patron's detail page (Patrons >
search a patron > Details).
3. Confirm the toggle button now sits flush inside the grey sidebar background
rather than floating as a separate bordered button.
4. Click the toggle to collapse the sidebar. Confirm the circulation patron
menu collapses to a narrow icon-only rail, each icon shows a tooltip on hover,
and the current page's icon is still highlighted.
5. Reload the page. Confirm the sidebar remains collapsed (state is remembered
across page loads).
6. Expand the sidebar again and visit a page using a menu that has NOT been
converted yet (e.g. a facets/filter sidebar). Collapse it and confirm it still
collapses to a blank rail as before (no regression).
7. Repeat steps 2-5 for a sample of the converted menus: Cataloguing (e.g.
Inventory), Tools, Administration > System preferences, Reports, a
bibliographic record's Detail page, Serials, Label creator, Point of sale,
Guided reports.
8. Repeat for the Vue-driven menus: Acquisitions home, a vendor's detail page,
and Administration (e.g. Authorized values). Confirm icons show, collapse
works, and the active page is still highlighted when collapsed.
9. Run the Sidebar_spec.ts Cypress test and confirm it still passes.
10. Sign off.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to