fix: restore JSX indentation in design-principles.mdx#2266
Open
merchako wants to merge 3 commits into
Open
Conversation
…ilwind 4, new components) (#2207) * Upgraded to React 19, Tailwind 4, new shadcn, build themes.data.json from index.css, cleaned up index.css, fonts.css, clarified data provider errors, added scripts to prepare for changing shadcn preset * Apply shadcn preset via `npx shadcn apply --preset b6rt8cvlC` to re-add shadcn components from latest version as a new baseline * chore: propagate shadcn preset CSS and package changes to extensions * chore: re-apply project customizations to upgraded shadcn components Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Adjust platform to upgraded shadcn chore: rebuild platform-bible-react dist and themes after shadcn upgrade Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> docs: add SKIPPED-CUSTOMIZATIONS.md for shadcn upgrade review Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Fixed rtl:tw: to tw:rtl:, fixed a few bugs with the shadcn components, fixed theme color stories not showing all the colors Cleaned up radix imports, added spacing theme variable, fixed radius css variable usage Moved new theme preset to Paratext theme, fixed borders wrongly applying, misc cleanup docs: add design spec for legacy HSL color var backwards compat docs: add per-pass and total timing to legacy color var compat spec docs: add React 19 backwards compatibility design spec Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> feat: add transformLegacyColorVars helper for backwards-compat hsl→var transform Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> feat: apply legacy hsl color var transform to WebView styles and content on load Attempt to make React 19 and Tailwind 4 backwards-compatible with old extensions Clean up, fix core storybook Reverted skipLibCheck to false, applied lots of fixes accordingly Fixed yalc messing up package-lock.json fix: address review findings from /review-paratext - Re-export public types `SelectTriggerProps` and `DropdownMenu*Props` (9 type aliases) that were dropped by the upstream shadcn baseline - Fix `handleDataProviderSubscriptionError` log regression: discriminate three contexts ('retrieve-after-update' | 'retrieve-immediate' | 'callback') with a switch + exhaustiveness check; restores per-path log messages - Remove unused `sheet.tsx` + the just-scaffolded story (YAGNI; arrived as a side effect of the shadcn preset apply, not exposed in index.ts) - Remove stale AI-generated `CUSTOMIZATIONS.md`; update upgrade-shadcn workflow to require regeneration via `/shadcn-customizations` if missing - Add 48 tests for `apply-shadcn-preset.ts` helpers + 6 fixture-based end-to-end pipeline tests; fix latent regex bug in `processLayerBase` (`\s+$` → `\s*$`) that produced `}}` instead of `}\n}` in the common case - Add 6 tests for new `platform-dock-layout-storage.util.ts` exports (`findFirstWebViewDefinitionByType`, `loadLayout`) - Fix pre-existing typo'd Tailwind classes in `tabs-vertical.tsx` (`tw:flex-fit`, `tw:mlk-items-center`, bare `overflow-clip`) - Rename `util.test.ts` → `utils.test.ts` to match implementation filename - Remove unused `yjs` and `scheduler` devDependencies; refresh lockfile - Add storybook variants for badge ghost/link/blueIndicator/mutedIndicator - Rebuild platform-bible-react dist artifacts Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * feat: add /add-shadcn-component command and supporting script - Extract shared shadcn file-transform helpers into shadcn-transform-utils.ts (used by both apply-shadcn-preset.ts and the new add-shadcn-component.ts) - Add scripts/add-shadcn-component.ts: adds a single shadcn component, applies standard file transforms, runs format and lint-fix, and auto-commits the baseline (matches apply-shadcn-preset.ts pattern). Takes <component> <preset> as args. - Add npm 'add-shadcn-component' script - Fix get-latest-preset - Add fast path to cn() compat shim: when the resolved class string contains no `tw-` prefix (the dominant all-TW4 case), skip the per-token normalize/restore round-trip and call extendTailwindMerge({ prefix: 'tw' }) directly. Brings the all-TW4 case from ~8x slower than baseline to within ~1.5x; TW3-containing strings still take the full slow path so dedup remains correct. --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
The shadcn/ui upgrade (ac37eda) stripped 2-space indentation from JSX blocks inside preview={} props, leaving them flush-left. This restores the original indentation style. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
ee47089 to
8d1f8c9
Compare
tjcouch-sil
approved these changes
May 13, 2026
Member
tjcouch-sil
left a comment
There was a problem hiding this comment.
@tjcouch-sil reviewed 1 file and all commit messages, and made 1 comment.
Reviewable status:complete! all files reviewed, all discussions resolved.
…flicts-HGvrS # Conflicts: # lib/platform-bible-react/src/stories/guidelines/design-principles.mdx
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.
Summary
preview={}blocks indesign-principles.mdx, which was accidentally stripped to flush-left by the shadcn/ui upgrade in chore: upgrade shadcn/ui components to preset b6rt8cvlC (React 19, Tailwind 4, new components) #2207 (ac37eda).Context
This is the paranext-core half of a two-part change. The companion PR in
ai-promptsadds a## Storybook MDX Guidelinessection toCode-Style-Guide.mddocumenting this convention, including an explicit note for LLMs and editors not to reformat MDX JSX blocks.The style proposed (2-space block form, root element at 2 spaces, closing
}at column 0) matches what TJ used when the file was originally written. Primary goal is reducing merge conflicts; secondary goal is readability. Happy to adjust if a different style is preferred — the important part is that something is documented.Test plan
cd lib/platform-bible-react && npm start) and verify the Guidelines/Design Principles page renders correctly🤖 Generated with Claude Code
This change is