Skip to content
This repository was archived by the owner on Nov 4, 2026. It is now read-only.

Fix Tailwind content scanning to include JSON schema files - #34

Merged
hotlong merged 2 commits into
mainfrom
copilot/fix-json-file-handling
Jan 14, 2026
Merged

hotlong merged 2 commits into
mainfrom
copilot/fix-json-file-handling

Conversation

Copilot AI commented Jan 14, 2026 •

Copy link
Copy Markdown
Contributor

Tailwind was not scanning JSON schema files in the playground, causing classes defined in JSON to be excluded from the CSS bundle.

Changes

  • Updated content array in apps/playground/tailwind.config.js to include .json extension
  • Updated content array in examples/prototype/tailwind.config.js to include .json extension
  content: [
    "./index.html",
-   "./src/**/*.{js,ts,jsx,tsx}",
+   "./src/**/*.{js,ts,jsx,tsx,json}",
    "../../packages/components/src/**/*.{js,ts,jsx,tsx}",
  ],

Context

The playground stores UI component schemas in JSON files (e.g., src/data/examples/forms/form-demo.json) with extensive Tailwind classes:

{
  "type": "div",
  "className": "min-h-screen bg-gradient-to-br from-indigo-50 via-purple-50 to-pink-50",
  "body": [...]
}

Without scanning these JSON files, Tailwind purges these classes from the production build, leaving components unstyled.

Original prompt

playground tailwnd 你忘了处理json文件了,所以我总说不好看


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

…prototype

Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix JSON file handling in playground tailwind Fix Tailwind content scanning to include JSON schema files Jan 14, 2026
Copilot AI requested a review from hotlong January 14, 2026 16:20
@github-actions

Copy link
Copy Markdown
Contributor

✅ All checks passed!

  • ✅ Type check passed
  • ✅ Tests passed
  • ✅ Lint check completed

@hotlong
hotlong marked this pull request as ready for review January 14, 2026 16:23
@hotlong
hotlong merged commit 101a80b into main Jan 14, 2026
github-merge-queue Bot pushed a commit that referenced this pull request Sep 5, 2026
* fix(fields): one home for the datetime display convention

`formatDateTime` gains a named `'compact'` style — today's
`DateTimeCellRenderer` face, byte-identical — and the cell renders through it
instead of inlining its own pair of `Intl` option bags. The cell also reads
`field` (it destructured `value` only), so `field.format` selects a datetime
style the way it already did for `date`. `data-table`'s `formatCellValue`
calls the same function for its datetime branch instead of a third,
independently authored bag.

`formatDateTime`'s signature is now `(value, style?, options?)`, matching
`formatDate`; the `options` added in objectui#4272 moved to position three and
every call site moved with it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KbJQ1y1J12nZxYzFWhP8Q3

* fix(core): formatDateTime keeps (value, options?); 'compact' rides in options.style

Maintainer ruling B (objectui#7443, batch #34): the published signature
formatDateTime(value, options?) is unchanged and the named 'compact' style
is selected through options.style. DateDisplayOptions gains the optional
key; the cell calls formatDateTime(date, { style, locale, t }) with the
'||' default; the ten-plus in-repo call-site migrations the positional
shape forced are reverted to origin/main byte for byte; every pin from
ruling 1' is kept and an arity pin guards the signature. Changeset
rewritten without the breaking paragraph.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KbJQ1y1J12nZxYzFWhP8Q3

---------

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants