discourse/app/assets/javascripts/admin/addon/services
Kris 1afdb5df7b
UX: always close hamburger menu when navigating to admin (#32651)
When we create a custom homepage using the `custom_homepage` modifier we
can hide the sidebar using `{{hideApplicationSidebar}}` in the template
— this forces the hamburger dropdown to appear in the header.

This creates an issue when navigating from the custom homepage to the
admin area, because when the route transitions the hamburger menu isn't
closed... and at this point, it cannot be closed at all. The
`clickOutside` listener from the open menu is calling
`toggleNavigation`, which is now the sidebar... so instead of closing
the hamburger menu, it toggles the sidebar and prevents other elements
from being clicked (because the `clickOuside` listener is only removed
when the hamburger menu is destroyed).


![image](https://github.com/user-attachments/assets/b6893513-6f0e-4f5b-8d47-6b63916c0a29)

This change ensures that when the admin sidebar is forced, the hamburger
menu will be hidden.
2025-05-08 16:08:11 -04:00
..
admin-badges.js DEV: Add Settings tab to admin Badges page (#32251) 2025-04-21 09:41:29 +08:00
admin-emojis.js DEV: Move admin config pages out of /customize/ sub-route (#30511) 2025-01-02 09:13:11 +10:00
admin-plugin-nav-manager.js FIX: remove admin_sidebar_enabled_groups setting (#31693) 2025-03-11 11:41:38 +11:00
admin-search-data-source.js FIX: prioritize pages over other categories in admin search (#32614) 2025-05-08 07:48:04 +10:00
admin-sidebar-state-manager.js UX: always close hamburger menu when navigating to admin (#32651) 2025-05-08 16:08:11 -04:00
admin-tools.js FEATURE: Sync Reviewable Status (#31901) 2025-03-24 14:27:18 +11:00
admin-user-fields.js DEV: Modernize admin user fields (#29843) 2024-11-25 11:54:43 +08:00
site-setting-change-tracker.js FIX: bugs with refresh page after save fonts (#32282) 2025-04-15 12:02:28 +08:00