Skip to content

Migrate another set of UI dialogs to or-vaadin-dialog - #3265

Draft
MartinaeyNL wants to merge 47 commits into
mainfrom
feature/more-vaadin-dialogs
Draft

MartinaeyNL wants to merge 47 commits into
mainfrom
feature/more-vaadin-dialogs

Conversation

@MartinaeyNL

@MartinaeyNL MartinaeyNL commented Sep 3, 2026 •

Copy link
Copy Markdown
Member

Description

This PR migrates another set of <or-mwc-dialog> Material dialogs to the new Vaadin <or-vaadin-dialog> dialogs.
Many of the dialogs are familiar, but also less-often used features of the platform are worth transferring to the new format.
After this, only the attribute picker dialogs are left to migrate, see #3414

See the changelog below for a full list of changes.

Changelog

  • Assets page:
    • Move asset creation dialog on the assets page to <or-vaadin-dialog>.
    • Move "Add attribute" and "Add meta item" dialogs to <or-vaadin-dialog>.
    • Move group asset "attribute selection" table dialog to <or-vaadin-dialog>.
    • Move "change parent" dialog when modifying an asset to <or-vaadin-dialog>.
  • Rules page:
    • Move map dialogs in Rules UI its when-clause (radius operator and time trigger) to <or-vaadin-dialog>.
  • Insights page:
    • Move barchart settings "algorithm selection" dialog to <or-vaadin-dialog>.
    • Move the Insights chart & bar chart custom time selection dialog to <or-vaadin-dialog>.
  • Appearance page:
    • Move JSON editor windows on the appearance page to <or-vaadin-dialog>.
    • Move GeoJSON editor windows on the appearance page to <or-vaadin-dialog>.
    • Move delete prompts in realm/map styling on appearance page to <or-vaadin-confirm-dialog>.
  • Other:
    • Move linked assets dialog on an individual user page to <or-vaadin-dialog>.
    • Move delete prompt on the realms page when deleting a realm to <or-vaadin-confirm-dialog>.
    • Move tunnel creation dialog on the gateway tunnel page to <or-vaadin-dialog>
    • Move JSON editor window on the manager interconnect page to <or-vaadin-dialog>
    • Adjust tests based on the minor textual / hierarchy changes made.

Checklist

  • 1. Acceptance criteria of the linked issue(s) are met
  • 2. Tests are written and all tests pass
  • 3. Changes are manually tested by you and the reviewer
  • 4. Documentation is written or updated

@MartinaeyNL MartinaeyNL self-assigned this Oct 1, 2026
@MartinaeyNL
MartinaeyNL marked this pull request as ready for review October 1, 2026 15:07
@MartinaeyNL

Copy link
Copy Markdown
Member Author

The PR is ready to review 👍

It's quite an extensive one, although most of the file changes are very similar;
I've migrated all functions from showDialog(new OrMwcDialog(...)) to the new showDialog(<or-vaadin-dialog ...>) format.
It uses normal templating and slotted elements, instead of relying on dialog-specific functions.
For example, all action objects (DialogAction[]) have been replaced with HTML event callbacks instead.

Let me know if anything needs to be clarified 😉
My personal AI assistant was happy with the changes thus far hahaha

@Ekhorn
Ekhorn self-requested a review October 6, 2026 07:44
@Ekhorn Ekhorn assigned Ekhorn and unassigned Ekhorn Oct 6, 2026

@Ekhorn Ekhorn left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The following dialogs have been missed (excluding those from #3371):

  1. ui/component/or-map/src/index.ts:233 (location dialog for the attribute input; compact-mode map modal in geoJsonPointInputTemplateProvider)
  2. ui/app/manager/src/pages/page-export.ts:444 (attribute picker for selecting what to export)
  3. ui/app/manager/src/pages/page-gateway.ts:547 (data-sharing selected attributes; asset-type picker behind the "N attributes selected" button)
  4. ui/component/or-attribute-card/src/index.ts:491-505 (single-attribute picker for the KPI card)
  5. ui/component/or-chart/src/index.ts:1225 (multi-select picker for adding attributes to a chart)
  6. ui/component/or-dashboard-builder/src/panels/attributes-panel.ts:287, 360, 369 (three pickers: replaceWidgetAttribute, and openAttributeSelector with and without pre-selected attributes)
  7. ui/component/or-rules/src/flow-viewer/components/internal-picker.ts:197 (single-select picker for the flow editor's asset attribute input)
  8. ui/component/or-attribute-picker/src/attribute-picker.ts:44 (AttributePicker extends OrMwcDialog; blocks 2 through 7, which are only call sites)
  9. ui/app/insights/src/components/dashboard-menu.ts:139 (realm switcher in the Insights app; one dialog action per realm)
  10. ui/component/or-app/src/index.ts:186, 430 (<or-mwc-dialog id="app-modal"> host element and OrMwcDialog.DialogHostElement; remove once 1 through 9 are done, along with the side-effect import in or-app/src/or-header.ts:33, the barrel export in or-mwc-components/src/index.ts:19, and the fixture in or-mwc-components/test/fixtures/index.ts:58-61)

Comment thread ui/app/manager/src/pages/page-gateway-tunnel.ts Outdated
Comment thread ui/app/manager/src/pages/page-assets.ts
Comment thread ui/component/or-asset-viewer/src/or-edit-asset-panel.ts Outdated
@MartinaeyNL

MartinaeyNL commented Oct 12, 2026 •

Copy link
Copy Markdown
Member Author

After this, only the attribute picker dialogs are left to migrate.

@Ekhorn for your information; I've left the AttributePicker dialogs out of this pull request on purpose.
As they depend on the OrMwcDialog class directly, and required more attention in general, I'd like to handle them separately.
I forgot to create a separate issue for it, so I just did. Sorry about that. See here; #3414

@sonarqubecloud

Copy link
Copy Markdown

@MartinaeyNL
MartinaeyNL marked this pull request as draft October 16, 2026 09:36
@MartinaeyNL

Copy link
Copy Markdown
Member Author

I've still got a few things to address. Putting it back to draft temporarily.

This branch has not been deployed

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

Labels

Enhancement Improvement of an existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

UI: Migrate all menus and dialogs of the Manager UI to Vaadin counterpart

2 participants