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

Improve alignment in Visits > real-time by hiding parent of period selector #19820

Merged
merged 8 commits into from Oct 25, 2022

Conversation

peterhashair
Copy link
Contributor

@peterhashair peterhashair commented Oct 5, 2022

Description:

Fixes:#19818

hide parent div of period selector in Visits->real-time to improve alignment.

Review

Peter and others added 2 commits October 6, 2022 09:31
hide parent div of period selector
@peterhashair peterhashair changed the title hide parent div of period selector on real-time to alien the table hide parent div of period selector in Visits->real-time to improve alienment. Oct 5, 2022
@peterhashair peterhashair changed the title hide parent div of period selector in Visits->real-time to improve alienment. hide parent div of period selector in Visits->real-time to improve alignment Oct 5, 2022
@peterhashair peterhashair added the Needs Review PRs that need a code review label Oct 5, 2022
@@ -250,7 +250,7 @@ export default defineComponent({
},
mounted() {
Matomo.on('hidePeriodSelector', () => {
window.$(this.$refs.root as HTMLElement).hide();
window.$(this.$refs.root as HTMLElement).parent().hide();
Copy link
Member

Choose a reason for hiding this comment

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

maybe hide the parent only if it has [vue-entry]? this way if PeriodSelector is used directly in a Vue template, an element in the parent component wont be accidentally hidden

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@diosmosis ah I found the issue case, the parent doesn't have [vue-entry], but should hide. maybe [vue-entry] doesn't work.

Copy link
Member

@diosmosis diosmosis Oct 7, 2022

Choose a reason for hiding this comment

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

👍

Copy link
Member

Choose a reason for hiding this comment

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

Doesn't the parent div always have the id periodString in case it should be hidden?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@sgiehl we probably can check if the id has periodString good point.

Peter added 2 commits October 6, 2022 15:00
update hide only on vue-entry
revert vue-entry
@peterhashair peterhashair removed the Needs Review PRs that need a code review label Oct 7, 2022
Peter and others added 3 commits October 11, 2022 10:15
update tests and add Id for the selector
update screenshot
@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. c: Usability For issues that let users achieve a defined goal more effectively or efficiently. labels Oct 13, 2022
@github-actions
Copy link
Contributor

This issue is in "needs review" but there has been no activity for 7 days. ping @matomo-org/core-reviewers

@github-actions github-actions bot added the Stale The label used by the Close Stale Issues action label Oct 24, 2022
@peterhashair peterhashair removed the Stale The label used by the Close Stale Issues action label Oct 24, 2022
@peterhashair peterhashair added this to the 4.12.3 milestone Oct 25, 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.

Tests well, segment selector is properly aligned on the real time visits view and the period selector is re-enabled on other screens without issue.

@peterhashair peterhashair merged commit d8ddc51 into 4.x-dev Oct 25, 2022
@peterhashair peterhashair deleted the m19818 branch October 25, 2022 23:28
@justinvelluppillai justinvelluppillai changed the title hide parent div of period selector in Visits->real-time to improve alignment Improve alignment in Visits > real-time by hiding parent of period selector Oct 27, 2022
@justinvelluppillai justinvelluppillai removed the not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. label Oct 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: Usability For issues that let users achieve a defined goal more effectively or efficiently. Needs Review PRs that need a code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

When viewing the real-time report, the Segment selector is not aligned
5 participants