Skip to content

[WEB-4740] feat: add propel seperator#7637

Merged
sriramveeraghanta merged 16 commits intopreviewfrom
feat-propel-seperator
Sep 1, 2025
Merged

[WEB-4740] feat: add propel seperator#7637
sriramveeraghanta merged 16 commits intopreviewfrom
feat-propel-seperator

Conversation

@JayashTripathy
Copy link
Member

@JayashTripathy JayashTripathy commented Aug 25, 2025

Description

This PR adds a separator component to propel package with its respective stories.

Type of Change

  • Feature (non-breaking change which adds functionality)

Screenshots and Media (if applicable)

image

Summary by CodeRabbit

  • New Features

    • Introduced a Separator UI component with horizontal and vertical orientations.
    • Added a lightweight classnames utility for composing className values.
    • Added comprehensive global Tailwind CSS design tokens, themes, and utilities.
    • Enabled interactive Storybook for the Propel package with dev and build scripts.
  • Documentation

    • Added Storybook stories and preview configuration for showcase and autodocs.
  • Chores

    • Ignored Storybook static build outputs in version control.
    • Added a Turbo task for building Storybook artifacts.
    • Integrated Storybook ESLint plugin and required dependencies.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Aug 25, 2025

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Warning

Rate limit exceeded

@JayashTripathy has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 19 minutes and 47 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 682783e and e5fac3c.

📒 Files selected for processing (1)
  • packages/propel/src/separator/separator.tsx (1 hunks)

Walkthrough

Removes Tailwind merge from the classname utility to rely solely on clsx. Adds a new Separator component wrapping @base-ui-components’ SeparatorPrimitive with orientation-based sizing and classes. Introduces Storybook stories for horizontal, vertical, and container-embedded Separator variants.

Changes

Cohort / File(s) Summary
Utility: classname
packages/propel/src/utils/classname.tsx
Removed tailwind-merge usage; cn now returns clsx(inputs) while keeping the same signature.
UI Component: Separator
packages/propel/src/separator/separator.tsx
New Separator React component (forwardRef) exporting Separator and SeparatorProps; applies base styles and orientation-based dimensions; forwards ref to base primitive.
Storybook: Separator
packages/propel/src/separator/separator.stories.tsx
New stories: Default (horizontal), Vertical, and WithinContainer; adds default meta for Storybook.

Sequence Diagram(s)

sequenceDiagram
  participant App as App/Consumer
  participant Sep as Separator (new)
  participant Base as SeparatorPrimitive (@base-ui-components)

  App->>Sep: Render <Separator orientation=... className=... />
  Note over Sep: Compute classes via clsx + orientation sizing
  Sep->>Base: Forward props, ref, data-* attrs
  Base-->>App: Rendered DOM element (hr/div) sized by orientation
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

🌐frontend

Suggested reviewers

  • anmolsinghbhatia
  • vamsikrishnamathala
  • sriramveeraghanta

Poem

I nudge the styles with gentle hops,
From twMerge fields to clsx crops—
A slender line, a tidy split,
A Separator’s perfect fit.
In Storybook I twitch my nose,
Vertical, horizontal—pose!
Carrots aligned; the UI grows. 🥕✨

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat-propel-seperator

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

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

Other keywords and placeholders

  • Add @coderabbitai ignore or @coderabbit ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@makeplane
Copy link

makeplane bot commented Aug 25, 2025

Pull Request Linked with Plane Work Items

Comment Automatically Generated by Plane

Copy link
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: 8

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (3)
packages/propel/package.json (2)

16-28: Export the new Separator component (and fix the “seperator” naming) so consumers can import it

There’s no export entry for the new component, and the folder/file are spelled “seperator”. This will make the public import path inconsistent and hard to discover. Ship it as “separator” across the board and expose it via the export map.

Apply this diff to add an export (assuming you also rename the folder to src/separator/ and add an index.ts re-export):

   "exports": {
     "./avatar": "./src/avatar/index.ts",
     "./charts/*": "./src/charts/*/index.ts",
     "./dialog": "./src/dialog/index.ts",
     "./menu": "./src/menu/index.ts",
     "./table": "./src/table/index.ts",
     "./tabs": "./src/tabs/index.ts",
     "./popover": "./src/popover/index.ts",
     "./command": "./src/command/index.ts",
     "./combobox": "./src/combobox/index.ts",
     "./tooltip": "./src/tooltip/index.ts",
+    "./separator": "./src/separator/index.ts",
     "./styles/fonts": "./src/styles/fonts/index.css"
   },

And create packages/propel/src/separator/index.ts:

export { Separator } from "./separator";
export type { SeparatorProps } from "./separator";

44-54: Add Storybook essentials so Controls/Docs actually work

You’re configuring Controls in preview.ts, but no addons are registered. Add Essentials to get Actions, Controls, Docs, etc.

   "devDependencies": {
     "@plane/eslint-config": "workspace:*",
     "@plane/tailwind-config": "workspace:*",
     "@plane/typescript-config": "workspace:*",
     "@storybook/react-vite": "^9.1.2",
     "@types/react": "18.3.1",
     "@types/react-dom": "18.3.0",
+    "@storybook/addon-essentials": "^9.1.2",
     "eslint-plugin-storybook": "^9.1.2",
     "storybook": "^9.1.2",
     "typescript": "5.8.3"
   }
packages/propel/src/seperator/seperator.tsx (1)

1-36: Rename misnamed files to “separator”

The component and story filenames in packages/propel/src/separator are spelled “seperator” but export a Separator component. This inconsistency will lead to confusing public import paths and should be corrected now.

• Rename under packages/propel/src/separator:
seperator.tsxseparator.tsx
seperator.stories.tsxseparator.stories.tsx
• Update imports in the story file:

- import { Separator } from "./seperator";
+ import { Separator } from "./separator";

• Adjust your package’s export map (e.g. package.json exports) or any index files to point to the new filenames.
• Review documentation, README, and tests for lingering references.

Additionally, there’s a misspelling in a comment in the editor package:

• In packages/editor/src/core/extensions/custom-link/helpers/autolink.ts, change

// We want to make sure to include the block seperator argument…

to

// We want to make sure to include the block separator argument…

To find all occurrences before and after renaming, run:

rg -nP '\bseperator\b' -C2
🧹 Nitpick comments (10)
.gitignore (1)

100-101: Ignore pattern looks fine; optionally make it explicit and keep it under the Storybook section.

  • The pattern will match storybook-static directories anywhere. For clarity, consider adding a trailing slash and grouping it with the other Storybook ignores.

Apply this small tweak (optional):

-storybook-static
+storybook-static/

Also consider moving it under the existing ## Storybook header for maintainability.

packages/propel/src/utils/classname.tsx (1)

1-3: Nit: use .ts (no JSX) and consider a short JSDoc.

This file doesn’t contain JSX; .ts is sufficient and avoids extra TSX transforms. Adding a brief JSDoc on cn makes IDE hovers clearer.

turbo.json (1)

28-31: Good addition; consider scoping inputs to improve cache hits and avoid noisy rebuilds.

outputs is correct for Storybook. To improve Turborepo caching and avoid invalidation from unrelated files, consider adding targeted inputs and excluding build artifacts.

Example:

     "build-storybook": {
       "dependsOn": ["^build"],
-      "outputs": ["storybook-static/**"]
+      "outputs": ["storybook-static/**"],
+      "inputs": [
+        "**/*",
+        "!**/.next/**",
+        "!**/dist/**",
+        "!**/storybook-static/**"
+      ]
     },

If Storybook is only configured in selected packages, you can also add a convention (e.g., only run where a storybook script exists) in the pipeline, but that’s outside turbo.json scope.

packages/propel/package.json (1)

12-14: Minor: include storybook-static in the clean script (optional)

Handy during local dev to avoid stale static builds.

-    "clean": "rm -rf .turbo && rm -rf .next && rm -rf node_modules && rm -rf dist",
+    "clean": "rm -rf .turbo .next node_modules dist storybook-static",
packages/propel/.storybook/preview.ts (1)

4-10: Optional: add default matchers for color/date controls

Small DX boost; safe default.

 const preview: Preview = {
   parameters: {
     controls: {
-      matchers: {},
+      matchers: {
+        color: /(background|color)$/i,
+        date: /Date$/,
+      },
     },
   },
 };
packages/tailwind-config/global.css (1)

377-383: Global scrollbar hide may surprise story authors

Hiding all WebKit scrollbars by default can make debugging long content harder inside Storybook. Consider scoping this (e.g., to app root) or documenting the .vertical-scrollbar/.horizontal-scrollbar escape hatches.

packages/propel/src/seperator/seperator.tsx (1)

5-11: Redundant type: orientation already exists on the primitive props

Since SeparatorProps extends the primitive’s props, redefining orientation is unnecessary and risks drift if upstream changes. Let the base type own it; document the default in the component JSDoc instead.

-interface SeparatorProps extends React.ComponentProps<typeof SeparatorPrimitive> {
-  /**
-   * The orientation of the separator
-   * @default "horizontal"
-   */
-  orientation?: "horizontal" | "vertical";
-}
+type SeparatorProps = React.ComponentProps<typeof SeparatorPrimitive>;

You can keep the defaulting behavior at the call-site:

-({ orientation = "horizontal", ...props }, ref) => {
+({ orientation = "horizontal", ...props }, ref) => {
   // unchanged
packages/propel/src/seperator/seperator.stories.tsx (3)

4-11: Use “satisfies Meta<...>” for stricter meta typing.

This keeps excess properties from slipping in while preserving inference.

-const meta: Meta<typeof Separator> = {
+const meta = {
   title: "Components/Separator",
   component: Separator,
   parameters: {
     layout: "centered",
   },
   tags: ["autodocs"],
-};
+} satisfies Meta<typeof Separator>;

16-34: Drive stories via args so variants share the same surface and autodocs stays in sync.

Using args instead of hardcoded prop values improves controls/Docs and reduces duplication between Default and Vertical.

 export const Default: Story = {
-  render: () => (
+  args: { orientation: "horizontal" },
+  render: (args) => (
     <div className="w-[300px] space-y-4">
       <div>Content Above</div>
-      <Separator />
+      <Separator {...args} />
       <div>Content Below</div>
     </div>
   ),
 };
 
 export const Vertical: Story = {
-  render: () => (
+  args: { orientation: "vertical" },
+  render: (args) => (
     <div className="flex h-[100px] items-center space-x-4">
       <div>Left Content</div>
-      <Separator orientation="vertical" />
+      <Separator {...args} />
       <div>Right Content</div>
     </div>
   ),
 };

1-1: Optional: Import Storybook types from @storybook/react instead of @storybook/react-vite for future compatibility

Our repo currently only depends on @storybook/react-vite@^9.1.2 and does not have @storybook/react installed. If you’d like to align with the “framework-agnostic” type exports introduced in Storybook 7+ and avoid churn should Storybook split or rename framework packages in the future, you can:

  • Add @storybook/react to your devDependencies (e.g. yarn add -D @storybook/react@^9.1.2).
  • Update your import in packages/propel/src/seperator/seperator.stories.tsx accordingly.

Suggested diff:

-import type { Meta, StoryObj } from "@storybook/react-vite";
+import type { Meta, StoryObj } from "@storybook/react";

This change is entirely optional—if your team prefers to standardize on the react-vite entrypoint today, you can leave it as-is.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between a2d9e70 and 997e380.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (11)
  • .gitignore (1 hunks)
  • packages/propel/.eslintrc.js (1 hunks)
  • packages/propel/.storybook/main.ts (1 hunks)
  • packages/propel/.storybook/preview.ts (1 hunks)
  • packages/propel/package.json (3 hunks)
  • packages/propel/src/seperator/seperator.stories.tsx (1 hunks)
  • packages/propel/src/seperator/seperator.tsx (1 hunks)
  • packages/propel/src/utils/classname.tsx (1 hunks)
  • packages/propel/src/utils/index.ts (1 hunks)
  • packages/tailwind-config/global.css (1 hunks)
  • turbo.json (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
packages/propel/src/seperator/seperator.stories.tsx (1)
packages/propel/src/seperator/seperator.tsx (1)
  • Separator (34-34)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (4)
packages/propel/src/utils/index.ts (1)

1-1: LGTM — utility barrel export is straightforward.

packages/propel/.eslintrc.js (1)

4-4: ESLint: Storybook recommended rules enabled — looks good.

The extension is appropriate for the new stories. Assuming eslint-plugin-storybook is added in devDependencies (as it appears in package.json), no further changes needed.

packages/propel/src/seperator/seperator.tsx (1)

22-24: Token usage check: ensure bg-custom-border-200 exists in Tailwind theme

The class implies a custom color token. Confirm it’s defined in @plane/tailwind-config so the separator renders as intended.

packages/propel/src/seperator/seperator.stories.tsx (1)

13-15: LGTM: Default export and Story alias are correct.

Meta default export and StoryObj alias pattern is consistent with Storybook recommendations.

Copilot AI review requested due to automatic review settings September 1, 2025 12:28
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a new Separator component to the propel package, providing horizontal and vertical divider functionality for UI layouts. The implementation uses Base UI components as the foundation and includes comprehensive Storybook documentation.

  • Added a reusable Separator component with horizontal/vertical orientation support
  • Updated the classname utility to use only clsx (removing tailwind-merge dependency)
  • Created comprehensive Storybook stories demonstrating different separator use cases

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
packages/propel/src/utils/classname.tsx Simplified utility to use only clsx, removing tailwind-merge
packages/propel/src/seperator/seperator.tsx New Separator component with orientation prop and Base UI integration
packages/propel/src/seperator/seperator.stories.tsx Storybook stories showcasing separator usage patterns

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
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 (2)
packages/propel/src/separator/separator.tsx (1)

5-11: Avoid re-declaring orientation if already provided by the primitive

If SeparatorPrimitive already declares orientation?: "horizontal" | "vertical", redeclaring it in SeparatorProps is redundant and risks divergence. Consider relying on the inherited prop and moving the default to the component only.

packages/propel/src/separator/separator.stories.tsx (1)

16-34: Leverage args/controls to reduce custom renders

Expose orientation via controls and use a single template. This simplifies stories and improves Docs/Controls.

 export default meta;
 type Story = StoryObj<typeof Separator>;

-export const Default: Story = {
-  render: () => (
-    <div className="w-[300px] space-y-4">
-      <div>Content Above</div>
-      <Separator />
-      <div>Content Below</div>
-    </div>
-  ),
-};
+export const Default: Story = {
+  args: { orientation: "horizontal" },
+  render: (args) => (
+    <div className="w-[300px] space-y-4">
+      <div>Content Above</div>
+      <Separator {...args} />
+      <div>Content Below</div>
+    </div>
+  ),
+};

-export const Vertical: Story = {
-  render: () => (
+export const Vertical: Story = {
+  args: { orientation: "vertical" },
+  render: (args) => (
     <div className="flex h-[100px] items-center space-x-4">
       <div>Left Content</div>
-      <Separator orientation="vertical" />
+      <Separator {...args} />
       <div>Right Content</div>
     </div>
   ),
 };

Optionally add to meta for better DX:

 const meta: Meta<typeof Separator> = {
   title: "Components/Separator",
   component: Separator,
+  argTypes: {
+    orientation: { control: { type: "inline-radio" }, options: ["horizontal", "vertical"] },
+  },
   parameters: { layout: "centered" },
   tags: ["autodocs"],
 };
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 997e380 and 682783e.

📒 Files selected for processing (3)
  • packages/propel/src/separator/separator.stories.tsx (1 hunks)
  • packages/propel/src/separator/separator.tsx (1 hunks)
  • packages/propel/src/utils/classname.tsx (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/propel/src/utils/classname.tsx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Build and lint web apps
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (2)
packages/propel/src/separator/separator.tsx (1)

26-29: Typing and ref forwarding look solid

Good use of forwardRef, ElementRef<typeof SeparatorPrimitive>, and displayName.

packages/propel/src/separator/separator.stories.tsx (1)

36-50: Stories read well and demonstrate real usage

The container example effectively shows typical layout usage. No issues.

@sriramveeraghanta sriramveeraghanta merged commit 64b95da into preview Sep 1, 2025
6 of 7 checks passed
@sriramveeraghanta sriramveeraghanta deleted the feat-propel-seperator branch September 1, 2025 14:10
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.

4 participants