Repository navigation
fix(web): align premiere badge inline with time left - #1070
Conversation
- Render the premiere badge beside the time-left label instead of on its own row - Truncate the time-left link so the badge stays visible in narrow cards
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe card now renders the time-left label and premiere badge in one flex row. The label can truncate, and the badge keeps its size. ChangesContinue Watching metadata
Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Suggested reviewers: ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
| ) : ( | ||
| <ViewTransitionLink | ||
| to={isMangaChapter ? card.watchHref : card.itemHref} | ||
| className="text-muted-foreground block w-fit truncate text-xs hover:underline" |
There was a problem hiding this comment.
On narrow poster cards, an episode can show both a minutes-left label and a non-shrinking premiere badge. This flex item retains its automatic minimum width, so truncate cannot shorten the label and the combined row can overflow the card.
| className="text-muted-foreground block w-fit truncate text-xs hover:underline" | |
| className="text-muted-foreground block min-w-0 w-fit truncate text-xs hover:underline" |
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Problem
Related issue: N/A — narrow fix
The Continue Watching card rendered the premiere badge and the time-left label as separate stacked rows. The badge sat on its own line under the progress text, so it broke the card's vertical rhythm and consumed extra height compared to the rest of the card content.
Approach
Render both the time-left label and the premiere badge inside a single flex row when either is present. The badge is marked
shrink-0so it keeps its pill shape while the label truncates, and the label picks uptruncateso long text clips cleanly instead of pushing the badge out of the row. Behavior is unchanged when only one of the two is present; the row is simply skipped when neither applies.Validation
make test-webRisks
None identified. Web-only presentational change; no API, data, or behavior change.
Checklist
AI Disclosure
Summary by CodeRabbit