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

Setup wizard: Add separate step for persistence #2431

Merged
merged 20 commits into from
May 1, 2024

Conversation

mherwege
Copy link
Contributor

@mherwege mherwege commented Feb 29, 2024

There has been quite a bit of discussion lately on improving the first installation experience.

This has been reflected in openhab/openhab-core#4103 and https://community.openhab.org/t/ideas-for-new-openhab-installation-experience/154042/43?u=mherwege

This PR addresses two of the topics discussed:

  • Include Mapdb as a proposal for a persistence service to install
  • Include Astro in the recommended addons at initial install
    It starts from the premise that the list of recommended addons is maintained (as before) in the webui repository (and not in a 'always suggest' suggestion finder).

The PR creates the groundwork to implement more fine grained suggestions in the setup wizard. It allows having separate steps for types of addons or specific addons. It also makes it possible to have extra text for identified addons as part of the setup wizard.
At the moment, only persistence is split out in a separate step (and no persistence will be offered in the main wizard addon selection window anymore).
This could be enhance to other types or recommendations in the future, but I want to start this small.

Addon selection now also allows unselecting addons on the shown list, without branching out to a separate window. That is still possible to add addons not in the original lists.

@florian-h05 I use the addon logo component as implemented in #2402 in this PR, but none of the logos load. Can you help me understand why?

Here are some screenshots to show how it looks like with this PR:

image image image image

@andrewfg @jimtng I would appreciate your feedback on this.

@mherwege mherwege requested a review from a team as a code owner February 29, 2024 09:59
Copy link

relativeci bot commented Feb 29, 2024

#1930 Bundle Size — 10.58MiB (+0.09%).

e4418cc(current) vs c6e1d8b main#1925(baseline)

Warning

Bundle contains 2 duplicate packages – View duplicate packages

Bundle metrics  Change 4 changes Regression 1 regression
                 Current
#1930
     Baseline
#1925
No change  Initial JS 1.86MiB 1.86MiB
No change  Initial CSS 607.87KiB 607.87KiB
Change  Cache Invalidation 17.78% 0%
No change  Chunks 222 222
No change  Assets 245 245
Change  Modules 2873(+0.24%) 2866
Regression  Duplicate Modules 146(+2.1%) 143
Change  Duplicate Code 1.84%(+0.55%) 1.83%
No change  Packages 95 95
No change  Duplicate Packages 2 2
Bundle size by type  Change 2 changes Regression 2 regressions
                 Current
#1930
     Baseline
#1925
Regression  JS 8.77MiB (+0.11%) 8.76MiB
Regression  CSS 890.63KiB (+0.06%) 890.07KiB
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 mherwege:wizard-persistenceProject dashboard

@andrewfg
Copy link

@andrewfg .. I would appreciate your feedback on this.

@mherwege this is an excellent idea. I haven’t tested it on a real system, and I haven’t proofed your code. But conceptually it is a big improvement over prior. And certainly better than an always install addon finder. Thanks for this. .. Just one question though: you did want to do something about country specific addons, so I wonder how that would fit in this concept?

@mherwege
Copy link
Contributor Author

you did want to do something about country specific addons

I am not sure about the best approach for that just yet.

I see 3 classifications for addons:

  1. recommended: fixed list, only presented in setup wizard (list maintained in webui code)
  2. suggested: comes from core, mainly based on environment scans, but could be other - presented in setup wizard and addon store
  3. featured: fixed list, only presented in addon store and on website (separate list for addon store and website maintained in addon store and webui respectively)

1 and 3 are maintained in code in the webui. 2 is maintained by the binding developer.

Region and country could fit in 1 or 2, but at the moment I am tempted to go 2 for it. It shouldn't be a list maintained by the maintainers, but should be suggested from the binding metadata.

@jimtng
Copy link
Contributor

jimtng commented Feb 29, 2024

image

It would be great if the addon description can be displayed here

The version number is actually not that relevant, and I'd consider the binding id to be "advanced" information. Just the name + description would be the sweet spot

@mherwege
Copy link
Contributor Author

mherwege commented Feb 29, 2024

It would be great if the addon description can be displayed here

Fully agree, but I am afraid there is none. The description on the persistence selection page is hand crafted in the webui code. And if that is available, it will default to it. What it is showing here is what was shown before this PR (with the addition of the icon if that works properly, now defaulting to the addon type icon).
From the addon info, I only have a label, no longer description.

The description field does exist in the addon REST response, but is not populated. I will see if I can find what the issue is.

@mherwege
Copy link
Contributor Author

mherwege commented Feb 29, 2024

The description field does exist in the addon REST response, but is not populated. I will see if I can find what the issue is.

The description field is only populated after installation. This was introduced to solve an issue with localisation of the label and description before installation in openhab/openhab-core#3908
As the translations are only packaged with the addon itself, we don't have the info in the setup wizard.

@florian-h05
Copy link
Contributor

I’ll have a look at the add-on logos soon. 👍

Probably the setup wizard should open the quick start guide after finishing?

@mherwege mherwege force-pushed the wizard-persistence branch from c3bedb9 to 872fbcd Compare March 1, 2024 08:18
@mherwege
Copy link
Contributor Author

mherwege commented Mar 1, 2024

Probably the setup wizard should open the quick start guide after finishing?

Done and fine on wider screens. I am unhappy about the link for smaller screens, but that is a documentation issue.

@mherwege
Copy link
Contributor Author

mherwege commented Mar 7, 2024

See https://community.openhab.org/t/solar-forecast-pv/137681/157?u=mherwege

Does it make sense to also include in memory db in the proposed persistence strategies?

@andrewfg
Copy link

andrewfg commented Mar 7, 2024

Does it make sense to also include in memory db in the proposed persistence strategies?

As a user of solar pv forecast, I would say yes. Personally I would suggest rrd4j as the default for persisting past data series (on file), and in memory for persisting future data series (NOT on file).

@mherwege
Copy link
Contributor Author

mherwege commented Apr 2, 2024

Removed inmemory persistence from the wizard as there is no agreement on openhab/openhab-addons#16496. Without it, it would not be fully configured and this would require extra steps in the wizard, not part of this PR.

@mherwege
Copy link
Contributor Author

mherwege commented Apr 2, 2024

DCO fails because of revert commit.

mherwege added 10 commits April 30, 2024 15:38
Signed-off-by: Mark Herwege <[email protected]>
Signed-off-by: Mark Herwege <[email protected]>
Signed-off-by: Mark Herwege <[email protected]>
Signed-off-by: Mark Herwege <[email protected]>
Signed-off-by: Mark Herwege <[email protected]>
Signed-off-by: Mark Herwege <[email protected]>
Signed-off-by: Mark Herwege <[email protected]>
Signed-off-by: Mark Herwege <[email protected]>
@mherwege mherwege force-pushed the wizard-persistence branch from 78582b9 to 93c4ae0 Compare April 30, 2024 13:39
@florian-h05
Copy link
Contributor

@mherwege I guess you have seen my PR to the add-on logo component?
Please refrain from changing this PR, as I am currently reviewing it and also improving styling here and there a bit.

@florian-h05
Copy link
Contributor

@mherwege Can you please put the primary IP address config into a follow-up PR?

@florian-h05
Copy link
Contributor

@mherwege I have created mherwege#3 to your branch, please merge it using rebase merge.

My add-on logo component was not working because it only supported lazy loading, I have updated the component to make lazy loading optional. Theoretically you need to rebase this PR, however please don't do, I don't want to re-apply the changes from my PR. Once I merge this PR here, the icons will work properly in the main branch.

Signed-off-by: Mark Herwege <[email protected]>
@mherwege
Copy link
Contributor Author

@mherwege Can you please put the primary IP address config into a follow-up PR?

Sorry, I missed this and pushed something. I will revert abnd put it in a separate PR.

@florian-h05
Copy link
Contributor

Thanks.
In case it is based on this PR, just wait with the new PR until I merge this one. Once you have a look at my PR (linked above) and merge into this branch here, I will merge.

@mherwege
Copy link
Contributor Author

OK, I hope I have done things right. I merged your PR from the github web UI.

These are on the overview page as well and cause some trouble with the get started button.

Signed-off-by: Florian Hotze <[email protected]>
Signed-off-by: Florian Hotze <[email protected]>
Copy link
Contributor

@florian-h05 florian-h05 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!
Looks really nice with the add-on logos now.

FYI some change from my PR got lost somehow, I just re-applied it 👍

@florian-h05 florian-h05 changed the title Setup wizard add separate step for persistence Setup wizard: Add separate step for persistence Apr 30, 2024
@florian-h05 florian-h05 merged commit faa4018 into openhab:main May 1, 2024
6 checks passed
@florian-h05 florian-h05 added this to the 4.2 milestone May 1, 2024
@mherwege mherwege deleted the wizard-persistence branch May 1, 2024 19:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request main ui Main UI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants