Skip to content

Create script for guided sync from P.B template#2333

Merged
imnasnainaec merged 12 commits into
developfrom
sync-template
Jun 8, 2026
Merged

Create script for guided sync from P.B template#2333
imnasnainaec merged 12 commits into
developfrom
sync-template

Conversation

@imnasnainaec

@imnasnainaec imnasnainaec commented Jun 3, 2026

Copy link
Copy Markdown
Collaborator

https://app.devin.ai/review/sillsdev/languageforge-lexbox/pull/2333

PR contents:

  • new script so assist syncing template updates
  • synced updates from template, including a major Tailwind upgrade
  • updated tailwind usage (tw-* -> tw:*) in the same way as the Interlinearizer extension (sillsdev/interlinearizer-extension@791ffd6)
  • bumped action versions in the CI workflow
  • regenerated package-lock.json

@imnasnainaec imnasnainaec self-assigned this Jun 3, 2026
@coderabbitai

coderabbitai Bot commented Jun 3, 2026

Copy link
Copy Markdown

Review Change Stack

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 9c0f122a-25b0-43be-bc4c-ad40f7999e3d

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

This PR modernizes the platform.bible-extension with a comprehensive template update: upgrading build tooling (ESLint, Stylelint, TypeScript, PostCSC) to support Tailwind v4 and React 19, introducing a new interactive template-sync CLI script to keep the extension in sync with the paranext-core template, completely overhauling the Tailwind theme infrastructure with new oklch-based CSS variables and semantic tokens, and migrating 20+ React components to use the new tw: class prefix syntax.

Changes

Platform.Bible Extension Modernization & Template Sync

Layer / File(s) Summary
CI/Build Tooling & Dependencies Setup
.github/workflows/platform.bible-extension.yaml, platform.bible-extension/.eslintrc.js, platform.bible-extension/.stylelintrc.js, platform.bible-extension/.vscode/settings.json, platform.bible-extension/postcss.config.ts, platform.bible-extension/webpack/web-view-resolve-webpack-plugin.ts, platform.bible-extension/tsconfig.lint.json, platform.bible-extension/package.json
Updated GitHub Actions workflow to pin action SHAs; migrated ESLint to @stylistic/ts plugin with new naming-convention rules and TypeScript overrides; switched Stylelint to @dreamsicle.io variant with formatting delegated to Prettier; enabled TypeScript linting with allowJs; updated VSCode settings for TypeScript validation and .usj file association; fixed Webpack resolver context binding; updated PostCSS to @tailwindcss/postcss; bumped dependencies for React 19, Tailwind v4, and Node.js 22.22.0.
Tailwind v4 Theme Infrastructure
platform.bible-extension/src/tailwind.css, platform.bible-extension/tailwind.config.ts
Converted tailwind.css to Tailwind v4 with @import prefix(tw), @config, and @theme inline structure. Defined semantic tokens for colors (success, warning, destructive), radius, and spacing overrides via CSS variables. Established four theme classes (.light, .dark, .paratext-light, .paratext-dark) with oklch-based color palettes for backgrounds, foregrounds, primary/secondary/muted/accent, borders, inputs, rings, charts, and sidebar tokens. Updated tailwind.config.ts prose typography to use direct CSS variable references, added prose "invert" variants, and removed tailwindcss-animate plugin.
Component Class Name Migration to tw: Prefix
platform.bible-extension/src/components/add-new-entry-button.tsx, platform.bible-extension/src/components/add-new-entry.tsx, platform.bible-extension/src/components/back-to-list-button.tsx, platform.bible-extension/src/components/domains-display.tsx, platform.bible-extension/src/components/entry-display.tsx, platform.bible-extension/src/components/entry-list-item.tsx, platform.bible-extension/src/components/entry-list-wrapper.tsx, platform.bible-extension/src/components/entry-list.tsx, platform.bible-extension/src/components/lexicon-combo-box.tsx, platform.bible-extension/src/web-views/add-word.web-view.tsx, platform.bible-extension/src/web-views/find-related-words.web-view.tsx, platform.bible-extension/src/web-views/find-word.web-view.tsx
Migrated 20+ React components to use tw: prefixed Tailwind utility classes instead of tw- syntax. Updated class names across layout (flex, gap), spacing (p, m), sizing (max-w), and focus/ring styling throughout JSX templates without changing component logic or rendering structure.
Template Sync Script & Documentation
platform.bible-extension/scripts/sync-template-updates.cjs, platform.bible-extension/README.md
Added interactive Node.js CLI script that enumerates template files via git ls-files, filters by skip rules, compares template vs extension contents, displays colored diffs, and prompts users to apply, defer, or skip each file. Handles binary files gracefully, manages deferred-file queues across batches, and prints final summary counts. Updated README with new "Sync template updates into this extension" section documenting prerequisites, workflow steps, prompt options, deferred-file handling, and verification (build, lint, commit, PR guidance).

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes


Possibly related PRs

  • sillsdev/languageforge-lexbox#2045: Incorporates extension template updates with overlapping Tailwind theme variable and structure changes to platform.bible-extension/src/tailwind.css.
  • sillsdev/languageforge-lexbox#2004: Introduces the same Platform.Bible dictionary-style React components (add-new-entry-button, back-to-list-button, entry-display, etc.) that are now being updated with new Tailwind class prefixes.
  • sillsdev/languageforge-lexbox#2315: Updates the same GitHub Actions workflow (actions/checkout and actions/setup-node) to newer @v5 versions and SHA pins.

Suggested labels

🟨Medium, platform.bible, dependencies, tailwind, eslint


Suggested reviewers

  • jasonleenaylor
  • myieye

Poem

🐰 A template-syncing waltz begins,
Where Tailwind v4 weaves oklch gems,
From tw- to tw: the classes dance,
React 19 joins the grand advance,
Config harmonies make linting bright,
The extension now stays synced just right!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: creating a script for guided synchronization from the Platform.Bible template.
Docstring Coverage ✅ Passed Docstring coverage is 94.44% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description check ✅ Passed The PR description is related to the changeset - it mentions syncing template updates, Tailwind upgrades, and updated CI workflows, which match the file changes.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch sync-template

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

Comment @coderabbitai help to get the list of available commands and usage tips.

coderabbitai[bot]

This comment was marked as resolved.

imnasnainaec and others added 2 commits June 3, 2026 17:20
A pair resolved with 'b' was counted as template-applied then re-counted
as same on the deferred pass. Add a countedPairs Set so each file is
tallied exactly once regardless of how many passes it takes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Comment thread platform.bible-extension/scripts/sync-template-updates.cjs
@imnasnainaec imnasnainaec merged commit 8cc863c into develop Jun 8, 2026
7 checks passed
@imnasnainaec imnasnainaec deleted the sync-template branch June 8, 2026 17:14
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.

2 participants