Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inline group members instead of a subpage #4322

Open
6 tasks
mueller-ma opened this issue Jul 16, 2024 · 3 comments
Open
6 tasks

Inline group members instead of a subpage #4322

mueller-ma opened this issue Jul 16, 2024 · 3 comments
Labels

Comments

@mueller-ma
Copy link
Member

mueller-ma commented Jul 16, 2024

Is your feature request related to a problem? Please describe.

Sometimes I want a Sitemap page to contain all members of a group and an additional widget. Example: One page for controlling all roller shutters. This includes the members of the group where all roller shutters are in, but also a "settings" Switch item that enables automatic up/down based on daytime. A rule reads the switch and acts corresponding.

Currently my code looks like:

Text label="Roller shutters" {
  Switch item=RollerShutterAutomatic
  Switch item=RollerShutter1
  Switch item=RollerShutter2
  Switch item=RollerShutter3
}

That's some copy+paste work and requires maintenance when the group members change.

Describe the solution you'd like

Add a new property to allow the same page with the following code:

Text label="Roller shutters" {
  Switch item=RollerShutterAutomatic
  Switch item=GroupRollerShutters layout=inline
}

Additional context

The new property can be the same as in my suggestion in #4308:

inline only makes sense for Groups, though.
It can be resolved server-side, so no change is required in the clients.

Coordination between maintainers

Notify maintainers of other UIs:
@openhab/webui-maintainers
@openhab/android-maintainers
@openhab/ios-maintainers

Checklist for implementation:

  • Core
  • Basic UI
  • Main UI
  • Android app
  • iOS app
  • Docs
@jimtng
Copy link
Contributor

jimtng commented Sep 2, 2024

fyi I achieved this by generating the sitemap

@lolodomo
Copy link
Contributor

lolodomo commented Sep 16, 2024

Very probably not so easy to implement due to the generation of IDs for updates in group pages.

@lolodomo
Copy link
Contributor

The change would apply to Group widget. I do not understand why you used Switch widget in your example ?
This is a pure but complex change in core framework to be sure that inline widgets will be updated in UIs. No changes required in UIs except of course the sitemap generator of Main UI.
I promise nothing but I will try to investigate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants