Skip to content

New Vaadin UI integration#2377

Draft
MartinaeyNL wants to merge 90 commits into
masterfrom
feature/ui-preview
Draft

New Vaadin UI integration#2377
MartinaeyNL wants to merge 90 commits into
masterfrom
feature/ui-preview

Conversation

@MartinaeyNL
Copy link
Copy Markdown
Member

Description

Work in progress.

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

Comment thread ui/component/or-vaadin-components/src/or-vaadin-input.ts
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR integrates Vaadin web components as a new UI component library for OpenRemote, creating a migration path away from the existing Material Web Components (MWC). Key changes include introducing new @openremote/or-vaadin-components and @openremote/theme packages, updating build tooling with newer rspack/rsbuild versions, and beginning the migration of input components.

Key Changes:

  • New Vaadin component wrappers (textfield, textarea, numberfield, checkbox, select, passwordfield)
  • New unified theme system with CSS custom properties supporting light/dark modes
  • Migration of attribute input system to use Vaadin components
  • Deprecation markers added to or-mwc-input
  • Removal of or-data-viewer from manager app

Reviewed changes

Copilot reviewed 40 out of 42 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
ui/component/or-vaadin-components/* New package wrapping Vaadin components with OpenRemote-specific behavior
ui/component/theme/* New theme package defining CSS custom properties for design system
ui/component/or-attribute-input/src/index.ts Updated to use new Vaadin input provider
ui/component/or-mwc-components/src/or-mwc-input.ts Added deprecation notices and moved logic to or-vaadin-components
ui/app/manager/src/index.ts Theme integration in manager app
yarn.lock Dependency updates including rspack 1.6.4, rsbuild 1.6.8, and Vaadin 25.0.0-rc1
ui/app/manager/src/pages/page-insights.ts Removed or-data-viewer integration

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +40 to +41
.filter(attr => !OrVaadinInput.elementProperties.has(attr))
.forEach(attr => OrVaadinInput.createProperty(attr, constr.getPropertyOptions(attr)))
Copy link

Copilot AI Jan 6, 2026

Choose a reason for hiding this comment

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

The registerProperties function references OrVaadinInput.elementProperties and OrVaadinInput.createProperty but these properties/methods are not defined in the OrVaadinInput class. This will cause a runtime error when the function is called at line 273.

Copilot uses AI. Check for mistakes.
Comment on lines +270 to +273
}

// Before the class is initialized, register the property fields of the underlying Vaadin classes
registerProperties(OrVaadinInput.VAADIN_CLASSES);
Copy link

Copilot AI Jan 6, 2026

Choose a reason for hiding this comment

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

The registerProperties function is called at line 273 before the OrVaadinInput class is fully initialized. If the function relies on static properties or methods from OrVaadinInput, this may cause initialization issues. Consider moving this call inside the class as a static initializer block or ensure all dependencies are available at this point.

Suggested change
}
// Before the class is initialized, register the property fields of the underlying Vaadin classes
registerProperties(OrVaadinInput.VAADIN_CLASSES);
static {
// After the class is fully initialized, register the property fields of the underlying Vaadin classes
registerProperties(this.VAADIN_CLASSES);
}
}

Copilot uses AI. Check for mistakes.
Comment on lines 14 to 17
dataViewer?: any // deprecated DataViewerConfig
}

export function pageInsightsProvider(store: Store<AppStateKeyed>, config?: PageInsightsConfig): PageProvider<AppStateKeyed> {
Copy link

Copilot AI Jan 6, 2026

Choose a reason for hiding this comment

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

The code removes the import for or-data-viewer but doesn't provide any migration path or deprecation notice in the changelog/documentation. Users of page-insights who depend on the dataViewer config may experience breaking changes without proper guidance.

Suggested change
dataViewer?: any // deprecated DataViewerConfig
}
export function pageInsightsProvider(store: Store<AppStateKeyed>, config?: PageInsightsConfig): PageProvider<AppStateKeyed> {
/**
* @deprecated The dataViewer configuration has been removed from page-insights.
* Please migrate any dataViewer usage to the dashboard builder configuration
* supported by page-insights instead.
*/
dataViewer?: any;
}
export function pageInsightsProvider(store: Store<AppStateKeyed>, config?: PageInsightsConfig): PageProvider<AppStateKeyed> {
if (config && (config as any).dataViewer) {
const message = "The 'dataViewer' configuration for page-insights is deprecated and no longer has any effect. " +
"Please migrate to the dashboard builder configuration used by page-insights.";
// Log a deprecation warning for developers
// eslint-disable-next-line no-console
console.warn(message);
// Optionally surface the deprecation to users in the UI
try {
showSnackbar({message});
} catch (_e) {
// Ignore failures to show the snackbar to avoid breaking existing behavior
}
}

Copilot uses AI. Check for mistakes.
const util = require("@openremote/util");
const { rspack } = require('@rspack/core');
const packageJson = require('./package.json');
const { RsdoctorRspackPlugin } = require('@rsdoctor/rspack-plugin');
Copy link

Copilot AI Jan 6, 2026

Choose a reason for hiding this comment

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

The import statement uses require() instead of ES6 import syntax for the RsdoctorRspackPlugin. This is inconsistent with the other imports at the top of the file which use ES6 module syntax. Consider using import { RsdoctorRspackPlugin } from '@rsdoctor/rspack-plugin'; for consistency.

Copilot uses AI. Check for mistakes.
Comment thread ui/app/manager/rspack.config.js Outdated
}

if (process.env.RSDOCTOR === "true") {
config.plugins.push(new RsdoctorRspackPlugin())
Copy link

Copilot AI Jan 6, 2026

Choose a reason for hiding this comment

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

Missing semicolon at the end of the statement. While JavaScript allows this, it's inconsistent with the style used elsewhere in the codebase and can lead to unexpected behavior with automatic semicolon insertion.

Suggested change
config.plugins.push(new RsdoctorRspackPlugin())
config.plugins.push(new RsdoctorRspackPlugin());

Copilot uses AI. Check for mistakes.
Comment thread ui/app/manager/src/index.ts Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 1, 2026

…mbo-box items change detection. Realm selector in header now disables correctly.
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 4, 2026

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 6, 2026

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

Labels

Epic Large body of work to reach a goal

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants