Skip to content

Tooltip for max 10 favourite labels#1464

Open
yannik131 wants to merge 4 commits into
masterfrom
994-more-than-10-favorite-labels
Open

Tooltip for max 10 favourite labels#1464
yannik131 wants to merge 4 commits into
masterfrom
994-more-than-10-favorite-labels

Conversation

@yannik131
Copy link
Copy Markdown
Contributor

Closes #994

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses #994 by surfacing a user-facing hint when the maximum number of favourite labels (10) has been reached, and preventing additional favourites from being added via the UI.

Changes:

  • Propagates a canHaveMoreFavourites flag from labelTreeslabelTreelabelTreeLabel to control favourite eligibility.
  • Disables the favourite star button and updates its title to explain the 10-favourites limit.
  • Adjusts label-tree body scrolling styles and adds disabled styling for the favourite button.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
resources/assets/sass/label-trees/components/_labelTrees.scss Changes scrolling behavior and hides scrollbars for the label trees body.
resources/assets/sass/label-trees/components/_labelTreeLabel.scss Adds styling for the disabled favourite button state.
resources/assets/js/label-trees/components/labelTrees.vue Computes and passes down canHaveMoreFavourites based on MAX_FAVOURITES.
resources/assets/js/label-trees/components/labelTree.vue Accepts and forwards canHaveMoreFavourites to label nodes.
resources/assets/js/label-trees/components/labelTreeLabel.vue Disables favourite button and adjusts tooltip based on favourites limit.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread resources/assets/sass/label-trees/components/_labelTrees.scss
Comment thread resources/assets/js/label-trees/components/labelTreeLabel.vue
Comment thread resources/assets/js/label-trees/components/labelTreeLabel.vue
@yannik131
Copy link
Copy Markdown
Contributor Author

@mzur On my macbook with firefox the scrollbar overlapped with the star-shaped favourite button, so I disabled it.

@yannik131 yannik131 marked this pull request as ready for review May 20, 2026 12:56
@yannik131 yannik131 requested a review from mzur May 20, 2026 13:05
Comment on lines +15 to +19
scrollbar-width: none;

&::-webkit-scrollbar {
display: none;
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm hesitant to hide it completely. What about scrollbar-width: thin?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Side-by-side, it does make it sufficiently small

Bildschirmfoto 2026-05-22 um 11 46 33 Bildschirmfoto 2026-05-22 um 11 46 22

However, even with thin, once the cursor gets near the scroll bar, the browser "snaps" to it, taking half of the space of the button away, hiding it:

Bildschirmfoto 2026-05-22 um 11 48 01

and since scrollbar-width is only supported by firefox, we'd have to add custom styling for webkit-based-browsers, for example:

/* Chrome, Safari, Edge */
.label-trees__body::-webkit-scrollbar {
  width: 6px; /* thin */
}

.label-trees__body::-webkit-scrollbar-thumb {
  background-color: rgba(0,0,0,0.4);
  border-radius: 3px;
}

.label-trees__body::-webkit-scrollbar-track {
  background: transparent;
}

but even here I'm struggling with preventing the scrollbar from growing once the cursor is close to it. Not sure.

@yannik131 yannik131 requested a review from mzur May 22, 2026 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Warning msg when you try to create more than 10 favorite labels

3 participants