Skip to content

feat(squads): reveal favorite star on row hover (desktop)#6111

Merged
AmarTrebinjac merged 1 commit into
mainfrom
eng-1591-favorite-squad-on-hover
May 28, 2026
Merged

feat(squads): reveal favorite star on row hover (desktop)#6111
AmarTrebinjac merged 1 commit into
mainfrom
eng-1591-favorite-squad-on-hover

Conversation

@AmarTrebinjac
Copy link
Copy Markdown
Contributor

@AmarTrebinjac AmarTrebinjac commented May 28, 2026

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

  • Used named Tailwind group group/squad-row to avoid colliding with the existing group on SidebarAside (which drives collapsed-sidebar expand-on-hover).
  • Visibility is gated on !isFavorited so favorited stars stay persistently visible.
  • Kept the button in the DOM with opacity-0 (not display:none) so screen readers and keyboard users can still reach it. Used group-focus-within so tabbing into the row reveals the star.
  • Added transition-opacity to match the smooth fade pattern used elsewhere in the codebase.
  • Hover behavior is baked into SquadFavoriteButton because 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

  • Jest: SquadFavoriteButton.spec.tsx covers aria attributes, click toggling, and conditional class application
  • Existing SquadList.spec.tsx and SidebarItem.spec.tsx still pass
  • ESLint + strict typecheck clean on changed files
  • Manual: sidebar — star hidden by default, revealed on row hover, persists once favorited
  • Manual: "My Squads" page — same behavior in list rows
  • Manual: keyboard tab order reaches the star and reveals it via focus-within
  • Manual: mobile viewport (< laptop) — star always visible

Closes ENG-1591


Created by Huginn 🐦‍⬛

Preview domain

https://eng-1591-favorite-squad-on-hover.preview.app.daily.dev

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>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 28, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
daily-webapp Ready Ready Preview May 28, 2026 11:49am
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
storybook Ignored Ignored May 28, 2026 11:49am

Request Review

@AmarTrebinjac AmarTrebinjac merged commit 394c231 into main May 28, 2026
12 checks passed
@AmarTrebinjac AmarTrebinjac deleted the eng-1591-favorite-squad-on-hover branch May 28, 2026 11:57
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.

1 participant