Skip to content

fix(ui): restore normal alert text wrapping - #48840

Merged
dnywh merged 2 commits into
masterfrom
dnywh/remove-alert-description-text-wrap
Aug 7, 2026
Merged

dnywh merged 2 commits into
masterfrom
dnywh/remove-alert-description-text-wrap

Conversation

@dnywh

@dnywh dnywh commented Aug 7, 2026 •

Copy link
Copy Markdown
Contributor

What kind of change does this PR introduce?

UI bug fix.

What is the current behavior?

AlertDescription applies 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?

AlertDescription uses normal text wrapping by default. Consumers can still opt into balanced wrapping through className.

Before After
34098 CleanShot 2026-08-07 at 17 18 52@2x

To test

Use the Docs and Design System preview deployments:

Summary by CodeRabbit

  • Bug Fixes

    • Improved alert description text wrapping for more consistent display across screen sizes.
    • Preserved support for custom text-balancing styles.
  • Tests

    • Added coverage verifying alert description attributes, default styling, and consumer-supplied text-balancing classes.

@vercel

vercel Bot commented Aug 7, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
design-system Ready Ready Preview Aug 7, 2026 7:24am
docs Ready Ready Preview, v0 Aug 7, 2026 7:24am
studio-self-hosted Ready Ready Preview Aug 7, 2026 7:24am
studio-staging Ready Ready Preview Aug 7, 2026 7:24am
ui-library Ready Ready Preview Aug 7, 2026 7:24am
zone-www-dot-com Ready Ready Preview, v0 Aug 7, 2026 7:24am
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
studio Ignored Ignored Aug 7, 2026 7:24am

Request Review

@coderabbitai

coderabbitai Bot commented Aug 7, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

AlertDescription no longer applies text-balance or md:text-pretty by default. Tests verify normal wrapping and consumer-supplied text-balance.

Changes

Alert description wrapping

Layer / File(s) Summary
AlertDescription style and tests
packages/ui/src/components/shadcn/ui/alert.tsx, packages/ui/src/components/shadcn/ui/alert.test.tsx
AlertDescription uses normal wrapping by default. Tests verify its slot attribute, default classes, and optional consumer-supplied text-balance class.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Suggested reviewers: kemaldotearth, copilot

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly and concisely describes the main UI change: restoring normal alert text wrapping.
Description check ✅ Passed The description explains the bug, the new behavior, visual impact, and testing steps, but it omits the required CONTRIBUTING.md confirmation.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dnywh/remove-alert-description-text-wrap

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@supabase

supabase Bot commented Aug 7, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project xguihxuzqibwxjnimxev because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@dnywh
dnywh requested a review from Copilot August 7, 2026 07:14
@dnywh
dnywh marked this pull request as ready for review August 7, 2026 07:14
@dnywh
dnywh requested a review from a team as a code owner August 7, 2026 07:14

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-pretty classes from AlertDescription.
  • 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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 0b97e37 and 783ce19.

📒 Files selected for processing (2)
  • packages/ui/src/components/shadcn/ui/alert.test.tsx
  • packages/ui/src/components/shadcn/ui/alert.tsx

@dnywh
dnywh enabled auto-merge (squash) August 7, 2026 07:20
@dnywh
dnywh merged commit 9ab06ef into master Aug 7, 2026
37 checks passed
@dnywh
dnywh deleted the dnywh/remove-alert-description-text-wrap branch August 7, 2026 07:24
hunleyd added a commit that referenced this pull request Aug 8, 2026
…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)
  ...
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.

3 participants