Uh oh!
There was an error while loading. Please reload this page.
docs(guide): teach the Tailwind 4 CSS-first setup on theming / troubleshooting / quick-start - #4060
Merged
Merged
Conversation
…eshooting / quick-start (#3883, #3884) Three consumer-facing guide pages taught Tailwind 3 configuration for a Tailwind 4 library, and the prescriptions were measured (#3780) not to restore the utilities they claimed to. - theming.md: replace the v3 `tailwind.config.js` section (30 lines of token -> theme.extend.colors mapping) with the CSS-first import of the published `style.css`, which already carries the `@theme` block those tokens come from. Also drop the now-dangling `darkMode: "class"` instruction in the dark-mode section: the class-based dark variant is declared in the package's own CSS with `@custom-variant`. - troubleshooting.md section 2: the cause is the missing `style.css` import, not missing `content` paths. Scanning node_modules regenerates only shape-only utilities and can never produce the themed ones. - quick-start.md: delete the two redundant `@source node_modules` lines (measured +100 kB CSS for 14 unused selectors) and the explanation that stated their mechanism backwards. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017Qqyix2QcnpUC9XeYVDzx3
The latest updates on your projects. Learn more about Vercel for GitHub. |
…port (#4059) The published `@object-ui/fields@17.3.0` tarball contains zero .css files, so the `"./style.css": "./dist/index.css"` export resolves to nothing and a consumer's `@import '@object-ui/fields/style.css'` fails their build. Control: `@object-ui/components@17.3.0` ships `package/dist/index.css`. That falsifies, for the fields line only, the two cards' premise that both `@import` lines were correct — so it leaves all three pages here rather than staying a rider: troubleshooting section 2 in particular is the page whose prescription must not itself break the reader's build. Prose now claims only what is measured: `@object-ui/components` publishes a working `style.css`. Nothing is asserted about how fields' widgets are styled without it — that disposition needs the subset measurement #4059 names, so the mention points at the issue instead. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017Qqyix2QcnpUC9XeYVDzx3
yinlianghui
marked this pull request as ready for review
August 10, 2026 02:55
Uh oh!
There was an error while loading. Please reload this page.
akarma-synetal pushed a commit
to akarma-synetal/objectui
that referenced
this pull request
Aug 10, 2026
…declared (objectstack-ai#4059) (objectstack-ai#4076) `@object-ui/fields` declared `"./style.css": "./dist/index.css"` while its build was `tsc && vite build` and the package held no `.css` file at all. Every tarball through 17.3.0 shipped with zero stylesheets, so a consumer's `@import '@object-ui/fields/style.css'` failed to resolve and broke their build — the import `content/docs/guide/quick-start.md` taught. Retiring the export was measured and rejected: 155 classes exist only in this package, and 17 of them resolve `@theme` tokens declared in unpublished `@object-ui/components` source, so no consumer-side configuration can produce them. Removal would have made the field widgets permanently under-styled. The new sheet is a supplement, not a duplicate: `src/index.css` `@reference`s components' entry for its theme and emits only the utilities layer, and `scripts/build-css.mjs` subtracts every rule that package's built sheet already ships. 21.57 kB / 157 classes instead of ~180 kB of near-duplicate CSS, and it covers all 152 classes the issue measured as missing. Also extends `scripts/__tests__/package-files-exist.test.ts` with an `exports`-reality guard (packability + CSS producibility) so a stylesheet export with nothing building it cannot recur silently, and re-teaches the fields import on the three guide pages PR objectstack-ai#4060 removed it from. Claude-Session: https://claude.ai/code/session_017Qqyix2QcnpUC9XeYVDzx3 Co-authored-by: Claude <noreply@anthropic.com>
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 freeto 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.
Fixes#3883
Fixes#3884
Two-card docs sweep, one root cause: three consumer-facing guide pages taught Tailwind 3 configuration for a Tailwind 4 library, and #3780's compile matrix measured that the prescriptions cannot restore the utilities they claim to. The theme-class utilities (
bg-primary,bg-background,border-input,ring-ring) exist only where the@themeblock declaring their tokens is compiled —packages/components/src/index.css, whichfilesdoes not publish — so scanning the published files, by v4@sourceor v3content, can only regenerate the shape-only utilities the prebuiltstyle.cssalready contains.Per-item checklist
content/docs/guide/theming.md§Tailwind Configuration (was 63-114)tailwind.config.js…" + a v3 config:darkMode: "class", acontentarray reaching intonode_modules/@object-ui/components/dist, and 30 lines mapping--background/--primary/--borderintotheme.extend.colors@import "@object-ui/components/style.css"(which carries the@themeblock), and an explicit "do not point Tailwind atnode_modules" with the reason. Retheming is pointed at token overrides.content/docs/guide/theming.md§Dark Mode (was :223)darkMode: \"class\"…" — dangling once the config section is gonedarkModeoption to set; the class-based dark variant is declared in the package's own CSS as@custom-variant dark (&:where(.dark, .dark *)), and what the reader must ensure is that thedarkclass sits on an ancestor.content/docs/guide/troubleshooting.md§2 (was 44-66)contentpaths in your Tailwind config do not include ObjectUI package files"; fix: atailwind.config.tswith fournode_modulesglobsstyle.cssis not imported. Fix: import@object-ui/components/style.css, then check the Tailwind 4 build plugin is wired up (@tailwindcss/postcssor@tailwindcss/vite). Names@object-ui/fields' subpath as unimportable and points at #4059. Closes with a blockquote naming the old prescription as the wrong direction and why.content/docs/guide/quick-start.mdStep 3 (was 55-64)@source "../node_modules/@object-ui/…"lines plus "The@sourcelines let Tailwind see the utility classes used by ObjectUI packages" — the mechanism stated backwards@sourcelines deleted (measured +100 kB CSS for 14 selectors, none needed); the sentence now says whatstyle.cssactually carries and why no@sourceis added for these packages.@import "@object-ui/fields/style.css"— quick-start had it already, and the two rewritten sections had inherited it@object-ui/components— the one package measured to publish a workingstyle.css. See the tarball reading below.git diff --name-onlyagainst the merge base is exactly the three files in those rows, nothing else:Verification
Measurement basis is #3780's four-cell matrix, quoted in both cards and ruled not re-litigable (#3884 裁决):
Spot-verified on
origin/mainrather than re-run, per that ruling — every claim this PR now makes in prose:packages/components/package.json:"./style.css": "./dist/index.css", andfilesis["dist", "README.md", "CHANGELOG.md", "LICENSE"]— sosrc/index.css, which holds the@themeblock, is not published.packages/componentshas notailwind.config.js;postcss.config.jsloads@tailwindcss/postcss;src/index.cssopens@import 'tailwindcss'and uses@theme/@custom-variant/@source.@custom-variant dark (&:where(.dark, .dark *))quoted in the dark-mode paragraph is copied verbatim frompackages/components/src/index.css:11.@object-ui/fields@17.3.0npm tarball contains zero.cssfiles, so its declared"./style.css": "./dist/index.css"export resolves to nothing and@import '@object-ui/fields/style.css'fails a consumer's build; the control,@object-ui/components@17.3.0, shipspackage/dist/index.cssas expected. That falsifies the cards' "both@importlines are correct" premise for the fields line specifically, which is why removing it here is required rather than a rider — troubleshooting §2 is the page a reader lands on with a broken build, and its fix must not break it further. Nothing is asserted about how fields' widgets are styled without that import: whether their class shapes are a subset of components' published utilities is the open measurement @object-ui/fields declares a./style.cssexport but nothing buildsdist/index.cssfor it — the subpath quick-start teaches looks unresolvable #4059 names, and it belongs to that card.Gates, re-run in the worktree after the rework:
scripts/__tests__/doc-version-claims.test.tscould not be executed (docs-only worktree, no install), so its matcher was replicated over both revisions of the three pages instead. The flagged set is identical before and after — the two inventoried claims, untouched by this diff:Neither direction of that ratchet can trip: nothing was added that the matcher reads as a version literal (a bare major such as "Tailwind 4" is documented in the test header as deliberately unmatched), and no inventoried literal was removed.
Changeset
None owed, and this is the repo's own gate saying so rather than a judgement call:
No
skip-changesetlabel was applied, and none should be: that label is not this repo's convention..github/workflows/changeset-presence.ymldecides from the diff inside the script and reports green when nothing is owed, andscripts/__tests__/ci-cd-pipeline-doc.test.ts:184records that objectui'sskip-changesetlabel "was never real" (it was documented only by the.github/WORKFLOWS.mdinventory deleted in #3724). A label lookup confirms it:skip-changesetdoes not exist in this repository.Out of scope, filed not fixed
./style.cssexport but nothing buildsdist/index.cssfor it — the subpath quick-start teaches looks unresolvable #4059 —@object-ui/fieldsdeclares a./style.cssexport with nothing published behind it. The docs half of that defect dies in this PR (second commit above); the package half stays on @object-ui/fields declares a./style.cssexport but nothing buildsdist/index.cssfor it — the subpath quick-start teaches looks unresolvable #4059 — either build real CSS for fields or retire the phantom export, a disposition that needs the subset measurement recorded there.Generated by Claude Code