Skip to content

Hide track locked badge text on mobile using container queries#14088

Merged
dylanjeffers merged 2 commits intomainfrom
claude/hide-members-text-small-zgvSh
Apr 9, 2026
Merged

Hide track locked badge text on mobile using container queries#14088
dylanjeffers merged 2 commits intomainfrom
claude/hide-members-text-small-zgvSh

Conversation

@dylanjeffers
Copy link
Copy Markdown
Contributor

Summary

This PR implements responsive behavior for the track locked status badge by hiding the "Members Only" text on mobile devices while keeping the lock icon visible. This is achieved using CSS container queries instead of media queries.

Key Changes

  • TrackLockedStatusBadge.tsx: Added container query (@container (max-width: 640px)) to hide the text label on smaller screens while preserving the lock icon
  • TrackTile.tsx (mobile): Added containerType: 'inline-size' CSS property to enable container query support
  • TrackTile.tsx (desktop): Added containerType: 'inline-size' CSS property to enable container query support

Implementation Details

The solution uses CSS container queries to make the badge responsive based on the container's width rather than the viewport width. This provides more flexible and component-aware responsive behavior. The lock icon remains visible on all screen sizes, while the text label is hidden when the container is 640px or smaller, improving the mobile user experience by reducing visual clutter.

https://claude.ai/code/session_018QPUjru2mRnpk44vanhfwP

The "Members Only" flair was wrapping onto two lines and breaking the
layout of the locked-track stats row on smaller tiles. Wrap the tile
containers with an inline-size container context and hide the text
portion of the badge (keeping the lock icon) via a container query when
the tile is <= 640px wide.
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 9, 2026

🦋 Changeset detected

Latest commit: 9621b0f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@audius/web Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 9, 2026

🌐 Web preview ready

Preview URL: https://audius-web-preview-pr-14088.audius.workers.dev

Unique preview for this PR (deployed from this branch).
Workflow run

@dylanjeffers dylanjeffers merged commit a51dd4f into main Apr 9, 2026
14 checks passed
@dylanjeffers dylanjeffers deleted the claude/hide-members-text-small-zgvSh branch April 9, 2026 21:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants