Skip to content

fix(tree-view): remove unnecessary right margin from nested content#361

Merged
ieedan merged 1 commit intoieedan:mainfrom
braden-w:fix/tree-view-nested-right-margin
Mar 15, 2026
Merged

fix(tree-view): remove unnecessary right margin from nested content#361
ieedan merged 1 commit intoieedan:mainfrom
braden-w:fix/tree-view-nested-right-margin

Conversation

@braden-w
Copy link
Contributor

@braden-w braden-w commented Mar 14, 2026

The folder's Collapsible.Content uses mx-2 border-l for indentation, but only the left margin is needed for the visual indent. The right margin (mr-2) shrinks the available width by 0.5rem per nesting level, causing highlight/selection bars to be progressively narrower at deeper levels.

One-line change:

-<Collapsible.Content class="mx-2 border-l">
+<Collapsible.Content class="ml-2 border-l">

Before:

image

After:

image

Discovered while building a file explorer where nested items had visibly shorter hover/selection highlights than their top-level siblings—related to #360 but addresses a separate width constraint.

Change Collapsible.Content from mx-2 to ml-2 so nested items only
indent on the left. The right margin shrinks the available width by
0.5rem per nesting level, causing highlight/selection bars to be
progressively narrower at deeper levels.
@changeset-bot
Copy link

changeset-bot bot commented Mar 14, 2026

⚠️ No Changeset found

Latest commit: e586aa2

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link

vercel bot commented Mar 14, 2026

@braden-w is attempting to deploy a commit to the Aidan Bleser's Team Team on Vercel.

A member of the Team first needs to authorize it.

@vercel
Copy link

vercel bot commented Mar 15, 2026

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

Project Deployment Actions Updated (UTC)
shadcn-svelte-extras Ready Ready Preview, Comment Mar 15, 2026 6:15pm

Copy link
Owner

@ieedan ieedan left a comment

Choose a reason for hiding this comment

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

Thank you!

@ieedan ieedan merged commit 227dea5 into ieedan:main Mar 15, 2026
3 checks passed
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.

2 participants