Skip to content

Conversation

@Coded5
Copy link

@Coded5 Coded5 commented Jan 19, 2026

Why did you create this PR

  • Add sidebar component

What did you do

  • Create sidebar component
  • shadcn's other component (skeleton, sheet)

If anyone is using the sidebar refer to https://www.shadcn-svelte.com/docs/components/sidebar

@changeset-bot
Copy link

changeset-bot bot commented Jan 19, 2026

⚠️ No Changeset found

Latest commit: c7808c3

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

@saenyakorn
Copy link
Member

Please add a screenshot and / or video recording of the result of what you did in this PR.

Copy link
Member

Choose a reason for hiding this comment

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

You may not need this class.

See svelte-media-query-store

Copy link
Member

Choose a reason for hiding this comment

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

I do think that every components in shadcn-svelte would be "primitives" na (in this case, "atoms"). To avoid confusion.

Copy link
Member

Choose a reason for hiding this comment

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

I think SheetContent should be simpler na? Like in shadcn-svelte it's just a div. To decouple Sheet functionality to be composible.

Copy link
Author

Choose a reason for hiding this comment

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

Every component in this PR is imported from shadcn-svelte though, I'm not sure how to apply your comments :(

Comment on lines +5 to +10
import {
SIDEBAR_COOKIE_MAX_AGE,
SIDEBAR_COOKIE_NAME,
SIDEBAR_WIDTH,
SIDEBAR_WIDTH_ICON
} from './constants.js';
Copy link
Member

Choose a reason for hiding this comment

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

This logic should not be in pacakges/ui. Package should be something general. Hard coding or specific business logic should be passed from "app"

onOpenChange(value);
// This sets the cookie to keep the sidebar state.
document.cookie = `${SIDEBAR_COOKIE_NAME}=${open}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`;
Copy link
Member

Choose a reason for hiding this comment

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

Like previous comment. This should be from "app"

//Please refer for to: https://www.shadcn-svelte.com/docs/components/sidebar
</script>

<!-- TODO: -->
Copy link
Member

Choose a reason for hiding this comment

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

Will you fix TODO in this PR?

@@ -0,0 +1,101 @@
<script lang="ts">
Copy link
Member

Choose a reason for hiding this comment

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

This component should be in the app. Not package/ui

Package should be something simple / customizable. No complex UI

@Coded5 Coded5 linked an issue Jan 20, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

[FEATURE] Sidebar components (Frontend)

3 participants