[UI Preview] Add initial set of or-vaadin-components, applied them to Assets page#2340
Conversation
…ModulesLinkingError...
…nager app instead of the individual component.
….com/openremote/openremote into feature/asset-attribute-input-vaadin
… for this PR. (for now)
…d or-mwc-input. Resolved incorrect package JSON dependency mentions. Also includes minor cleanup.
… other minor issues. Added password input.
…alls back to or-mwc-input
… Also added the OpenRemote theme file to Storybook.
There was a problem hiding this comment.
Pull request overview
This PR introduces a new Vaadin-based component library (@openremote/or-vaadin-components) alongside a new theme package (@openremote/theme) to begin migrating away from Material Design Components. Key changes include creating wrapper components around Vaadin fields, implementing an input abstraction layer, and integrating these components into the Assets page workflow.
Key Changes
- Added new
@openremote/or-vaadin-componentspackage with wrappers for Vaadin text fields, number fields, checkboxes, text areas, and password fields - Added new
@openremote/themepackage that imports Vaadin Lumo styles - Migrated input provider logic from
or-mwc-componentstoor-vaadin-componentswith deprecation warnings on old code - Updated
or-attribute-inputandor-asset-viewerto use the new Vaadin components - Updated build configurations and dependencies across multiple packages, including upgrading
@rsbuild/coreto ~1.6.8
Reviewed changes
Copilot reviewed 40 out of 41 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
ui/component/or-vaadin-components/src/or-vaadin-input.ts |
Main abstraction component that wraps Vaadin components and handles attribute forwarding |
ui/component/or-vaadin-components/src/util.ts |
Contains logic for determining input types and creating templates based on value descriptors |
ui/component/or-vaadin-components/src/or-vaadin-*.ts |
Simple wrapper components extending Vaadin base components |
ui/component/or-mwc-components/src/or-mwc-input.ts |
Added deprecation warnings and removed duplicated logic moved to Vaadin components |
ui/component/or-attribute-input/src/index.ts |
Updated to use new Vaadin input provider with simplified callback signatures |
ui/component/or-asset-viewer/src/or-edit-asset-panel.ts |
Updated meta item editing to use new input provider |
ui/component/theme/* |
New theme package that imports Vaadin Lumo styles |
ui/app/manager/src/index.ts |
Applies theme CSS to manager app |
yarn.lock |
Updated dependencies including Vaadin beta packages and Rsbuild/Rspack tooling |
ui/knip.jsonc |
Added ignores for Vaadin styles and Rsdoctor plugin |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ial checked/unchecked value
…utes. Added support for SELECT.
Ekhorn
left a comment
There was a problem hiding this comment.
Initial review. I'll have another look ;)
Co-authored-by: Koen <44117179+Ekhorn@users.noreply.github.com>
Co-authored-by: Koen <44117179+Ekhorn@users.noreply.github.com>
Co-authored-by: Koen <44117179+Ekhorn@users.noreply.github.com>
Ekhorn
left a comment
There was a problem hiding this comment.
Looks good! I'll approve after these remaining threads.
…stories.ts Co-authored-by: Koen <44117179+Ekhorn@users.noreply.github.com>
Co-authored-by: Koen <44117179+Ekhorn@users.noreply.github.com>
Ekhorn
left a comment
There was a problem hiding this comment.
Is the deployment up-to-date?
|
No I haven't updated the testing deployment yet. Will do. |
…bmit on pressing ENTER (or send button). Fix for attribute input dropdown showing send button.
… be correct on the 'view asset' page now
Description
This PR adds an integration for the Vaadin Web Components, located in the
/ui/component/or-vaadin-*folders.They have been applied to the Assets page, within the
or-attribute-inputcomponent.Changelog
or-vaadin-*components:or-vaadin-checkboxusing https://vaadin.com/docs/v25/components/checkboxor-vaadin-numberfieldusing https://vaadin.com/docs/v25/components/number-fieldor-vaadin-passwordfieldusing https://vaadin.com/docs/v25/components/password-fieldor-vaadin-selectusing https://vaadin.com/docs/v25/components/selector-vaadin-textareausing https://vaadin.com/docs/v25/components/text-areaor-vaadin-textfieldusing https://vaadin.com/docs/v25/components/text-fieldor-vaadin-inputelement, that works similar toor-mwc-inputwith Vaadin components.All HTML attributes and properties are "bubbled down" towards the Vaadin child component, making it flexible.
or-mwc-inputcomponent.getValueHolderInputTemplateProvider()in favor ofusing the
or-vaadin-inputcounterpart. (see itsutil.tsfile)@openremote/themepackage, with only CSS files.@vaadin/vaadin-lumo-styles/lumo.css) by default.or-vaadin-inputto theor-attribute-inputrendering function.or-data-viewerfrom the Insights page.Breaking changes from MWC to Vaadin
There are several breaking changes when you migrate
or-mwc-inputto the newor-vaadin-input.But, preferably, you'd use the individual components like
or-vaadin-textfieldinstead.You should only use the new
or-vaadin-inputif you want to dynamically switch between input types.List of breaking changes from
or-mwc-inputtoor-vaadin-input, although there are many more.See the Vaadin docs for the exact specification and options.
focusedbecomes web standardautofocus.helperTextbecomes web standardhelper-text.outlinedhas been removed.roundedhas been removed.resizeVerticalhas been removed, please use web standardtype="textarea"instead.@or-mwc-input-changedbecomes the web standard@change.type="checkbox", instead ofvalue="true"you should use the web standardchecked="true".Checklist