Enable oxfmt sorting + JSDoc formatting#109
Merged
Merged
Conversation
|
📚 Storybook preview: https://pr-109-propel-storybook.vamsi-906.workers.dev |
There was a problem hiding this comment.
Pull request overview
Enables Tailwind utility class sorting via oxfmt in the root Vite+ formatting config so vp check can automatically keep Tailwind class ordering consistent across the repo.
Changes:
- Configure
sortTailwindcss(includingfunctions: ["cva","cx"]and a Tailwind v4 stylesheet entry) under the rootfmtblock. - Apply one-time canonical Tailwind class re-ordering across components, internals, and Storybook/pattern stories.
Reviewed changes
Copilot reviewed 20 out of 20 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| vite.config.ts | Enable oxfmt Tailwind class sorting with cva/cx + stylesheet reference |
| packages/propel/src/patterns/comment.stories.tsx | Re-sorted Tailwind classes in recipe story markup |
| packages/propel/src/internal/scrollbar.ts | Re-sorted scrollbar Tailwind class string |
| packages/propel/src/internal/node-slot.ts | Re-sorted node-slot Tailwind selectors ordering |
| packages/propel/src/components/toast/index.tsx | Re-sorted Tailwind classes on close button |
| packages/propel/src/components/tabs/index.tsx | Re-sorted Tailwind classes in tab variants |
| packages/propel/src/components/switch/index.tsx | Re-sorted Tailwind classes in switch variants |
| packages/propel/src/components/scroll-area/scroll-area.stories.tsx | Re-sorted Tailwind classes in story markup |
| packages/propel/src/components/radio/index.tsx | Re-sorted Tailwind classes in radio variants |
| packages/propel/src/components/pagination/index.tsx | Re-sorted Tailwind classes in labels/range markup |
| packages/propel/src/components/nav-item/nav-item.stories.tsx | Re-sorted Tailwind classes in story labels |
| packages/propel/src/components/nav-item/index.tsx | Re-sorted Tailwind classes in nav item variants/markup |
| packages/propel/src/components/dropdown/index.tsx | Re-sorted Tailwind classes in dropdown item row classes |
| packages/propel/src/components/dropdown/dropdown.stories.tsx | Re-sorted Tailwind classes in story icon nodes |
| packages/propel/src/components/checkbox/index.tsx | Re-sorted Tailwind classes in checkbox variants |
| packages/propel/src/components/button/index.tsx | Re-sorted Tailwind classes in button variants |
| packages/propel/src/components/breadcrumb/index.tsx | Re-sorted Tailwind classes in crumb variants |
| packages/propel/src/components/banner/index.tsx | Re-sorted Tailwind classes in compound variants |
| packages/propel/src/components/badge/index.tsx | Re-sorted Tailwind classes in badge variants |
| packages/propel/src/components/accordion/index.tsx | Re-sorted Tailwind classes in transition state utilities |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
e09a419 to
f7888ae
Compare
f7888ae to
e1e459b
Compare
Turn on oxfmt's sorting/normalization in the root `vite.config.ts` `fmt` block so `vp check` keeps these consistent automatically: - sortTailwindcss: sort Tailwind classes. `functions: ["cva", "cx"]` (propel writes classes inside those, incl. cva's `class:` key). `stylesheet` points at a new tooling-only Tailwind entry (see below) so base + custom utilities sort canonically. - sortImports: group + sort imports. `sortSideEffects` stays false (default), so CSS side-effect imports like `import "./preview.css"` keep their position. - sortPackageJson: canonical key order for package.json (script order left as-is). - jsdoc: normalize JSDoc/TSDoc blocks (tag aliases, capitalization, wrapping). Add `packages/propel/tailwind.css` as the single tooling Tailwind entry (`@import "tailwindcss"` + propel's tokens). `src/styles/propel.css` deliberately does not import Tailwind (the consumer owns that), so it can't drive a sorter on its own; the tooling entry can. It lives at the package root so the build never publishes it, and `.storybook/preview.css` now imports it too (one source of truth). The rest of the diff is the one-time reformat. Behavior-preserving: `vp check` clean and `vp run -r test` 700/700 across the four themes.
e1e459b to
6c30e5f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Turns on oxfmt's sorting/normalization options in the root
vite.config.tsfmtblock (Vite+'s recommended location over.oxfmtrc.json), sovp checkkeeps all of this consistent automatically.sortTailwindcss— sort Tailwind classes.functions: ["cva", "cx"](propel writes classes inside those calls, including cva'sclass:compound-variant key) andstylesheet: "packages/propel/tailwind.css"(propel's Tailwind v4 entry,@import "tailwindcss"+ the@theme/@utilitytokens) so custom utilities likebg-surface-1/border-subtlesort into the right position.sortImports— group and sort import statements.sortSideEffectsis left at its default (false), so CSS side-effect imports (import "./preview.css") are not reordered.sortPackageJson— canonical top-level key order for everypackage.json(script order left as authored).jsdoc— normalize JSDoc/TSDoc blocks (canonicalize tag aliases, capitalize descriptions, reflow long lines). Content is preserved, just reformatted.The rest of the diff (58 files) is the one-time reformat across the codebase.
Behavior-preserving — verified that the side-effect CSS imports stayed put,
vp checkis clean, andvp run -r testpasses 700/700 across all four themes.