Skip to content

fix(ui): Align legal consent checkbox in simple theme#8705

Merged
brkalow merged 1 commit into
mainfrom
daniel/user-5441-simple-theme-legal-consent
May 29, 2026
Merged

fix(ui): Align legal consent checkbox in simple theme#8705
brkalow merged 1 commit into
mainfrom
daniel/user-5441-simple-theme-legal-consent

Conversation

@dmoerner
Copy link
Copy Markdown
Contributor

Description

In the simple theme, the legal consent checkbox would display a large square when wrapped to a second line. This is because it's inside a flex container which defaults align to stretch. Explicitly set it to align='start' to match the behavior of CheckboxField.

Some other themes don't have this problem because they set an explicit height and width. But that approach doesn't seem appropriate for simple. This fix also fixes neobrutalism which had the same issue.

This doesn't break existing themes because if you already have a height, the default align of stretch falls back to start. I also verified this visually by checking each theme before and after the change.

Also add simple to the Sandbox for easy verification of the fix.

CleanShot 2026-05-29 at 09 23 49@2x

Fixes USER-5441.

Checklist

  • pnpm test runs as expected.
  • pnpm build runs as expected.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

In the simple theme, the legal consent checkbox would display a large
square when wrapped to a second line. This is because it's inside a flex
container which defaults align to `stretch`. Explicitly set it to
`align='start'` to match the behavior of `CheckboxField`.

Some other themes don't have this problem because they set an explicit
height and width. But that approach doesn't seem appropriate for
`simple`. This fix also fixes `neobrutalism` which had the same issue.

This doesn't break existing themes because if you already have a height,
the default align of `stretch` falls back to `start`. I also verified
this visually by checking each theme before and after the change.

Also add `simple` to the Sandbox for easy verification of the fix.
@vercel
Copy link
Copy Markdown

vercel Bot commented May 29, 2026

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

Project Deployment Actions Updated (UTC)
clerk-js-sandbox Ready Ready Preview, Comment May 29, 2026 1:37pm

Request Review

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 29, 2026

Open in StackBlitz

@clerk/astro

npm i https://pkg.pr.new/@clerk/astro@8705

@clerk/backend

npm i https://pkg.pr.new/@clerk/backend@8705

@clerk/chrome-extension

npm i https://pkg.pr.new/@clerk/chrome-extension@8705

@clerk/clerk-js

npm i https://pkg.pr.new/@clerk/clerk-js@8705

@clerk/expo

npm i https://pkg.pr.new/@clerk/expo@8705

@clerk/expo-passkeys

npm i https://pkg.pr.new/@clerk/expo-passkeys@8705

@clerk/express

npm i https://pkg.pr.new/@clerk/express@8705

@clerk/fastify

npm i https://pkg.pr.new/@clerk/fastify@8705

@clerk/hono

npm i https://pkg.pr.new/@clerk/hono@8705

@clerk/localizations

npm i https://pkg.pr.new/@clerk/localizations@8705

@clerk/nextjs

npm i https://pkg.pr.new/@clerk/nextjs@8705

@clerk/nuxt

npm i https://pkg.pr.new/@clerk/nuxt@8705

@clerk/react

npm i https://pkg.pr.new/@clerk/react@8705

@clerk/react-router

npm i https://pkg.pr.new/@clerk/react-router@8705

@clerk/shared

npm i https://pkg.pr.new/@clerk/shared@8705

@clerk/tanstack-react-start

npm i https://pkg.pr.new/@clerk/tanstack-react-start@8705

@clerk/testing

npm i https://pkg.pr.new/@clerk/testing@8705

@clerk/ui

npm i https://pkg.pr.new/@clerk/ui@8705

@clerk/upgrade

npm i https://pkg.pr.new/@clerk/upgrade@8705

@clerk/vue

npm i https://pkg.pr.new/@clerk/vue@8705

commit: 294b454

@github-actions
Copy link
Copy Markdown
Contributor

Snapi: no API changes detected in @clerk/backend, @clerk/clerk-js, @clerk/nextjs, @clerk/react, @clerk/shared, @clerk/ui.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 29, 2026

Review Change Stack

📝 Walkthrough

Walkthrough

This PR fixes the legal consent checkbox alignment in the simple theme by updating the LegalConsentCheckbox component to explicitly center and align the checkbox to the start of its row. The sandbox is extended with clerk and simple theme options to enable testing of the fix. A changeset entry documents the patch-level fix for the @clerk/ui package.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~4 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: fixing checkbox alignment in the simple theme's legal consent UI component.
Description check ✅ Passed The description is well-related to the changeset, explaining the problem, solution, impact on themes, and additional sandbox updates.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
.changeset/fair-singers-consent.md (1)

5-5: 💤 Low value

Consider simplifying the wording.

The phrase "growing in size" could be shortened to just "growing" for conciseness: "Fix the legal consent checkbox growing when its label wraps..."

This is a minor style suggestion based on the static analysis hint. The current wording is clear and acceptable as-is.

🤖 Prompt for 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.

In @.changeset/fair-singers-consent.md at line 5, Edit the changelog sentence
that reads "Fix the legal consent checkbox growing in size when its label wraps
to a second line while using the `simple` theme." and simplify the wording by
replacing "growing in size" with "growing" so it reads "Fix the legal consent
checkbox growing when its label wraps to a second line while using the `simple`
theme." Keep the rest of the description unchanged.
🤖 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.

Nitpick comments:
In @.changeset/fair-singers-consent.md:
- Line 5: Edit the changelog sentence that reads "Fix the legal consent checkbox
growing in size when its label wraps to a second line while using the `simple`
theme." and simplify the wording by replacing "growing in size" with "growing"
so it reads "Fix the legal consent checkbox growing when its label wraps to a
second line while using the `simple` theme." Keep the rest of the description
unchanged.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: 8ede4bf1-409f-4d49-b492-df125930873c

📥 Commits

Reviewing files that changed from the base of the PR and between 1c42351 and 294b454.

📒 Files selected for processing (3)
  • .changeset/fair-singers-consent.md
  • packages/clerk-js/sandbox/app.ts
  • packages/ui/src/elements/LegalConsentCheckbox.tsx

@jfoshee jfoshee requested a review from alexcarpenter May 29, 2026 14:05
Copy link
Copy Markdown
Member

@alexcarpenter alexcarpenter left a comment

Choose a reason for hiding this comment

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

🫶

@brkalow brkalow merged commit 152c255 into main May 29, 2026
45 checks passed
@brkalow brkalow deleted the daniel/user-5441-simple-theme-legal-consent branch May 29, 2026 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants