Skip to content

feat: Implement modern layout with sliding panels#57

Merged
sandesh-sp merged 48 commits into
epic/modern-uifrom
feat/modern-layout
May 14, 2026
Merged

feat: Implement modern layout with sliding panels#57
sandesh-sp merged 48 commits into
epic/modern-uifrom
feat/modern-layout

Conversation

@sandesh-sp
Copy link
Copy Markdown
Collaborator

@sandesh-sp sandesh-sp commented Mar 31, 2026

Purpose

Implement modern layout with flexible panels in MMGIS

Proposed Changes

  • Update mission configuration fields to allow for modern layout
  • Use new PanelManager to handle the panel states
  • Create a new flow for rendering UI if mission is set to "modern" interface mode
  • Update configure page to expose some of the layout/panel settings

Issues

#48

Testing

  • Create new mission with "modern" dashboard mode
  • Update mission config to align with new configuration fields (check docs/MISSION_CONFIG_REFERENCE.md)
  • Experiment with available settings in User Interface tab (Modern Interface Config section) in mission configuration page
  • Change and upload mission configuration manually and see if things work as expected

…l management, state handling, and layout recalculation
@sandesh-sp sandesh-sp changed the base branch from development to feat/panel-manager March 31, 2026 22:01
@sandesh-sp sandesh-sp self-assigned this Apr 1, 2026
Copy link
Copy Markdown
Collaborator Author

@sandesh-sp sandesh-sp Apr 1, 2026

Choose a reason for hiding this comment

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

This file add tools to the panel. It needs further review/modification after we start working on tools. Please ignore this file for now.

@sandesh-sp sandesh-sp marked this pull request as draft April 10, 2026 15:13
Base automatically changed from feat/panel-manager to epic/modern-ui April 24, 2026 14:11
@sandesh-sp sandesh-sp marked this pull request as ready for review April 29, 2026 16:29
<Typography className={c.subtitle2}>
{`Choose the rendering engine for this mission's 2D map. This cannot be changed after the mission is created.`}
</Typography>
<FormControl className={c.planetDropdown} variant="filled">
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

planetDropdown ?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This is leftover from MMGIS. It only had planet dropdown as dropdown field so the class is named planetDropdown. We're using the same class name for all other dropdown fields. Will refactor it to something appropriate.

},
{
"name": "Modern Interface Config",
"components": [
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

this doesn't cover all the configurations available, what is the plan for supporting all the config and is it documented somewhere?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I've exposed most of the configurations needed for Panel Manager in another PR but it'll still need some work. We need to decide how much work we are going to put in the current Mission Config app vs our own tool builder.
One blocker is everything is static so I can't conditionally render fields based other fields. Say, only show deck.gl specific config fields if the rendering engine is deck.gl.

Comment on lines +9 to +27
:root {
--uswds-primary: #005ea2; /* primary blue */
--uswds-primary-dark: #1a4480;
--uswds-primary-light: #73b3e7;
--uswds-base-darker: #171c1e;
--uswds-base-dark: #3d4551;
--uswds-base-light: #f0f0f0;
--uswds-white: #ffffff;
--uswds-shadow: rgba(0, 0, 0, 0.15);

--modern-bg: #f8f9fa;
--modern-panel-bg: rgba(255, 255, 255, 0.95);
--modern-border: 1px solid rgba(0, 0, 0, 0.1);
--modern-radius: 8px;
--modern-glass-blur: blur(12px);
--z-index-panel-drag: 10;
--z-index-compact-center: 10;
--z-index-panel-icons: 2;
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

putting these under :root will make them leak into the host application if mmgis is embedded, scope it under some mmgis specific unique name or scope with a prefix like --mmgis-modern-…

renderStackedLayout: function (panel, body) {
const toolsArray = PanelManager_.getToolsForPanel(panel.id)
toolsArray.forEach(toolMetadata => {
body.append(this.createToolCard(toolMetadata.id, toolMetadata.name))
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

can you add a "TODO" to all of these lines that need to be changed later if they are not already changed in #80

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I've already made all the changes needed to render tools on #80
shouldn't be any TODOs

if (panel.tools && panel.tools.size > 0) {
const toolsArray = PanelManager_.getToolsForPanel(panel.id)
toolsArray.forEach(toolMetadata => {
const iconBtn = $(`<button class="ui-panel-icon-btn" title="${toolMetadata.name}" data-tool="${toolMetadata.id}"><span class="mdi mdi-view-dashboard"></span></button>`)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

don't we have toolMetadata.icon? if so, use that

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I've done that in my next PR

Comment thread docs/MISSION_CONFIG_REFERENCE.md Outdated
"panels": [
// Array of panel configurations
],
"": {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

key?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I've panel id which'll act as a key

* @param {string} preset - Preset name ('default', 'minimal', 'full')
* @returns {Object} - Dashboard config object
*/
export function getDefaultDashboardConfig(preset = 'default') {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

this doesn't seem to be called anywhere?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

created this as a preset configs which can be used as template in future or can be used to add missing config. it isn't used right now.

Comment thread src/essence/modern.js
this._registerPanels()

// Load and assign tools to panels based on configuration
const tools = this.configData?.tools || []
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

can this.configData ever be undefined? we've been using it like it exists above this line

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

No, this.configData should always be there. Using optional chaining only for additional safety check

Comment thread src/essence/LandingPage/LandingPage.js Outdated
const mode = config?.msv?.mode || 'classic'

if (mode === 'modern') {
modern.init(config, missions)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

this can throw an error based on modern.js:R109-R113 - but this doesn't catch or anything - user sees a frozen loading page but no errors (only on the console log). show the error to user

@slesaad
Copy link
Copy Markdown
Member

slesaad commented May 5, 2026

also why .js files?

@slesaad
Copy link
Copy Markdown
Member

slesaad commented May 5, 2026

Also add some tests for the newly added files like the validator, the lifecyc le, toolcontroller, etc

@sandesh-sp
Copy link
Copy Markdown
Collaborator Author

@slesaad I made changes based on the feedback. Could you please have a look at it? Thanks 😁

@sandesh-sp sandesh-sp merged commit 66eb75e into epic/modern-ui May 14, 2026
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.

2 participants