feat(squads): reveal favorite star on row hover (desktop)#6111
Merged
Conversation
Hide the empty favorite star by default on laptop+ and reveal it on row hover or keyboard focus. Already-favorited stars stay visible so users keep the affordance signaling which squads they have favorited. Mobile is untouched. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Hide the empty favorite star by default on laptop+ and reveal it on row hover or keyboard focus. Already-favorited stars stay visible so users keep the affordance signaling which squads they have favorited. Mobile (< laptop breakpoint) is untouched — the star remains always visible.
Key decisions
group/squad-rowto avoid colliding with the existinggrouponSidebarAside(which drives collapsed-sidebar expand-on-hover).!isFavoritedso favorited stars stay persistently visible.opacity-0(notdisplay:none) so screen readers and keyboard users can still reach it. Usedgroup-focus-withinso tabbing into the row reveals the star.transition-opacityto match the smooth fade pattern used elsewhere in the codebase.SquadFavoriteButtonbecause every current call-site wants the same behavior. If a future call-site needs the always-visible variant, add an optional prop rather than forking the component.Test plan
SquadFavoriteButton.spec.tsxcovers aria attributes, click toggling, and conditional class applicationSquadList.spec.tsxandSidebarItem.spec.tsxstill passCloses ENG-1591
Created by Huginn 🐦⬛
Preview domain
https://eng-1591-favorite-squad-on-hover.preview.app.daily.dev