Skip to content

Replace asset & attribute select dropdowns with or-attribute-picker component. - #55

Merged
MartinaeyNL merged 13 commits into
mainfrom
feature/add-attribute-picker
Dec 12, 2025
Merged

Replace asset & attribute select dropdowns with or-attribute-picker component.#55
MartinaeyNL merged 13 commits into
mainfrom
feature/add-attribute-picker

Conversation

@dominiquekleeven

@dominiquekleeven dominiquekleeven commented Oct 21, 2025

Copy link
Copy Markdown
Contributor

Closes #53
Closes #52

Changes

This PR replaces the current method of selecting assets and their attributes (dropdowns) with the or-attribute-picker component.

  • Added or-attribute-picker dependency.
  • Added custom-asset-attribute-picker.ts, which extends/overrides OrAssetAttributePicker.
  • Updated the manager config eventProviderType to WEBSOCKET so that the or-asset-tree component inside the attribute picker functions correctly, as it relies on WebSockets.
  • The service now locally updates the manager.displayRealm so that or-asset-tree knows which realm to query for assets.

Screenshots

Select target button

image

Select attributes dialog (attribute picker)

image

When an attribute has been selected

image Clicking on the Asset/Attribute will show the dialog again to modify it

Regressors

image Functions the same as the target, but has an extra meta item requirement for the attribute image

@dominiquekleeven
dominiquekleeven marked this pull request as ready for review December 1, 2025 12:54
@dominiquekleeven
dominiquekleeven requested a review from a team December 1, 2025 12:54
@wborn
wborn requested a review from Copilot December 1, 2025 16:41

Copilot AI left a comment

Copy link
Copy Markdown

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 modernizes the asset/attribute selection UI by replacing dropdown components with the or-attribute-picker component. Key changes include adding the picker dependency, creating a custom extension for regressor-specific filtering, switching to WebSocket event provider, and updating the realm display context.

  • Replaces dropdown-based asset/attribute selection with or-attribute-picker dialog component
  • Adds custom filtering logic to show only attributes with required meta items for regressors
  • Updates event provider configuration from POLLING to WEBSOCKET for or-asset-tree compatibility

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
frontend/src/pages/pages-config-editor.ts Replaced dropdown inputs with dialog-based attribute picker, added asset loading methods, removed dropdown list state management
frontend/src/pages/app-layout.ts Sets manager.displayRealm to enable or-asset-tree realm queries
frontend/src/index.ts Changed eventProviderType from POLLING to WEBSOCKET
frontend/src/components/custom-asset-attribute-picker.ts New custom component extending OrAssetAttributePicker with predicted datapoints filtering
frontend/package.json Added @openremote/or-attribute-picker dependency
frontend/package-lock.json Updated dependency tree with new packages and version updates

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

Comment thread frontend/src/pages/pages-config-editor.ts
Comment thread frontend/src/pages/pages-config-editor.ts
Comment thread frontend/src/pages/pages-config-editor.ts Outdated
Comment thread frontend/src/pages/pages-config-editor.ts Outdated
Comment thread frontend/src/components/custom-asset-attribute-picker.ts
Comment thread frontend/src/components/custom-asset-attribute-picker.ts
Comment thread frontend/src/pages/pages-config-editor.ts Outdated
Comment thread frontend/src/pages/pages-config-editor.ts Outdated

@MartinaeyNL MartinaeyNL left a comment

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.

Code looks OK!
I only added a few minor comments on top of the feedback Copilot already gave.

Comment thread frontend/package.json Outdated
Comment thread frontend/src/pages/pages-config-editor.ts Outdated
@MartinaeyNL
MartinaeyNL merged commit ee5bf90 into main Dec 12, 2025
2 checks passed
@MartinaeyNL
MartinaeyNL deleted the feature/add-attribute-picker branch December 12, 2025 12:30
@dominiquekleeven dominiquekleeven added the Enhancement Improvement of an existing feature label Dec 16, 2025
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

3 participants