Skip to content

Issue/3872 reorder gui pane#202

Merged
engbergandreas merged 5 commits intomasterfrom
issue/3872-reorder-gui-pane
Mar 18, 2026
Merged

Issue/3872 reorder gui pane#202
engbergandreas merged 5 commits intomasterfrom
issue/3872-reorder-gui-pane

Conversation

@engbergandreas
Copy link
Member

@engbergandreas engbergandreas commented Mar 10, 2026

This PR updates the GUI panels order and adds sub menus to Window, it also separates View -> Reordering to not affect the Window layout.

fixes OpenSpace/OpenSpace#3872

It also partially fixes json layout to automatically open panels that are defined as isOpen = true. However, this only works if you at runtime load a config file. I was going to fix it for startup as well but the hole went deeper than expected so leaving that for another PR

image

New version:

menu-ordering-new.mp4

Old version:

menu-ordering-old.mp4

Adds grouping to menu items and submenus for the `Windows` menu, remove advanced visibility option, remove non-working height limiting for `TopBarMenuWrapper` since that caused bugs with submenus. Fix typo
Split menuItemConfig into a config and order part for easier handling
@engbergandreas engbergandreas requested review from WeirdRubberDuck and ylvaselling and removed request for ylvaselling March 11, 2026 12:13
Copy link
Collaborator

@WeirdRubberDuck WeirdRubberDuck left a comment

Choose a reason for hiding this comment

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

Looks good to me!

// the offset is computed from the panels top left corner to the bottom right corner of the main window
defaultVisible: boolean; // Whether this panel is visible in the toolbar on startup
visible?: boolean; // TODO: investigate whether this is needed (as of 2024-10-23 its not being used)
advanced?: boolean; // Whether this panel is considered advanced and should only be shown to users with a high enough visibility level
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why is this removed?

Copy link
Member Author

Choose a reason for hiding this comment

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

We discussed during the meeting that we would remove visibility for panels so that all are available all the time.

Atleast that is was my understanding, @WeirdRubberDuck, didn't we also talk about this?

Copy link
Collaborator

Choose a reason for hiding this comment

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

That's how I remember it too 🤔

// ['HelpMenu'], so spreading it into deps avoids the referential instability of
// passing a new array each render
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [menuItems, ...(includeGroups ?? [])]);
Copy link
Collaborator

Choose a reason for hiding this comment

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

This doesn't actually seem make any difference, placing const groups = (includeGroups ?? menuItemGroups) as readonly Included[]; outside the useMemo gives me as many renders as having it like this

@engbergandreas engbergandreas merged commit e72cd8d into master Mar 18, 2026
1 check passed
@engbergandreas engbergandreas deleted the issue/3872-reorder-gui-pane branch March 18, 2026 07:46
WeirdRubberDuck added a commit to OpenSpace/OpenSpace that referenced this pull request Mar 18, 2026
* Windown panel reordering OpenSpace/OpenSpace-WebGui#202
* Fixes #3914
* QR code emnu modal to open GUI in browser: OpenSpace/OpenSpace-WebGui#198
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.

Reorder GUI panels

3 participants