Skip to content

chore: Apply shadcn latest styling changes to components#722

Open
ntatoud wants to merge 4 commits into
mainfrom
ntatoud/update-shadcn-components
Open

chore: Apply shadcn latest styling changes to components#722
ntatoud wants to merge 4 commits into
mainfrom
ntatoud/update-shadcn-components

Conversation

@ntatoud
Copy link
Copy Markdown
Member

@ntatoud ntatoud commented Mar 14, 2026

Summary

Compared existing shadcn components with the latest base-vega registry versions and applied meaningful styling improvements while preserving all project-specific customizations (loading states, custom variants, i18n, etc.).

Bug fixes

login-hint

  • Fixed whitespace collapsing in flex containers — trailing `{' '}` was being stripped by the browser, replaced with `gap-x-1` on the flex container

Visual changes

High impact

dialog

  • Overlay: `bg-black/80` → `bg-black/10` + `supports-backdrop-filter:backdrop-blur-xs` — near-transparent backdrop with blur
  • `DialogTitle`: `font-semibold` → `font-medium`
  • `DialogFooter`: `justify-between` → `justify-end`

`sheet`

  • Overlay: same change as dialog (near-transparent + blur)
  • `SheetTitle`: `font-semibold` → `font-medium`
  • Animations switched to `data-starting-style:`/`data-ending-style:` (Base UI idiomatic)
  • Side positioning via `data-side=` CSS selectors instead of JS conditionals

Medium impact

`alert`

  • Grid layout reworked with `has-[>svg]:grid-cols-[auto_1fr]` — cleaner icon/text alignment
  • `AlertDescription`: `text-balance md:text-pretty` — better text justification
  • New `AlertAction` sub-component for placing action buttons

`button`

  • `active:translate-y-px` — press micro-animation
  • `bg-clip-padding` — fixes border rendering artifacts
  • `select-none` — prevents text selection on click
  • `transition-all` instead of `transition-[color,box-shadow]`
  • `focus-visible:ring-3` (shorthand for `ring-[3px]`)
  • `aria-invalid:ring-3` + `dark:aria-invalid:border-destructive/50` — improved invalid state styling

`dropdown-menu`

  • `DropdownMenuLabel`: `text-sm` → `text-xs text-muted-foreground` — more discreet label
  • `DropdownMenuShortcut` highlights together with item on focus

Subtle

`avatar` — Subtle border overlay using `after:` pseudo-element with `mix-blend-darken/lighten`

`tooltip` — `delay` changed from `500` → `0`, tooltip appears immediately on hover

`label` — `items-center gap-2 font-medium select-none`, group-level disabled state support

Non-visual (refactoring only)

`scroll-area` and `separator` — JS conditionals replaced with CSS `data-horizontal:`/`data-vertical:` selectors (same output, cleaner code)

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added an AlertAction slot for enhanced alert layouts.
    • ConfirmResponsiveDrawer now accepts an optional forceRenderOverlay prop.
  • Style

    • Refined visual styling and spacing across alerts, buttons, dialogs, dropdowns, labels, sheets, avatars, scroll areas, separators, and tooltips for improved consistency and responsive behavior.
  • Documentation

    • Removed the example story showing disabled ButtonLink variants.
  • Updates

    • ButtonLink public props no longer include the anchor disabled prop.

@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 14, 2026

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

Project Deployment Actions Updated (UTC)
start-ui-web-v3 Ready Ready Preview, Comment Mar 17, 2026 4:49pm

Request Review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Mar 14, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 261aa4c9-379d-489e-a746-c7d10ad6b2a2

📥 Commits

Reviewing files that changed from the base of the PR and between 61857ea and f6f66bc.

📒 Files selected for processing (4)
  • src/components/ui/confirm-responsive-drawer.tsx
  • src/components/ui/dialog.tsx
  • src/components/ui/tooltip.tsx
  • src/features/auth/confirm-signout.tsx
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/components/ui/dialog.tsx
  • src/components/ui/tooltip.tsx

Walkthrough

Adds AlertAction component and exports; broad Tailwind class refactors across many UI components (alert, avatar, button, dropdown, label, scroll-area, separator, sheet, dialog, tooltip); tightens ButtonLink prop types and removes its Disabled story; adds forceRenderOverlay prop to ConfirmResponsiveDrawer; small presentation tweaks in devtools hints.

Changes

Cohort / File(s) Summary
Alert
src/components/ui/alert.tsx
Added AlertAction component/export; replaced alertVariants with a more detailed class set; updated AlertTitle and AlertDescription classes and slot/layout handling.
Core UI styling
src/components/ui/avatar.tsx, src/components/ui/button.tsx, src/components/ui/dropdown-menu.tsx, src/components/ui/label.tsx, src/components/ui/scroll-area.tsx, src/components/ui/separator.tsx
Consolidated/expanded Tailwind class strings, introduced group/data-* driven selectors, pseudo-element and blend-mode tweaks, and replaced orientation branches with data-* utilities; no API signature changes.
Dialog & Sheet
src/components/ui/dialog.tsx, src/components/ui/sheet.tsx
Adjusted spacing/typography; refactored SheetContent to use data-[side=...] modifiers and simplified overlay/backdrop transitions.
Tooltip
src/components/ui/tooltip.tsx
Expanded TooltipContent layout and keyboard-slot-specific classes; class-only changes.
ButtonLink & stories
src/components/ui/button-link.tsx, src/components/ui/button-link.stories.tsx
ButtonLink prop type tightened to Omit<ComponentProps<'a'>, 'disabled'>; removed the Disabled story export.
Confirm responsive drawer
src/components/ui/confirm-responsive-drawer.tsx, src/features/auth/confirm-signout.tsx
Added optional forceRenderOverlay?: boolean prop and forwarded it to ResponsiveDrawerContent; updated ConfirmSignOut usage to pass the flag.
Devtools hints
src/features/devtools/login-hint.tsx
Minor presentation/layout text tweaks (spacing/gap changes).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • ivan-dalmet
  • DecampsRenan
🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

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.
Out of Scope Changes check ❓ Inconclusive The PR introduces forceRenderOverlay prop to ConfirmResponsiveDrawer and uses it in ConfirmSignOut, which is tangential to the stated objectives of applying shadcn styling updates and addressing ButtonLink disabled semantics. Clarify whether forceRenderOverlay changes in confirm-responsive-drawer.tsx and confirm-signout.tsx are necessary for the shadcn styling update or if they should be in a separate PR for z-index management.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Apply shadcn latest styling changes to components' is clear and directly summarizes the main objective of applying styling updates from the latest shadcn registry to multiple UI components throughout the codebase.
Linked Issues check ✅ Passed The PR addresses issue #721 by removing the disabled prop from ButtonLink via Omit<ComponentProps<'a'>, 'disabled'>, eliminating the disabled story, and clarifying the semantic distinction between links and buttons, but does not fully address the open question about disabled semantics for link-based components.

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

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ntatoud/update-shadcn-components
📝 Coding Plan
  • Generate coding plan for human review comments

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 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.

Actionable comments posted: 2

🧹 Nitpick comments (5)
src/components/ui/dialog.tsx (2)

140-140: DialogTitle font size may be smaller than before.

Removing text-lg means the title will inherit the parent's font size (likely text-sm from DialogContent at line 60). Combined with changing from font-semibold to font-medium, titles will appear noticeably smaller and lighter.

If this is intentional per shadcn updates, the change is fine. Otherwise, consider keeping a size class for visual hierarchy.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/components/ui/dialog.tsx` at line 140, DialogTitle lost its explicit size
and weight by removing "text-lg" and changing "font-semibold" to "font-medium",
causing titles to inherit the parent small size; restore an explicit size (e.g.,
add "text-lg") and/or the stronger weight (e.g., "font-semibold") in the
DialogTitle className (the string passed to cn in the DialogTitle component) so
the title keeps its intended visual hierarchy.

33-36: Notable visual change: significantly lighter overlay.

The backdrop changes from bg-black/80 (80% opacity) to bg-black/10 (10% opacity) with backdrop blur. This is a substantial visual shift that makes the overlay much more transparent.

While this aligns with modern design trends favoring lighter overlays with blur effects, verify this works well across different background content (especially colorful or busy backgrounds) where a very light overlay might not provide sufficient visual separation.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/components/ui/dialog.tsx` around lines 33 - 36, The overlay opacity
change in the dialog component (the className passed into cn in
src/components/ui/dialog.tsx for the dialog backdrop) moved from bg-black/80 to
bg-black/10 making the backdrop much lighter; either restore the previous
opacity (bg-black/80) or make the overlay opacity configurable (add a prop like
overlayOpacity or variant and use it to choose bg-black/10 / bg-black/40 /
bg-black/80) so callers can pick appropriate contrast for busy backgrounds;
update the class assembly where cn(...) is called (the backdrop className) and
adjust any consuming code/tests to pass the new prop or keep the default at the
higher-opacity value.
src/components/ui/tooltip.tsx (1)

6-6: Consider UX implications of zero delay for tooltips.

Reducing delay from 500ms to 0ms means tooltips appear immediately on hover. While this provides a snappier feel, it may cause visual clutter in dense UI layouts (e.g., input groups with info icons, help buttons in forms) where users might trigger tooltips unintentionally while moving their cursor.

If this is intentional to match shadcn's latest defaults, consider documenting this behavior change. Individual components can still override via <TooltipProvider delay={500}> if needed.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/components/ui/tooltip.tsx` at line 6, The default tooltip delay was
changed to 0 (in the delay default in src/components/ui/tooltip.tsx), which
makes tooltips appear immediately and may cause unwanted visual clutter; either
revert the default to 500ms or add a clear comment/docstring near the
TooltipProvider/tooltip delay default explaining the intentional immediate-show
behavior and how components can override it (e.g., use <TooltipProvider
delay={500}>); update docs/README or inline comment to note the behavioral
change so consumers know to override per-component if needed.
src/components/ui/label.tsx (1)

7-7: Note: items-baselineitems-center alignment change.

Changing from items-baseline to items-center may affect how labels align with adjacent content (icons, badges, or multi-line text). If labels with icons previously aligned to text baseline, they will now center-align. This is likely intentional for the new styling, but worth noting for visual regression testing.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/components/ui/label.tsx` at line 7, The utility class for the Label
component was changed from items-baseline to items-center which will
center-align label content (icons/badges/multiline text) instead of aligning to
the text baseline; if baseline alignment is required restore the original class
in the Label component by replacing 'items-center' with 'items-baseline' in the
class string (search for the class string in label.tsx or the Label component),
otherwise confirm the intentional change and add/update visual/regression tests
for the Label usage (icons, badges, multiline) to validate the new alignment
across affected stories/components.
src/components/ui/alert.tsx (1)

7-7: Consider making action layout resilient to variable-width content.

AlertAction is absolute while the container reserves fixed space (pr-18). Longer action labels can overlap content in tight widths. A grid-column action layout would be more robust.

Optional layout refactor
- "group/alert relative grid w-full gap-0.5 rounded-lg border px-4 py-3 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] ..."
+ "group/alert relative grid w-full gap-0.5 rounded-lg border px-4 py-3 text-left text-sm has-data-[slot=alert-action]:grid-cols-[1fr_auto] has-[>svg]:grid-cols-[auto_1fr] ..."

- className={cn('absolute top-2.5 right-3', className)}
+ className={cn('col-start-2 row-start-1 self-start justify-self-end', className)}

Also applies to: 66-73

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/components/ui/alert.tsx` at line 7, The container currently reserves
fixed right padding (pr-18) while AlertAction is positioned absolute, which
causes overlap for long action labels; update the Alert container and
AlertAction components to use a grid-column layout instead of absolute
positioning: remove the absolute positioning on AlertAction and the fixed
padding token (pr-18) from the class string, add a responsive two-column grid
(e.g., main content + auto-width action column) via the container's grid
template or utility classes so the action occupies its own column, and ensure
AlertAction is placed in that second column (update the class list referenced in
the string literal and the AlertAction render so it uses grid column/auto
sizing); apply the same change for the other similar block noted (lines 66-73).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/components/ui/card.tsx`:
- Line 28: The Tailwind arbitrary variant selectors in the Card header class
string are targeting ancestors; update the self-targeting selectors to use the &
placeholder: replace '[.border-b]:pb-6' with '[&.border-b]:pb-6' and
'[.border-t]:pt-6' with '[&.border-t]:pt-6' in the class list used by the card
header (look for the 'group/card-header' class string in
src/components/ui/card.tsx) and make the same substitutions for the similar
class string near line 87.

In `@src/components/ui/label.tsx`:
- Line 7: The Tailwind classes 'group-data-[disabled=true]:pointer-events-none'
and 'group-data-[disabled=true]:opacity-50' in the label string in
src/components/ui/label.tsx are dead unless a parent uses both the 'group' class
and a data-disabled="true" attribute; either remove these two classes from the
label class list or, if they're intentional for a planned change, add a short
TODO comment in the FormField component next to the div rendering (the one using
className={cn('flex flex-col gap-1.5', props.className)}) stating that FormField
should add 'group' and toggle data-disabled when disabled so those selectors
will be effective.

---

Nitpick comments:
In `@src/components/ui/alert.tsx`:
- Line 7: The container currently reserves fixed right padding (pr-18) while
AlertAction is positioned absolute, which causes overlap for long action labels;
update the Alert container and AlertAction components to use a grid-column
layout instead of absolute positioning: remove the absolute positioning on
AlertAction and the fixed padding token (pr-18) from the class string, add a
responsive two-column grid (e.g., main content + auto-width action column) via
the container's grid template or utility classes so the action occupies its own
column, and ensure AlertAction is placed in that second column (update the class
list referenced in the string literal and the AlertAction render so it uses grid
column/auto sizing); apply the same change for the other similar block noted
(lines 66-73).

In `@src/components/ui/dialog.tsx`:
- Line 140: DialogTitle lost its explicit size and weight by removing "text-lg"
and changing "font-semibold" to "font-medium", causing titles to inherit the
parent small size; restore an explicit size (e.g., add "text-lg") and/or the
stronger weight (e.g., "font-semibold") in the DialogTitle className (the string
passed to cn in the DialogTitle component) so the title keeps its intended
visual hierarchy.
- Around line 33-36: The overlay opacity change in the dialog component (the
className passed into cn in src/components/ui/dialog.tsx for the dialog
backdrop) moved from bg-black/80 to bg-black/10 making the backdrop much
lighter; either restore the previous opacity (bg-black/80) or make the overlay
opacity configurable (add a prop like overlayOpacity or variant and use it to
choose bg-black/10 / bg-black/40 / bg-black/80) so callers can pick appropriate
contrast for busy backgrounds; update the class assembly where cn(...) is called
(the backdrop className) and adjust any consuming code/tests to pass the new
prop or keep the default at the higher-opacity value.

In `@src/components/ui/label.tsx`:
- Line 7: The utility class for the Label component was changed from
items-baseline to items-center which will center-align label content
(icons/badges/multiline text) instead of aligning to the text baseline; if
baseline alignment is required restore the original class in the Label component
by replacing 'items-center' with 'items-baseline' in the class string (search
for the class string in label.tsx or the Label component), otherwise confirm the
intentional change and add/update visual/regression tests for the Label usage
(icons, badges, multiline) to validate the new alignment across affected
stories/components.

In `@src/components/ui/tooltip.tsx`:
- Line 6: The default tooltip delay was changed to 0 (in the delay default in
src/components/ui/tooltip.tsx), which makes tooltips appear immediately and may
cause unwanted visual clutter; either revert the default to 500ms or add a clear
comment/docstring near the TooltipProvider/tooltip delay default explaining the
intentional immediate-show behavior and how components can override it (e.g.,
use <TooltipProvider delay={500}>); update docs/README or inline comment to note
the behavioral change so consumers know to override per-component if needed.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 33c1850c-42c5-46bc-aa0c-fbc70aa08fe5

📥 Commits

Reviewing files that changed from the base of the PR and between aa4edfd and dc1b1de.

📒 Files selected for processing (11)
  • src/components/ui/alert.tsx
  • src/components/ui/avatar.tsx
  • src/components/ui/button.tsx
  • src/components/ui/card.tsx
  • src/components/ui/dialog.tsx
  • src/components/ui/dropdown-menu.tsx
  • src/components/ui/label.tsx
  • src/components/ui/scroll-area.tsx
  • src/components/ui/separator.tsx
  • src/components/ui/sheet.tsx
  • src/components/ui/tooltip.tsx

Comment thread src/components/ui/card.tsx Outdated
data-slot="card-header"
className={cn(
'@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-4 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-4',
'group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-6 group-data-[size=sm]/card:px-4 has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-6 group-data-[size=sm]/card:[.border-b]:pb-4',
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.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🌐 Web query:

In Tailwind CSS v4.1, for a class variant like [.border-b]:pb-6, does this target the element itself when it has class border-b, or should self-targeting use [&.border-b]:pb-6 instead?

💡 Result:

[.border-b]:pb-6 does not self-target — it generates a rule that applies to an element with the Tailwind class when it is inside an ancestor that matches .border-b (roughly: .border-b .\[\.border-b\]\:pb-6 { padding-bottom: ... }).

For “this same element also has border-b”, you should use the & placeholder: [&.border-b]:pb-6 (Tailwind’s docs describe arbitrary variants as selector format strings, and show self-targeting with & like [&.is-dragging]:...). [1]

Source: Tailwind “Using arbitrary variants” documentation. [1]


Use [&.border-b] and [&.border-t] for self-targeting in arbitrary Tailwind variants.

The selectors [.border-b]:pb-6 and [.border-t]:pt-6 target ancestors with those classes, not the component itself. For conditional spacing when this element has the border class, use the & placeholder: [&.border-b]:pb-6 and [&.border-t]:pt-6.

Required changes
- '... [.border-b]:pb-6 ...'
+ '... [&.border-b]:pb-6 ...'

- '... [.border-t]:pt-6 ...'
+ '... [&.border-t]:pt-6 ...'

Also applies to: line 87

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/components/ui/card.tsx` at line 28, The Tailwind arbitrary variant
selectors in the Card header class string are targeting ancestors; update the
self-targeting selectors to use the & placeholder: replace '[.border-b]:pb-6'
with '[&.border-b]:pb-6' and '[.border-t]:pt-6' with '[&.border-t]:pt-6' in the
class list used by the card header (look for the 'group/card-header' class
string in src/components/ui/card.tsx) and make the same substitutions for the
similar class string near line 87.


const labelVariants = cva(
'flex items-baseline gap-1.5 text-sm peer-disabled:cursor-not-allowed peer-disabled:opacity-50'
'flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50'
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.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Search for usages of "group" class combined with data-disabled in form-related components
echo "=== Checking FormField for group class ==="
rg -n "group" src/components/form/form-field.tsx

echo ""
echo "=== Checking for data-disabled usage in form components ==="
rg -n "data-disabled" src/components/form/

echo ""
echo "=== Checking Label usage contexts that might have group + data-disabled ==="
rg -B5 -A5 "<Label" --type=tsx | head -100

Repository: BearStudio/start-ui-web

Length of output: 292


🏁 Script executed:

#!/bin/bash

echo "=== Checking label.tsx content ==="
cat -n src/components/ui/label.tsx

echo ""
echo "=== Checking form-field.tsx content ==="
cat -n src/components/form/form-field.tsx

echo ""
echo "=== Searching for group-data-[disabled usage ==="
rg "group-data-\[disabled" .

echo ""
echo "=== Searching for data-disabled attribute ==="
rg "data-disabled" .

echo ""
echo "=== Searching for 'group' class in form components ==="
rg "group" src/components/form/ -A2 -B2

echo ""
echo "=== Checking if Label is wrapped by group-enabled components ==="
rg -B10 "Label" src/components/form/ | head -150

Repository: BearStudio/start-ui-web

Length of output: 35449


🏁 Script executed:

#!/bin/bash

echo "=== Checking form-field-controller.tsx ==="
cat src/components/form/form-field-controller.tsx | head -80

echo ""
echo "=== Checking if any component adds group class to FormField ==="
rg "FormField" src/components/form/ -A3 | grep -E "(group|data-disabled)" | head -20

Repository: BearStudio/start-ui-web

Length of output: 1996


🏁 Script executed:

#!/bin/bash

echo "=== Finding form-field-controller ==="
find src/components/form -name "*field-controller*" -type f

echo ""
echo "=== Checking FormFieldContainer ==="
find src/components/form -name "*form-field-container*" -type f | xargs cat -n

echo ""
echo "=== Search for where data-disabled or group might be added to form fields ==="
rg "disabled" src/components/form/form-field-container.tsx -B2 -A2

Repository: BearStudio/start-ui-web

Length of output: 526


🏁 Script executed:

#!/bin/bash

echo "=== Checking if any component wraps FormField with group class ==="
rg -B5 "FormField" src/components/ | grep -E "(className.*group|group.*className)" | head -20

echo ""
echo "=== Checking how Label is actually used in practice (find complete examples) ==="
rg "FormFieldLabel" src/components/form/*/docs.stories.tsx -B3 -A3 | head -60

Repository: BearStudio/start-ui-web

Length of output: 6079


Clarify if group-data-[disabled=true] selectors are intentional or dead code.

The new group-data-[disabled=true]:pointer-events-none and group-data-[disabled=true]:opacity-50 classes require a parent element with both the group Tailwind class and data-disabled="true" attribute. However, FormField (the primary container) only renders <div className={cn('flex flex-col gap-1.5', props.className)}> without these attributes. This means these selectors cannot activate in the standard form field context.

The peer-disabled selector will still work when an input element is disabled, but the group-data-[disabled=true] rules appear unused. If this is preparation for a future FormField update, add a TODO comment explaining the intent. Otherwise, remove these unused classes.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/components/ui/label.tsx` at line 7, The Tailwind classes
'group-data-[disabled=true]:pointer-events-none' and
'group-data-[disabled=true]:opacity-50' in the label string in
src/components/ui/label.tsx are dead unless a parent uses both the 'group' class
and a data-disabled="true" attribute; either remove these two classes from the
label class list or, if they're intentional for a planned change, add a short
TODO comment in the FormField component next to the div rendering (the one using
className={cn('flex flex-col gap-1.5', props.className)}) stating that FormField
should add 'group' and toggle data-disabled when disabled so those selectors
will be effective.

@ntatoud ntatoud marked this pull request as ready for review March 15, 2026 11:17
Copy link
Copy Markdown
Member

@ivan-dalmet ivan-dalmet left a comment

Choose a reason for hiding this comment

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

Some spacing issues

image image

@ivan-dalmet
Copy link
Copy Markdown
Member

Style issue on dashboard

Before

image

Now

image

@ivan-dalmet
Copy link
Copy Markdown
Member

Issue in user card

Before

image

Now

image

@ivan-dalmet
Copy link
Copy Markdown
Member

ivan-dalmet commented Mar 16, 2026

Before

image

Now

image

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)
src/features/devtools/login-hint.tsx (1)

54-55: Consider adding flex-wrap for consistency.

Line 23 uses flex flex-wrap gap-x-1 while this line uses only flex gap-x-1. While the OTP code is typically short enough that wrapping is unlikely, adding flex-wrap would maintain consistency with LoginEmailHint and handle edge cases on narrow viewports.

♻️ Suggested change
-      <AlertDescription className="flex gap-x-1 text-sm leading-4">
+      <AlertDescription className="flex flex-wrap gap-x-1 text-sm leading-4">
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/features/devtools/login-hint.tsx` around lines 54 - 55, In
AlertDescription inside src/features/devtools/login-hint.tsx (the JSX element
named AlertDescription), add the tailwind utility "flex-wrap" to the existing
className "flex gap-x-1" so it becomes consistent with LoginEmailHint's "flex
flex-wrap gap-x-1" and prevents layout issues on narrow viewports; update the
className string on the AlertDescription element accordingly.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@src/features/devtools/login-hint.tsx`:
- Around line 54-55: In AlertDescription inside
src/features/devtools/login-hint.tsx (the JSX element named AlertDescription),
add the tailwind utility "flex-wrap" to the existing className "flex gap-x-1" so
it becomes consistent with LoginEmailHint's "flex flex-wrap gap-x-1" and
prevents layout issues on narrow viewports; update the className string on the
AlertDescription element accordingly.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: c790fda3-7f5b-41d2-a196-51ba7a3f840a

📥 Commits

Reviewing files that changed from the base of the PR and between 07274ef and db47677.

📒 Files selected for processing (1)
  • src/features/devtools/login-hint.tsx

ntatoud and others added 3 commits March 17, 2026 16:07
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
A link cannot be semantically disabled.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Reverts card.tsx to its previous styling (rounded-sm, border, py-4, gap-2,
font-semibold titles) as the new shadcn defaults don't fit the current design.

Also fixes a whitespace collapse bug in login-hint flex containers where
trailing {' '} was being stripped — replaced with gap-x-1.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

Actionable comments posted: 4

🧹 Nitpick comments (1)
src/components/ui/dialog.tsx (1)

140-140: Title loses explicit sizing and visual weight.

Removing text-lg and switching from font-semibold to font-medium makes dialog titles smaller and lighter. The title now inherits font size rather than explicitly setting it, which could lead to inconsistent sizing depending on parent context.

Consider retaining text-lg (or equivalent like text-base) to ensure consistent title sizing across different dialog usage contexts.

♻️ Suggested fix to preserve explicit sizing
-      className={cn('leading-none font-medium', className)}
+      className={cn('text-lg leading-none font-medium', className)}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/components/ui/dialog.tsx` at line 140, The dialog title lost explicit
sizing and weight; update the DialogTitle className usage (the line rendering
className={cn('leading-none font-medium', className)}) to include an explicit
size and stronger weight—e.g., add text-lg and font-semibold so it becomes
cn('text-lg font-semibold leading-none', className)—to ensure consistent title
sizing and visual weight across contexts.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/components/ui/alert.tsx`:
- Line 7: The alert component hardcodes LTR utilities ("text-left" and a
"right-3" positioning) which break RTL layouts; update the main class string in
the group/alert element (the long class that currently contains "text-left") to
use logical-direction utilities (replace "text-left" with "text-start"), and
update any positioning instances that use "right-3" (e.g., the action/icon
wrapper referenced in this file) to their logical equivalents (e.g., "end-3") so
the Alert becomes RTL-safe while keeping the same visual layout in LTR.

In `@src/components/ui/dialog.tsx`:
- Line 34: The overlay opacity was reduced from bg-black/80 to bg-black/10 in
the dialog overlay class string, which makes the backdrop nearly transparent and
may cause visual regressions; update the class in the Dialog overlay (the fixed
inset-0 isolate z-50 ... string in src/components/ui/dialog.tsx) to use a
stronger semi-transparent value (for example bg-black/50 or bg-black/70) and
retain the supports-backdrop-filter:backdrop-blur-xs token so the blur still
applies conditionally—choose the value that matches your design tokens or theme
variables and adjust the class string accordingly to restore appropriate dialog
prominence.

In `@src/components/ui/scroll-area.tsx`:
- Line 43: The scroll-area component's orientation selectors use non-existent
attributes data-horizontal/data-vertical, so in the ScrollArea (the CSS/string
that builds the scrollbar/track classes) replace those selectors with the
attribute form using data-[orientation=horizontal] and
data-[orientation=vertical] (e.g., change data-horizontal:h-2.5 ...
data-vertical:w-2.5 to data-[orientation=horizontal]:h-2.5 ...
data-[orientation=vertical]:w-2.5) so the primitive's emitted data-orientation
attribute actually applies the styles.

In `@src/components/ui/tooltip.tsx`:
- Around line 5-7: The global TooltipProvider default of delay = 0 causes all
tooltips to open instantly and is being reapplied because Tooltip currently
always creates its own provider; to fix, remove the immediate default (change
TooltipProvider signature to not default delay to 0, e.g., leave it undefined)
and update Tooltip so it does not unconditionally wrap its content in a new
TooltipProvider—instead detect an existing provider (or only create a provider
when none exists) and pass through any delay prop; finally, set delay={0}
explicitly where the sidebar needs immediate tooltips so the behavior remains
scoped (refer to TooltipProvider and Tooltip functions to locate changes).

---

Nitpick comments:
In `@src/components/ui/dialog.tsx`:
- Line 140: The dialog title lost explicit sizing and weight; update the
DialogTitle className usage (the line rendering className={cn('leading-none
font-medium', className)}) to include an explicit size and stronger weight—e.g.,
add text-lg and font-semibold so it becomes cn('text-lg font-semibold
leading-none', className)—to ensure consistent title sizing and visual weight
across contexts.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 4280d34b-ca33-4ba5-a5a2-18294280b8ab

📥 Commits

Reviewing files that changed from the base of the PR and between db47677 and 61857ea.

📒 Files selected for processing (13)
  • src/components/ui/alert.tsx
  • src/components/ui/avatar.tsx
  • src/components/ui/button-link.stories.tsx
  • src/components/ui/button-link.tsx
  • src/components/ui/button.tsx
  • src/components/ui/dialog.tsx
  • src/components/ui/dropdown-menu.tsx
  • src/components/ui/label.tsx
  • src/components/ui/scroll-area.tsx
  • src/components/ui/separator.tsx
  • src/components/ui/sheet.tsx
  • src/components/ui/tooltip.tsx
  • src/features/devtools/login-hint.tsx
💤 Files with no reviewable changes (1)
  • src/components/ui/button-link.stories.tsx
🚧 Files skipped from review as they are similar to previous changes (4)
  • src/components/ui/label.tsx
  • src/features/devtools/login-hint.tsx
  • src/components/ui/button.tsx
  • src/components/ui/dropdown-menu.tsx


const alertVariants = cva(
'relative grid w-full grid-cols-[0_1fr] items-start gap-y-0.5 rounded-lg border px-4 py-3 text-sm has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] has-[>svg]:gap-x-3 [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current',
"group/alert relative grid w-full gap-0.5 rounded-lg border px-4 py-3 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2.5 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4",
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.

⚠️ Potential issue | 🟡 Minor

Use logical-direction utilities to keep Alert RTL-safe.

Line 7 (text-left) and Line 70 (right-3) hardcode LTR direction. This can misalign alert content/actions in RTL locales.

💡 Proposed fix
-  "group/alert relative grid w-full gap-0.5 rounded-lg border px-4 py-3 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2.5 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4",
+  "group/alert relative grid w-full gap-0.5 rounded-lg border px-4 py-3 text-start text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2.5 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4",
-      className={cn('absolute top-2.5 right-3', className)}
+      className={cn('absolute top-2.5 end-3', className)}

Also applies to: 70-70

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/components/ui/alert.tsx` at line 7, The alert component hardcodes LTR
utilities ("text-left" and a "right-3" positioning) which break RTL layouts;
update the main class string in the group/alert element (the long class that
currently contains "text-left") to use logical-direction utilities (replace
"text-left" with "text-start"), and update any positioning instances that use
"right-3" (e.g., the action/icon wrapper referenced in this file) to their
logical equivalents (e.g., "end-3") so the Alert becomes RTL-safe while keeping
the same visual layout in LTR.

Comment thread src/components/ui/dialog.tsx Outdated
data-slot="dialog-overlay"
className={cn(
'fixed inset-0 isolate z-50 bg-black/80 backdrop-blur-xs duration-100 data-closed:animate-out data-closed:fade-out-0 data-open:animate-in data-open:fade-in-0',
'fixed inset-0 isolate z-50 bg-black/10 duration-100 data-closed:animate-out data-closed:fade-out-0 data-open:animate-in data-open:fade-in-0 supports-backdrop-filter:backdrop-blur-xs',
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.

⚠️ Potential issue | 🟠 Major

Significant overlay opacity reduction may cause visual regression.

The overlay opacity changed from bg-black/80 (80%) to bg-black/10 (10%) — an 8× reduction. Combined with the conditional supports-backdrop-filter:backdrop-blur-xs, this makes the overlay nearly transparent by default.

Given the visual regressions reported in PR comments, this dramatic change may reduce dialog prominence and affect readability of content behind the overlay. Consider whether this aligns with the project's design intent or if a middle-ground value (e.g., bg-black/50) would better balance the update with existing UX.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/components/ui/dialog.tsx` at line 34, The overlay opacity was reduced
from bg-black/80 to bg-black/10 in the dialog overlay class string, which makes
the backdrop nearly transparent and may cause visual regressions; update the
class in the Dialog overlay (the fixed inset-0 isolate z-50 ... string in
src/components/ui/dialog.tsx) to use a stronger semi-transparent value (for
example bg-black/50 or bg-black/70) and retain the
supports-backdrop-filter:backdrop-blur-xs token so the blur still applies
conditionally—choose the value that matches your design tokens or theme
variables and adjust the class string accordingly to restore appropriate dialog
prominence.

'h-full w-2.5 border-l border-l-transparent',
orientation === 'horizontal' &&
'h-2.5 flex-col border-t border-t-transparent',
'flex touch-none p-px transition-colors select-none data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-transparent data-vertical:h-full data-vertical:w-2.5 data-vertical:border-l data-vertical:border-l-transparent',
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.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🌐 Web query:

In @base-ui/react/scroll-areav1.2.0, what orientation data attributes are emitted on ScrollArea.Scrollbar? Does it emitdata-horizontal/data-vertical, or only data-orientation="horizontal|vertical"?

💡 Result:

In @base-ui/react/scroll-area@1.2.0, ScrollArea.Scrollbar emits only:

  • data-orientation="vertical" or data-orientation="horizontal" (derived from the orientation state key) [1]

It does not emit data-horizontal / data-vertical. The default state→data-attribute behavior is data-${key.toLowerCase()} (or a custom mapping where provided), which yields data-orientation=..., not data-horizontal/data-vertical [2].

Sources:
[1] Base UI v1.2.0 ScrollAreaScrollbarDataAttributes.ts (orientation = data-orientation) https://github.com/mui/base-ui/blob/v1.2.0/packages/react/src/scroll-area/scrollbar/ScrollAreaScrollbarDataAttributes.ts
[2] Base UI v1.2.0 getStateAttributesProps.ts (default data-${key.toLowerCase()} mapping) https://github.com/mui/base-ui/blob/v1.2.0/packages/react/src/utils/getStateAttributesProps.ts


Replace data-horizontal / data-vertical selectors with data-orientation.

The @base-ui/react/scroll-area@1.2.0 primitive emits only data-orientation="horizontal|vertical", not data-horizontal/data-vertical attributes. The current selectors are no-ops and won't style the scrollbar. Update to:

'flex touch-none p-px transition-colors select-none data-[orientation=horizontal]:h-2.5 data-[orientation=horizontal]:flex-col data-[orientation=horizontal]:border-t data-[orientation=horizontal]:border-t-transparent data-[orientation=vertical]:h-full data-[orientation=vertical]:w-2.5 data-[orientation=vertical]:border-l data-[orientation=vertical]:border-l-transparent',
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/components/ui/scroll-area.tsx` at line 43, The scroll-area component's
orientation selectors use non-existent attributes data-horizontal/data-vertical,
so in the ScrollArea (the CSS/string that builds the scrollbar/track classes)
replace those selectors with the attribute form using
data-[orientation=horizontal] and data-[orientation=vertical] (e.g., change
data-horizontal:h-2.5 ... data-vertical:w-2.5 to
data-[orientation=horizontal]:h-2.5 ... data-[orientation=vertical]:w-2.5) so
the primitive's emitted data-orientation attribute actually applies the styles.

Comment thread src/components/ui/tooltip.tsx
…ay explicitly

The z-50 was mistakenly removed along with z-60. Also removes the
default forceRenderOverlay=true from DrawerContent/DialogContent and
passes it explicitly in sidebar-nested usages (BuildInfoDrawer,
ConfirmSignOut) so the backdrop renders correctly on mobile.

Co-authored-by: Claude <noreply@anthropic.com>
@sonarqubecloud
Copy link
Copy Markdown

@ntatoud
Copy link
Copy Markdown
Member Author

ntatoud commented Mar 17, 2026

I also noticed the backdrop blur of the sign out modal was not applied properly on mobile (floating element inside of the sidebar sheet)

I fixed by forcing overlay render in src/features/auth/confirm-signout.tsx

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.

ButtonLink disabled not working

2 participants