Repository navigation
fix(ui): restore normal alert text wrapping - #48840
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthrough
ChangesAlert description wrapping
Estimated code review effort: 1 (Trivial) | ~5 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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 |
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
There was a problem hiding this comment.
Pull request overview
Restores “normal” text wrapping for the shared AlertDescription component in packages/ui, preventing automatic balanced/pretty wrapping from altering line breaks in Alerts/Admonitions across docs and design-system surfaces.
Changes:
- Remove default
text-balance md:text-prettyclasses fromAlertDescription. - Add a Vitest + Testing Library unit test to verify default wrapping and that consumers can opt into balanced wrapping via
className.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| packages/ui/src/components/shadcn/ui/alert.tsx | Updates AlertDescription base classes to use normal wrapping by default. |
| packages/ui/src/components/shadcn/ui/alert.test.tsx | Adds coverage for default vs opt-in wrapping behavior. |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/ui/src/components/shadcn/ui/alert.test.tsx`:
- Line 13: Update the class assertions in the alert test so each forbidden class
is checked independently: add separate not.toHaveClass assertions for
text-balance and md:text-pretty, ensuring the test fails when either class is
present.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: a71d8fd9-5e43-4f21-a6be-975c89cd5a59
📒 Files selected for processing (2)
packages/ui/src/components/shadcn/ui/alert.test.tsxpackages/ui/src/components/shadcn/ui/alert.tsx
…for-pitr-archiving-stale * origin/master: (342 commits) feat(studio): role-aware access feedback in scoped token creation (#48858) Initialize notebook editor page (#48842) test(docs): scan changed pages for WCAG 2.1 A/AA in warn mode (#48727) docs(auth): clarify audit logs storage options and configuration (#48852) feat(studio): warn that scoped tokens don't support the MCP server (#48849) feat(studio): lifecycle and role-aware scoped token view sheet (#48848) feat(www): add Open Authorization Integration Addendum (#48804) feat(studio): add legacy token mode to scoped pat creation flow (#48844) Add blog post: Supabase is now a connector on Perplexity Computer (#48776) feat(studio): enforce expiry scoped pat (#48811) fix(studio): model scoped pat permissions as OR-of-AND alternatives - smaller version (#48809) fix(ui): opaque default button hover fills (#48837) fix(ui): restore normal alert text wrapping (#48840) feat: notebook content schema (#48813) fix(ui): remove extra spacing before custom reports section (#48796) feat(marketing): add hint text below Go page form labels (#48824) Initialize notebooks store (#48801) Use white wordmark for QA.tech primary logo (#48827) fix titleless Admonition alignment (#48784) fix inconsistent product menu dividers (#48787) ...
What kind of change does this PR introduce?
UI bug fix.
What is the current behavior?
AlertDescriptionapplies balanced or pretty text wrapping by default. Alert and Admonition copy can redistribute words across lines and leave unnatural ragged edges.What is the new behavior?
AlertDescriptionuses normal text wrapping by default. Consumers can still opt into balanced wrapping throughclassName.To test
Use the Docs and Design System preview deployments:
Summary by CodeRabbit
Bug Fixes
Tests