openhab-webui icon indicating copy to clipboard operation
openhab-webui copied to clipboard

New add from template page for semantic model

Open JustinGeorgi opened this issue 2 years ago • 12 comments

This is the second of my suggested additions for helping new users.

This adds a button and new sub page to the semantic model. On that sub-page the user can select from a few different basic templates for semantic locations which can then be automatically created and added to the model.

There are a few options for customization:

  1. The user can select a custom prefix that will be applied to all the items to fit or establish a desired naming scheme (or just differentiate between two different semantic dwellings if this is a multi dwelling OH instance)
  2. The user can optionally deselect extra pieces of the model that are not appropriate to their needs.

image

image

JustinGeorgi avatar Oct 02 '23 03:10 JustinGeorgi

#1990 Bundle Size — 10.63MiB (+0.1%).

7301adb(current) vs 5ae3e37 main#1987(baseline)

[!WARNING] Bundle contains 2 duplicate packages – View duplicate packages

Bundle metrics  Change 2 changes
                 Current
#1990
     Baseline
#1987
No change  Initial JS 1.86MiB 1.86MiB
No change  Initial CSS 607.87KiB 607.87KiB
Change  Cache Invalidation 19.42% 17.8%
No change  Chunks 223 223
No change  Assets 246 246
Change  Modules 2884(+0.14%) 2880
No change  Duplicate Modules 149 149
No change  Duplicate Code 1.85% 1.85%
No change  Packages 97 97
No change  Duplicate Packages 2 2
Bundle size by type  Change 2 changes Regression 2 regressions
                 Current
#1990
     Baseline
#1987
Regression  JS 8.81MiB (+0.12%) 8.8MiB
Regression  CSS 891.48KiB (+0.06%) 890.94KiB
No change  Fonts 526.1KiB 526.1KiB
No change  Media 295.6KiB 295.6KiB
No change  IMG 140.74KiB 140.74KiB
No change  HTML 1.24KiB 1.24KiB
No change  Other 871B 871B

Bundle analysis reportBranch JustinGeorgi:jag-sm-templateProject dashboard

relativeci[bot] avatar Oct 02 '23 03:10 relativeci[bot]

Thank you for this! It isn't what I had in mind (a multiple-step wizard with simple options) but it could do the job. I think we should indeed offer the option only when the model is empty, so it could be added as a button to the empty state placeholder (under the "Start Modelling your Home" blurb) instead of an in-your-face dialog box ("There is no semantic model. Create model locations from template?").

In any case I'm good with adding this feature early even as a "beta" feature, even if we revisit it later, it is a net benefit (as it's meant to be used just once so there's no regressions to keep in mind).

ghys avatar Oct 09 '23 19:10 ghys

I think we should indeed offer the option only when the model is empty

That was my first intention as well, but on further thought I wondered whether 1) it's better for a user to still be able to find it after they've made a couple of their own test semantic elements 2) the available templates could be expanded in the future to be more than just this initial setup.

I'm not convinced either way is better, so I'm happy to go back just available when the model is blank.

JustinGeorgi avatar Oct 10 '23 04:10 JustinGeorgi

Something like this?

image

JustinGeorgi avatar Oct 11 '23 02:10 JustinGeorgi

Sorry for not following up lately @JustinGeorgi. I think the goal now would be to target it for 4.2 - and it's not all that bad, it allows us some time to get it just right. This would be be an important feature, I think, so we shouldn't rush it.

ghys avatar Dec 20 '23 01:12 ghys

Something like this?

image

I would simply name the button 'Get Started'. And then you would have something to.... well, get started, like a wizard.

I wondered whether 1) it's better for a user to still be able to find it after they've made a couple of their own test semantic elements 2) the available templates could be expanded in the future to be more than just this initial setup.

This is also interesting, but is it worth the drawback though? (I would rather like a new user to easily figure out what to do).

ghys avatar Dec 20 '23 01:12 ghys

Sorry for not following up lately

No worries at all. It's a busy time for everyone.

I would simply name the button 'Get Started'.

Done.

This is also interesting, but is it worth the drawback though?

It should be easy enough to go back and expand it to be available more generally if it winds up being a frequently used/popular option, so leaving it just as a start for now is fine by me.

JustinGeorgi avatar Dec 24 '23 17:12 JustinGeorgi

@ghys Can you please review this PR, since it seems you have a vision how it could look which I don't have?

florian-h05 avatar Mar 25 '24 19:03 florian-h05

sorry @florian-h05 (and @JustinGeorgi) for not following up. My "vision" of sorts was that the first-time model setup could be a wizard (like the one you get when starting the instance for the first time) with several steps asking you very practical (as opposed to technical) questions:

https://community.openhab.org/t/getting-started-with-oh3-rewriting-the-tutorial-6-model-your-home-with-items-link-channels/101008/6

I felt that this:

image

could be too complicated when you discover OH as a first-time user and therefore too confusing.

Now I'm not likely to back it up with an actual implementation of this "vision" so I'm just okay with anything easing the onboarding process.

I also saw this video: https://www.youtube.com/watch?v=iOOdFyh2keY where he tries to get openHAB up and running in 30 minutes with no prior knowledge, it was pretty interesting. This should be a must-watch I think when thinking about ways to improve the onboarding.

ghys avatar Mar 25 '24 20:03 ghys

My point really was that sometimes you have to design screens for people who know their way around and others for people who don't. I felt it was a case of the former when it should have been the latter.

ghys avatar Mar 25 '24 20:03 ghys

sorry for not following up.

No worries, @ghys! Honestly, I've got so many other things going on right now, I had forgotten about this one too.

My "vision" of sorts was that the first-time model setup could be a wizard (like the one you get when starting the instance for the first time) with several steps asking you very practical (as opposed to technical) questions:

That's fine too. I'll admit, however, that I personally have no instinct at all for what that series of "practical questions" might be other than "Do you have a kitchen?", etc. At that point, that's no different than the series of checkboxes, so clearly you've got something in that's a completely different approach.

My point really was that sometimes you have to design screens for people who know their way around and others for people who don't.

If the "Item Name Prefix" section is too intimidating (and I can see that), that's easy to hide behind an advanced options toggle like so many of the other dialogs.

In the end though, we can shelve this if you don't see a way to salvage it.

JustinGeorgi avatar Mar 26 '24 14:03 JustinGeorgi

In the end though, we can shelve this if you don't see a way to salvage it.

I wouldn't dare shelve it as it's a clear UX improvement, and I recognize the good work that you made.

In fact it could coexist with the "wizard" that I eventually would like to see. When both are available we could have some sort of menu which asks you whether you prefer this "create locations from template" page (which assumes you know what the model and locations are) or the full wizard. In the meantime we can clearly add your page.

ghys avatar Mar 27 '24 22:03 ghys