-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Allow to star and unstar stored segment #23771
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
base: 5.x-dev
Are you sure you want to change the base?
Conversation
24a8707 to
cb064c5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ℹ️ The new tests changed the visible focused element on this screenshot.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ℹ️ The starred segment comes at the top of the list
| self.target.find('[title]').each(function () { | ||
| addTooltip(this, this.getAttribute('title')); | ||
| }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ℹ️ Fix tooltip for all actions in the SegmentList
| display: flex; | ||
| flex-direction: column; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ℹ️ Use flexbox to be able to reorder starred segment easily.
| .segmentationContainer .submenu ul li[data-idsegment=""] { | ||
| order: 0; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ℹ️ First line is always "All visitors"
d004753 to
5c02c19
Compare
7134cf8 to
581d2c2
Compare
sgiehl
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| { | ||
| return [ | ||
| $this->migration->db->addColumns('segment', [ | ||
| 'starred' => 'TINYINT(1) NOT NULL DEFAULT 0', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another thing came to my mind after reading the requirements again. If that hasn't changed again the starring should be handled by website, but currently that happens by segment. This might need some clarification.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not understand this comment.
I understood the requirements that we should star a segment per Matomo instance and not per user, so a starred segment is visible by every users. That’s why we added a "starred by …" label.
Do you think we should store the segment per website entity?
3d259c0 to
094a34f
Compare
|
UPDATED COMMENT Here is a clarification. Considering that segments can be created across all websites by a super user, we can't let people remove them from Starred on one website which would affect other websites where this segment exists. So we need to treat these global segments differently when it comes to starring. In addition:
Below are the proposed tooltips that reflect these rules: 1. Global segmentFor non super users (star icon disabled)
For super users (star icon enabled)
2. Site-specific segmentFor users without permission to star (e.g. View user viewing someone else's segment)
For users with permission (Write/Admin/Super User, or View user starring their own segment)
|
|
@mattab Is there a specific reason why this isn't a user specific action? Personally I think allowing every user to star the segments they need, rather than having it global or site specific might bring much more value to the customers. And storing that per user instead of together with the segment wouldn't be that much more effort - compared to implementing the special handling for global segments. |
|
The main reason is to
|
b6209bd to
dc0d932
Compare
| comparedSegments.indexOf(decodeURIComponent(definition)) !== -1 | ||
| ); | ||
| $segment.toggleClass('comparedSegment', isCompared); | ||
| $segment.find('.compareSegment').attr('data-state', isCompared ? 'active' : ''); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| $(this).addClass('no-click'); | ||
| $(this).parent().attr('title', _pk_translate('General_MaximumNumberOfSegmentsComparedIs', [limit])); | ||
| $compareButton.attr('data-state','disabled'); | ||
| addTooltip($compareButton, _pk_translate('General_MaximumNumberOfSegmentsComparedIs', [limit])); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.



Description
New “Star” Feature: each segment can be "starred" by clicking on a star icon.
Starred segments are highlighted at the top of the list.
What happen when a segment star is clicked :
Screenshots
before / after
tooltips
Animation
Checklist
Review