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

Disable suggestion for installed add-ons #2226

Merged
merged 2 commits into from
Dec 19, 2023

Conversation

mherwege
Copy link
Contributor

Suggestions are being shown in the add-on store for add-ons that are already installed.
This PR removes suggestions for installed add-ons.

See request here openhab/openhab-core#3868 (comment)

@mherwege mherwege requested a review from a team as a code owner December 18, 2023 10:55
Copy link

relativeci bot commented Dec 18, 2023

Job #1328: Bundle Size — 15.84MiB (+0.47%).

8334b0b(current) vs b7270d2 main#1158(baseline)

Important

Bundle introduced 1 and removed 1 duplicate package – View changed duplicate packages

Warning

Bundle introduced 13 new packages: @jsep-plugin/regex, @jsep-plugin/arrow, @jsep-plugin/object and 10 more – View changed packages

Bundle metrics  Change 10 changes Regression 5 regressions Improvement 1 improvement
                 Current
Job #1328
     Baseline
Job #1158
Regression  Initial JS 1.9MiB(+13.75%) 1.67MiB
Regression  Initial CSS 609.75KiB(+0.14%) 608.89KiB
Change  Cache Invalidation 93.81% 93.95%
Change  Chunks 217(-0.91%) 219
Change  Assets 683(-0.87%) 689
Change  Modules 3033(+78.41%) 1700
Regression  Duplicate Modules 170(+88.89%) 90
Improvement  Duplicate Code 1.6%(-17.95%) 1.95%
Regression  Packages 152(+10.14%) 138
Regression  Duplicate Packages 16(+6.67%) 15
Bundle size by type  Change 3 changes Regression 3 regressions
                 Current
Job #1328
     Baseline
Job #1158
Regression  JS 9.3MiB (+0.53%) 9.25MiB
Regression  Other 4.75MiB (+0.49%) 4.73MiB
Regression  CSS 861.19KiB (+0.2%) 859.49KiB
Not changed  Fonts 526.1KiB 526.1KiB
Not changed  Media 295.6KiB 295.6KiB
Not changed  IMG 140.74KiB 140.74KiB
Not changed  HTML 1.23KiB 1.23KiB

View job #1328 reportView mherwege:suggestions branch activity

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
@lolodomo
Copy link
Contributor

Ok, we should try to include that PR in 4.1RC.

@florian-h05
Copy link
Contributor

I will review that today 👍

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.

You used the wrong property, see my comment below.
I will fix that myself to get this merged.

@@ -226,7 +226,7 @@ export default {
return Object.keys(this.addons).flatMap((k) => this.addons[k])
},
suggestedAddons () {
return Object.keys(this.addons).flatMap((k) => this.addons[k]).filter((a) => this.suggestions.some((s) => s.id === a.id))
return Object.keys(this.addons).flatMap((k) => this.addons[k]).filter((a) => !a.isInstalled && this.suggestions.some((s) => s.id === a.id))
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
return Object.keys(this.addons).flatMap((k) => this.addons[k]).filter((a) => !a.isInstalled && this.suggestions.some((s) => s.id === a.id))
return Object.keys(this.addons).flatMap((k) => this.addons[k]).filter((a) => !a.installed && this.suggestions.some((s) => s.id === a.id))

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
@florian-h05 florian-h05 added bug Something isn't working main ui Main UI labels Dec 19, 2023
@florian-h05 florian-h05 added this to the 4.1 milestone Dec 19, 2023
@florian-h05 florian-h05 merged commit f941876 into openhab:main Dec 19, 2023
6 checks passed
@florian-h05 florian-h05 changed the title No suggestion for installed add-ons Disable suggestion for installed add-ons Dec 19, 2023
@mherwege mherwege deleted the suggestions branch December 22, 2023 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working main ui Main UI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants