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

hide widget when not found #20007

Merged
merged 4 commits into from Nov 17, 2022
Merged

hide widget when not found #20007

merged 4 commits into from Nov 17, 2022

Conversation

peterhashair
Copy link
Contributor

Description:

Fixes: #9969
hide widget when not found

Review

Peter added 2 commits November 15, 2022 10:17
hide widget when not found
update hide to destroy
@peterhashair peterhashair marked this pull request as ready for review November 14, 2022 23:55
@peterhashair peterhashair added Needs Review PRs that need a code review not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. labels Nov 14, 2022
@peterhashair peterhashair added this to the 4.12.4 milestone Nov 14, 2022
update from destroy to remove
@sgiehl
Copy link
Member

sgiehl commented Nov 15, 2022

@peterhashair did you check what happens if you e.g. create a dashboard for a site, that has goals created, add one of the goals widgets and switch to another site, that has no goals created. Afterwards you perform any action on the dashboard so the layout is saved. Is the goals widget then removed when switching back to the site where a goal actually exists?
As far as I remember is the dashboard layout build based on the html elements on the dashboard. So really removing something should remove it from the layout as well. Not sure if that is always wanted. Might possibly be better to only "hide" them, so they aren't removed from the layout.

@sgiehl sgiehl removed the Needs Review PRs that need a code review label Nov 15, 2022
update remove to hide
@peterhashair peterhashair added the Needs Review PRs that need a code review label Nov 16, 2022
Copy link
Contributor

@bx80 bx80 left a comment

Choose a reason for hiding this comment

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

Hiding the widget worked well for me in testing 👍 I created a goals widget for site a, switched to site b and the widget was hidden, switching back to site a shows the widget again. Making a change to the dashboard while the widget was hidden (to trigger a save) didn't affect the widget reappearing when switching back to the original.

@bx80 bx80 merged commit 7e66223 into 4.x-dev Nov 17, 2022
@bx80 bx80 deleted the 9969 branch November 17, 2022 06:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Review PRs that need a code review not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Hide widget when not found (goals, custom dimensions, custom reports)
3 participants