feat(menu): reorganize sidebar with banded ordering and grouped headers - #97
Merged
Conversation
Adds a `group` field on `MenuItem` so the sidebar clusters items under "Content", "Administration", and "System" headers. Reorders module `MENU_ORDER` values into stable bands (10–99 content, 100–199 admin, 200+ system) and resolves two pre-existing order conflicts (settings vs. users at 30, datasets vs. file_storage at 40).
…ayer-4fbac3 # Conflicts: # modules/datasets/datasets/constants.py # modules/datasets/datasets/module.py # modules/products/products/module.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Reorganizes the sidebar so installed modules cluster into coherent visual groups instead of an interleaved flat list.
MENU_ORDER— adopted stable ranges (10–99content,100–199administration,200+system) and resolved two pre-existing order conflicts (settings vs. users at 30, datasets vs. file_storage at 40 — both moot post-merge but the framework-level convention now stands for any module that gets added back).groupfield onMenuItem— new optionalgroup: str = ""ships through the existingget_for_user()payload to the frontend.SidebarLayoutclusters consecutive items bygroup, prints an uppercase muted heading per non-empty group, and leaves ungrouped items (Dashboard) flat at the top. Each group's position is set by the lowest-orderitem that joins it, so backend-side reordering Just Works.Content→ File Storage (and would cover Products/Datasets if reintroduced)Administration→ Users, Feature Flags, Background TasksSystem→ Settingsmake new-moduleemitsgroup="Content"by default.This branch was developed before upstream
#96removed the products and datasets modules; the merge accepted those deletions, so the order/group changes for those two modules are gone but the framework-level mechanism (and assignments for the surviving modules) is intact.Test plan
uv run pytest -q— 945 passeduv run python -m simple_module_core(sm doctor) — cleanuv run ruff format --check . && uv run ruff check . && uv run ty check— all greenmake ci-js-typecheck— all workspaces greenmake dev(skipped — no UI session in this run; reviewer to verify if desired)