Skip to content

Commit 14868ea

Browse files
committed
chore(rebase): post-rebase fixups onto new ai/main
Mechanical follow-ups after rebasing this PR onto the rebased ai/feature/markers-checklist/followup-tj-review-rolf-05-11-2026 (which sits on top of new ai/main with main's React 19 / Tailwind 4 / new shadcn baseline + the prefix sweep already applied). - Apply Tailwind 4 prefix sweep (tw- → tw:) to the 5 files this PR modified that still used the old tw- prefix: - components/checklist.component.tsx: 80 conversions - components/checklist.component.test.tsx: 12 conversions - checklist.web-view.tsx: 6 conversions - project-selector.component.tsx: 6 conversions - scope-selector.component.tsx: 4 conversions Total: 108 replacements across 5 files. - Rebuild lib/platform-bible-react/dist/* to reflect the rebased source state. Verified: npm run -w lib/platform-bible-react build exit 0; npm run build:types exit 0; npm run typecheck exit 0 (modulo a pre-existing buildInfo.json missing-module error, which is a generated file the main-process build creates — CI's full build generates it).
1 parent fddb9e3 commit 14868ea

9 files changed

Lines changed: 1335 additions & 10286 deletions

File tree

extensions/src/platform-scripture/src/checklist.web-view.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -820,7 +820,7 @@ function ChecklistContent({
820820
openTabs={comparativeOpenTabs}
821821
selection={comparativeSelection}
822822
onChangeSelection={handleComparativeTextsChange}
823-
buttonClassName="tw-h-8 tw-min-w-32 tw-font-normal"
823+
buttonClassName="tw:h-8 tw:min-w-32 tw:font-normal"
824824
// UX-2 finding #6: show a placeholder when no comparatives are
825825
// selected. The tooltip on the trigger carries the full hint on hover.
826826
buttonPlaceholder={
@@ -967,7 +967,7 @@ function ChecklistContent({
967967
onChangeSelection={(next: { projectId: string }) =>
968968
updateWebViewDefinition({ projectId: next.projectId })
969969
}
970-
buttonClassName="tw-h-8 tw-min-w-32 tw-font-normal"
970+
buttonClassName="tw:h-8 tw:min-w-32 tw:font-normal"
971971
// UX-2 finding #5: drop the truncating "Select primary S..." placeholder.
972972
// When a project is selected the short name fills the trigger; when none
973973
// is selected the trigger stays empty and the aria-label / tooltip carries

extensions/src/platform-scripture/src/components/checklist.component.test.tsx

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -84,18 +84,18 @@ describe('ChecklistTool — character-style rendering (UX-2 #19)', () => {
8484
// RTL's getByText normalizes whitespace by default, so match the trimmed text.
8585
const planted = screen.getByText('planted.');
8686
expect(planted.className).not.toMatch(/usfm_/);
87-
// The neutral span should still carry the tw-text-foreground class (not a usfm_* class).
88-
expect(planted.className).toContain('tw-text-foreground');
87+
// The neutral span should still carry the tw:text-foreground class (not a usfm_* class).
88+
expect(planted.className).toContain('tw:text-foreground');
8989
});
9090
});
9191

9292
describe('ChecklistTool — match-row coloring (UX-2 #15)', () => {
93-
it('applies a subtle tw-bg-primary/20 tint to the row <tr> when row.isMatch is true', () => {
93+
it('applies a subtle tw:bg-primary/20 tint to the row <tr> when row.isMatch is true', () => {
9494
// The first fix attempt (3b8b99b8c2) put the bg on inner cell containers and tried to bleed
95-
// it past TableCell's `tw-p-4` with negative margins — visually the bg only covered the
95+
// it past TableCell's `tw:p-4` with negative margins — visually the bg only covered the
9696
// text area, not the full cell rectangle (Rolf-reported). This iteration applies the bg
9797
// class to the `<tr>` via DataTable's `getRowClassName` prop, so every `<td>` inherits the
98-
// tint via the row-level paint. tw-bg-primary/20 (down from /30) reads as a subtle hint
98+
// tint via the row-level paint. tw:bg-primary/20 (down from /30) reads as a subtle hint
9999
// without competing with content. No text-color override — inner spans keep their default
100100
// colors so contrast stays readable in both light and dark modes.
101101
const matchRowData: ChecklistData = {
@@ -119,15 +119,15 @@ describe('ChecklistTool — match-row coloring (UX-2 #15)', () => {
119119
const refCell = screen.getByTestId('checklist-reference-cell');
120120
const row = refCell.closest('tr');
121121
expect(row).not.toBeNull();
122-
expect(row?.className).toContain('tw-bg-primary/20');
122+
expect(row?.className).toContain('tw:bg-primary/20');
123123
// The inner cell content should NOT carry the bg (single source of truth — the row).
124-
expect(refCell.className).not.toContain('tw-bg-primary');
124+
expect(refCell.className).not.toContain('tw:bg-primary');
125125
// And the obsolete text-color override from WP2 should be absent everywhere.
126-
expect(row?.className).not.toContain('tw-text-primary-foreground');
127-
expect(refCell.className).not.toContain('tw-text-primary-foreground');
126+
expect(row?.className).not.toContain('tw:text-primary-foreground');
127+
expect(refCell.className).not.toContain('tw:text-primary-foreground');
128128
});
129129

130-
it('does NOT apply tw-bg-primary/20 to the row <tr> when row.isMatch is false', () => {
130+
it('does NOT apply tw:bg-primary/20 to the row <tr> when row.isMatch is false', () => {
131131
render(
132132
<ChecklistTool
133133
data={baseData}
@@ -143,8 +143,8 @@ describe('ChecklistTool — match-row coloring (UX-2 #15)', () => {
143143
const refCell = screen.getByTestId('checklist-reference-cell');
144144
const row = refCell.closest('tr');
145145
expect(row).not.toBeNull();
146-
expect(row?.className).not.toContain('tw-bg-primary');
147-
expect(refCell.className).not.toContain('tw-bg-primary');
146+
expect(row?.className).not.toContain('tw:bg-primary');
147+
expect(refCell.className).not.toContain('tw:bg-primary');
148148
});
149149
});
150150

extensions/src/platform-scripture/src/components/checklist.component.tsx

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,10 @@ function getMarkerIndentStyle(marker: string): CSSProperties {
8787
// primary-color background tint so users can quickly scan past them. The tint is applied to the
8888
// `<tr>` itself via DataTable's `getRowClassName` prop — this paints the bg behind every `<td>`
8989
// in the row, so the colored region truly fills each cell from edge to edge. (The earlier
90-
// per-cell approach with `-tw-m-4 tw-px-6 tw-py-6` only colored the content area, not the full
90+
// per-cell approach with `tw:-m-4 tw:px-6 tw:py-6` only colored the content area, not the full
9191
// cell rectangle — see commit 3b8b99b8c2.) The 30% opacity proved too loud; 20% reads as a hint
9292
// without competing with the content.
93-
const MATCH_ROW_BG_CLASS = 'tw-bg-primary/20';
93+
const MATCH_ROW_BG_CLASS = 'tw:bg-primary/20';
9494

9595
// ---------- Small presentational sub-components ----------
9696

@@ -193,13 +193,13 @@ function ParagraphRow({
193193
<button
194194
key={itemKey}
195195
type="button"
196-
className="tw-cursor-pointer tw-bg-transparent tw-p-0 tw-text-primary hover:tw-underline focus-visible:tw-outline focus-visible:tw-outline-2 focus-visible:tw-outline-ring"
196+
className="tw:cursor-pointer tw:bg-transparent tw:p-0 tw:text-primary tw:hover:underline tw:focus-visible:outline tw:focus-visible:outline-2 tw:focus-visible:outline-ring"
197197
onClick={() => onGotoVerseClick(verseRef)}
198198
aria-label={gotoAriaTemplate.replace('{ref}', verseRef)}
199199
title={gotoAriaTemplate.replace('{ref}', verseRef)}
200200
data-testid="checklist-verse-goto"
201201
>
202-
<sup className="tw-font-semibold">{item.verseNumber}</sup>
202+
<sup className="tw:font-semibold">{item.verseNumber}</sup>
203203
</button>
204204
);
205205
}
@@ -282,7 +282,7 @@ function CellContent({
282282
// character-style rules defined in `checklist-usfm-styles.scss` (UX-2 finding #19). Without
283283
// it, the character-style rules don't match and items would render unstyled.
284284
return (
285-
<div className="checklist-formatted-font tw-flex tw-flex-col tw-gap-1" dir={dir}>
285+
<div className="checklist-formatted-font tw:flex tw:flex-col tw:gap-1" dir={dir}>
286286
{cell.paragraphs.map((paragraph, paragraphIndex) => (
287287
<ParagraphRow
288288
// Paragraph markers may repeat within a single cell (e.g. two consecutive `\p`s), so the
@@ -333,7 +333,7 @@ function ColumnHeaderWithTooltip({
333333
* table-fixed layout honors them.
334334
*/}
335335
<div
336-
className="tw-flex tw-w-full tw-cursor-default tw-items-center tw-justify-start tw-px-2 tw-py-1 tw-font-semibold hover:tw-bg-accent/50"
336+
className="tw:flex tw:w-full tw:cursor-default tw:items-center tw:justify-start tw:px-2 tw:py-1 tw:font-semibold tw:hover:bg-accent/50"
337337
aria-label={ariaLabel}
338338
data-testid="checklist-column-header"
339339
>
@@ -440,7 +440,7 @@ export function ChecklistTool({
440440
// eslint-disable-next-line react/no-unstable-nested-components
441441
header: () => (
442442
<span
443-
className="tw-block tw-px-2 tw-py-1 tw-font-semibold"
443+
className="tw:block tw:px-2 tw:py-1 tw:font-semibold"
444444
data-testid="checklist-column-headers"
445445
>
446446
{/* The Ref column header is intentionally unlabeled in the spec — it's axis metadata
@@ -460,7 +460,7 @@ export function ChecklistTool({
460460
// (applied via DataTable's `getRowClassName` prop below — see `MATCH_ROW_BG_CLASS`).
461461
// The row-level bg paints behind every `<td>` in the row, so the colored region fills
462462
// each cell edge-to-edge. Cell content here keeps its default padding/typography.
463-
const containerClass = 'tw-block tw-px-2 tw-py-2';
463+
const containerClass = 'tw:block tw:px-2 tw:py-2';
464464
// Sebastian PR #2219 #3137366113: "Make the scripture reference in the first column a
465465
// link button with the tooltip 'Go to {scrRef}' instead of the goto button". When a
466466
// goto callback is provided, render the ref as a `LinkedScrRefButton`; otherwise fall
@@ -483,7 +483,7 @@ export function ChecklistTool({
483483
}
484484
return (
485485
<span
486-
className={`tw-font-mono tw-text-sm ${containerClass}`.trim()}
486+
className={`tw:font-mono tw:text-sm ${containerClass}`.trim()}
487487
data-testid="checklist-reference-cell"
488488
>
489489
{ref}
@@ -524,7 +524,7 @@ export function ChecklistTool({
524524
// (see `MATCH_ROW_BG_CLASS` and the `getRowClassName` prop on DataTable). The row-
525525
// level bg paints behind every `<td>`, so cell content keeps its default classes.
526526
return (
527-
<div className="tw-flex tw-flex-col tw-gap-1 tw-px-2 tw-py-2">
527+
<div className="tw:flex tw:flex-col tw:gap-1 tw:px-2 tw:py-2">
528528
<CellContent
529529
cell={cell}
530530
showVerseText={showVerseText}
@@ -590,22 +590,22 @@ export function ChecklistTool({
590590

591591
// ----- Render helpers -----
592592

593-
// TabToolbar's start/end area divs use `tw-items-start`, which top-aligns children — while the
594-
// container itself uses `tw-items-center`. The hamburger (a direct container child) is therefore
593+
// TabToolbar's start/end area divs use `tw:items-start`, which top-aligns children — while the
594+
// container itself uses `tw:items-center`. The hamburger (a direct container child) is therefore
595595
// vertically centered against the 56px toolbar height, but our selectors / view-menu trigger
596596
// (children of the area divs) end up top-aligned, creating a visible misalignment. Wrapping each
597-
// render in our own `tw-h-full tw-items-center` flex restores horizontal alignment across the
597+
// render in our own `tw:h-full tw:items-center` flex restores horizontal alignment across the
598598
// hamburger + selectors + view-menu trigger without touching the shared TabToolbar component.
599599
const renderToolbarStart = () => (
600-
<div className="tw-flex tw-h-full tw-flex-row tw-items-center tw-gap-1">
600+
<div className="tw:flex tw:h-full tw:flex-row tw:items-center tw:gap-1">
601601
{primaryProjectSelector}
602602
{comparativeTextsSelector}
603603
{verseRangeSelector}
604604
</div>
605605
);
606606

607607
const renderToolbarEnd = () => (
608-
<div className="tw-flex tw-h-full tw-flex-row tw-items-center tw-gap-1">
608+
<div className="tw:flex tw:h-full tw:flex-row tw:items-center tw:gap-1">
609609
{/*
610610
* UX-2 finding #8: View toggles now live behind a single eye-icon
611611
* DropdownMenu button. Two checkbox items: Hide matches (disabled when
@@ -622,11 +622,11 @@ export function ChecklistTool({
622622
type="button"
623623
variant="outline"
624624
size="sm"
625-
className="tw-h-8 tw-w-8 tw-p-0"
625+
className="tw:h-8 tw:w-8 tw:p-0"
626626
aria-label={getLocalizedString('%markersChecklist_toolbar_view%')}
627627
data-testid="checklist-view-menu-trigger"
628628
>
629-
<Eye className="tw-h-4 tw-w-4" aria-hidden="true" />
629+
<Eye className="tw:h-4 tw:w-4" aria-hidden="true" />
630630
</Button>
631631
</DropdownMenuTrigger>
632632
</TooltipTrigger>
@@ -786,7 +786,7 @@ export function ChecklistTool({
786786
* chrome would host the hamburger; reversing now that the outer chrome
787787
* is hidden.)
788788
*/}
789-
<div className="tw-sticky tw-top-0 tw-z-10 tw-bg-background" data-testid="checklist-toolbar">
789+
<div className="tw:sticky tw:top-0 tw:z-10 tw:bg-background" data-testid="checklist-toolbar">
790790
<TabToolbar
791791
onSelectProjectMenuItem={onSelectProjectMenuItem ?? (() => undefined)}
792792
onSelectViewInfoMenuItem={() => undefined}
@@ -799,17 +799,17 @@ export function ChecklistTool({
799799
{renderBanners()}
800800

801801
{/*
802-
* UX-2 finding #11: wrap the table section in `tw-relative tw-z-0` so the sticky
802+
* UX-2 finding #11: wrap the table section in `tw:relative tw:z-0` so the sticky
803803
* <thead>'s internal z-20 (set by shadcn-ui Table with stickyHeader) lives inside
804804
* a new stacking context here and can never out-stack the toolbar above (which
805-
* uses `tw-sticky tw-top-0 tw-z-10`). Without this wrapper the thead's z-20 wins
805+
* uses `tw:sticky tw:top-0 tw:z-10`). Without this wrapper the thead's z-20 wins
806806
* over the toolbar's z-10 and the column headers scroll OVER the toolbar.
807807
*
808808
* UX-2 finding #10: enforce equal column widths via Tailwind arbitrary variants
809809
* applied to the inner <table>:
810-
* - `[&_table]:tw-table-fixed [&_table]:tw-w-full` — switch to fixed layout so
810+
* - `tw:[&_table]:table-fixed tw:[&_table]:w-full` — switch to fixed layout so
811811
* columns honor explicit widths on <th> instead of widest-content auto-sizing.
812-
* - `[&_thead_th:first-child]:tw-w-24` — Ref column is a fixed 96px (`w-24`),
812+
* - `tw:[&_thead_th:first-child]:w-24` — Ref column is a fixed 96px (`w-24`),
813813
* enough for "GEN 1:1" etc.
814814
* Under table-fixed, the remaining N project columns (all with implicit
815815
* `width: auto`) share the remaining horizontal space equally — the browser
@@ -819,7 +819,7 @@ export function ChecklistTool({
819819
<section
820820
aria-label={getLocalizedString('%markersChecklist_table_aria%')}
821821
aria-busy={isLoading}
822-
className="tw-relative tw-z-0 tw-m-1 tw-flex-1 tw-overflow-auto tw-rounded-md tw-border [&_table]:tw-table-fixed [&_table]:tw-w-full [&_thead_th:first-child]:tw-w-24"
822+
className="tw:relative tw:z-0 tw:m-1 tw:flex-1 tw:overflow-auto tw:rounded-md tw:border tw:[&_table]:table-fixed tw:[&_table]:w-full tw:[&_thead_th:first-child]:w-24"
823823
data-testid="checklist-data-table"
824824
>
825825
<DataTable

lib/platform-bible-react/dist/index.cjs

Lines changed: 7 additions & 4447 deletions
Large diffs are not rendered by default.

lib/platform-bible-react/dist/index.cjs.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)