Skip to content

ENH: Restucture menu#477

Merged
nourinmohd merged 4 commits into
equinor:mainfrom
nourinmohd:467_restructure_menu
Jul 9, 2026
Merged

ENH: Restucture menu#477
nourinmohd merged 4 commits into
equinor:mainfrom
nourinmohd:467_restructure_menu

Conversation

@nourinmohd

Copy link
Copy Markdown
Contributor

Resolves #467

Restructured the Project sidebar navigation so RMS and Mappings are grouped under Project, each with Overview, Stratigraphy, and Wellbores subpages.

  • Added nested routes for:
    /project/rms/overview
    /project/rms/stratigraphy
    /project/rms/wellbores
    /project/mappings/overview
    /project/mappings/stratigraphy
    /project/mappings/wellbores

  • Moved the existing RMS stratigraphy block from the RMS overview page to the new RMS Stratigraphy page.

  • Moved the existing Project Stratigraphy page behavior to the new Mappings Stratigraphy route.

  • Added placeholder pages for RMS Overview, RMS Wellbores, Mappings Overview, and Mappings Wellbores where future content will be added.

  • Kept old route entry points working by redirecting:
    -/project/rms to /project/rms/overview

    • /project/stratigraphy to /project/mappings/stratigraphy
  • Updated task-list links to point to the new route structure.

  • Updated/generated the TanStack Router route tree.

  • Adjusted the sidebar styling so RMS and Mappings appear as nested groups inside Project rather than separate top-level sidebar sections.

Checklist

  • Tests added (if not, comment why)
  • Test coverage equal or up from main (run pytest with --cov=src/ --cov-report term-missing)
  • If not squash merging, every commit passes tests
  • Appropriate commit prefix and precise commit message used
  • All debug prints and unnecessary comments removed
  • Docstrings are correct and updated
  • Documentation is updated, if necessary
  • Latest main rebased/merged into branch
  • Added comments on this PR where appropriate to help reviewers
  • Moved issue status on project board
  • Checked the boxes in this checklist ✅

@nourinmohd
nourinmohd marked this pull request as ready for review July 7, 2026 08:42
@nourinmohd

Copy link
Copy Markdown
Contributor Author

Just for quick look without having to jump start fmu-settings app.

  • Nested version (the one in PR)
Screenshot 2026-07-07 at 10 42 26
  • Non-Nested version with the folder icon ( just to see how it looks)
Screenshot 2026-07-07 at 10 14 19
  • Blank icon and non-nested version
image

@nourinmohd

Copy link
Copy Markdown
Contributor Author

Update from second commit :

Changed Sidebar.style.ts, removing the EDS accordion borders and manually padding nested links.

Changed Sidebar.tsx so nested RMS/Mappings groups render as real EdsSideBar.Accordions with a typed blank icon, while preserving the existing project routes and Masterdata/History items.

@GibranAlfa GibranAlfa left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make RMS and Mappings work the same way
Small thing: RMS is set up as a nested route with a parent, but Mappings isn't, its pages are just floating at the top level. Would be nice to make them match. If rms.tsx becomes a simple wrapper (container + <Outlet/>) and we add a matching mappings.tsx, both groups behave the same and /project/mappings gets a real landing page like RMS does. Like this in routes/project/mappings.tsx:

import { createFileRoute, Outlet } from "@tanstack/react-router";

import { PageContainerNotWidthConstrained } from "#styles/common";

export const Route = createFileRoute("/project/mappings")({
  component: RouteComponent,
});

function RouteComponent() {
  return (
    <PageContainerNotWidthConstrained>
      <Outlet />
    </PageContainerNotWidthConstrained>
  );
}

routes/project/rms.tsx should be edited to be similar like this.

Simpler redirect
For sending /project/rms to /project/rms/overview, instead of checking the pathname in the parent, we could just add a tiny index.tsx in routes/project/mappings that does <Navigate to="…/overview" replace />, same thing you already used in stratigraphy.tsx. It's cleaner and won't break if there's a trailing slash. This is similar with how this codebase is structured now. Example for routes/project/mappings/index.tsx

import { createFileRoute, Navigate } from "@tanstack/react-router";

export const Route = createFileRoute("/project/mappings/")({
  component: () => <Navigate to="/project/mappings/overview" replace />,
});

then it should be similar for routes/project/rms/index.tsx

Headers repeat the section name
I know we discussed about this, but I think it's cleaner to not repeat the "RMS" and "Mappings" in the header because the sidebar already tells you which section you're in. Could we just have each page say "Overview", "Stratigraphy", etc.?

Redundant stratigraphy headings on the RMS Stratigraphy page
The Stratigraphy component has its own heading, so now that it's on its own page you get the title twice. Since it used to sit inside RMS Overview, we can just drop the heading inside the component and keep the page one.

Split the RMS checklist task
"Set RMS project and stratigraphy" only links to Overview, but stratigraphy has its own page now. Might be clearer to make it two tasks: "Set RMS project" (Overview) and "Set RMS stratigraphy" (Stratigraphy), and each one should redirect you to the correct page.

Empty pages looks broken
The placeholder pages say "No … content available yet", which kind of looks broken. Could we switch them to a "coming soon" message so it's obviously on purpose?

Add comments on the EDS Accordion hacks
We should add comments on the NestedAccordion styles (why we remove the borders and indent) and the blankIcon (EDS requires you to pass an icon, and a blank one keeps the labels lined up).

Comment thread frontend/src/routes/project/mappings.tsx Outdated
Comment thread frontend/src/routes/project/rms.tsx Outdated
Comment thread frontend/src/routes/project/mappings/overview.tsx Outdated
Comment thread frontend/src/routes/project/mappings/wellbores.tsx Outdated
Comment thread frontend/src/routes/project/rms/overview.tsx Outdated
Comment thread frontend/src/routes/project/rms/wellbores.tsx Outdated
Comment thread frontend/src/routes/project/stratigraphy.tsx Outdated
@nourinmohd
nourinmohd force-pushed the 467_restructure_menu branch 2 times, most recently from 9e1b4d6 to 47524f1 Compare July 8, 2026 18:19
@nourinmohd
nourinmohd force-pushed the 467_restructure_menu branch from 47524f1 to 7f1f051 Compare July 8, 2026 18:20
@nourinmohd
nourinmohd requested a review from GibranAlfa July 8, 2026 18:22

@GibranAlfa GibranAlfa left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very nice restructuring!

@nourinmohd
nourinmohd merged commit ad3a6fa into equinor:main Jul 9, 2026
10 checks passed
@nourinmohd
nourinmohd deleted the 467_restructure_menu branch July 9, 2026 07:33
@slangeveld

slangeveld commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

@joargr should probably also review this when he is back as he had some thoughts on how he wanted this, but he can do that in hindsight when he is back

@GibranAlfa

Copy link
Copy Markdown
Collaborator

for reference this is how it looks now:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Restructure menu bar to have subpages for stratigraphy and wellbores

3 participants