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

Make segment title clickable and add segment definition to tooltip. #15269

Merged
merged 7 commits into from Mar 23, 2020

Conversation

diosmosis
Copy link
Member

Couple small changes after talking to @mattab

@diosmosis diosmosis added the Needs Review PRs that need a code review label Dec 14, 2019
@diosmosis diosmosis added this to the 3.13.1 milestone Dec 14, 2019
@tsteur
Copy link
Member

tsteur commented Dec 15, 2019

Are there any important fixes in there? Otherwise rather move it to 4.0 maybe.

@diosmosis
Copy link
Member Author

No important fixes, just seemed small enough for 3.13.1. Will move it.

@diosmosis diosmosis modified the milestones: 3.13.1, 4.0.0 Dec 15, 2019
@@ -4,8 +4,8 @@ <h3>{{ 'General_Comparisons'|translate }}</h3>
<div class="comparison card" ng-repeat="comparison in $ctrl.comparisonsService.getSegmentComparisons() track by $index">
<div class="comparison-type">{{ 'General_Segment'|translate }}</div>

<div class="title" title="{{ comparison.title }}">
{{ comparison.title }}
<div class="title" title="{{ comparison.title }}&lt;br/&gt;{{ comparison.params.segment }}">
Copy link
Member

Choose a reason for hiding this comment

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

not sure, but does it maybe need some escaping for XSS, as a segment definition can contain any string?

Copy link
Member Author

@diosmosis diosmosis Dec 24, 2019

Choose a reason for hiding this comment

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

angularjs does this by default, so should be ok. (Did a quick test and couldn't get anything to happen.)

Copy link
Member

Choose a reason for hiding this comment

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

@diosmosis this is what it looks for me

image

with this segment

image
in the DB the segment is stored as pageUrl=@b

@tsteur tsteur changed the base branch from 3.x-dev to 4.x-dev January 13, 2020 22:13
Copy link
Member

@tsteur tsteur left a comment

Choose a reason for hiding this comment

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

See comment, there might be encoding issues?

@sgiehl
Copy link
Member

sgiehl commented Mar 2, 2020

@diosmosis any update on this?

@tsteur
Copy link
Member

tsteur commented Mar 20, 2020

@diosmosis be good to look into this when you can

@diosmosis
Copy link
Member Author

@sgiehl / @tsteur pushed a fix

@tsteur
Copy link
Member

tsteur commented Mar 22, 2020

@diosmosis seems some tests are failing now because the font changes slightly?

https://builds-artifacts.matomo.org/matomo-org/matomo/4.x-dev/39205/Comparison_dashboard_last_period.png

https://builds-artifacts.matomo.org/matomo-org/matomo/4.x-dev/39205/Comparison_visitors_overview.png

Wondering if it is because there's now no newline anymore and the browser renders it slightly differently? https://github.com/matomo-org/matomo/pull/15269/files#diff-35a447f52ea628304209b9dcf28812baR8 I suppose be fine to add this newline again?

@diosmosis
Copy link
Member Author

@tsteur could re add it and check, or could just copy over the screenshots? I don't really have an opinion.

@tsteur
Copy link
Member

tsteur commented Mar 22, 2020

Not really. I'll test and add the spaces. Maybe it fixes the screenshots then it would avoid conflicts with other PR that updates same screenshots.

@tsteur
Copy link
Member

tsteur commented Mar 22, 2020

@diosmosis didn't seem to change anything. Seems to be maybe because of adding a title?

@diosmosis
Copy link
Member Author

probably, maybe the rendering changes order or something and there's some tiny subtle change. can just update the screenshots?

@tsteur
Copy link
Member

tsteur commented Mar 22, 2020

sounds good 👍

@tsteur tsteur merged commit 7df7f01 into 4.x-dev Mar 23, 2020
@tsteur tsteur deleted the segment-card-tweaks branch March 23, 2020 03:28
@mattab mattab added the c: Usability For issues that let users achieve a defined goal more effectively or efficiently. label Sep 29, 2020
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.

None yet

4 participants