Skip to content

fix(scripture-editor): respect dark mode in model/resource panel empty states#2467

Open
merchako wants to merge 1 commit into
mainfrom
claude/stoic-gates-eus13i
Open

fix(scripture-editor): respect dark mode in model/resource panel empty states#2467
merchako wants to merge 1 commit into
mainfrom
claude/stoic-gates-eus13i

Conversation

@merchako

@merchako merchako commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Summary

The Model text panel and the Bible texts / Commentaries panels show empty-state prompts ("No model text selected. Pick one to display a reference translation alongside your project." / "No Bible texts selected. Pick one to display a reference translation alongside your project.") that did not respect the active dark theme.

Root cause

The two panel webview stylesheets omitted the tailwind import that the main editor stylesheet has:

  • platform-scripture-editor.web-view.scss@use './tailwind';
  • model-text-panel.web-view.scss → missing ❌
  • resource-text-panel.web-view.scss (shared by Bible texts + Commentaries) → missing ❌

tailwind.css is what defines the theme CSS variables (--background, --foreground, the .dark { … } block) and the base rule:

@layer base {
  body { @apply tw:bg-background tw:text-foreground; }
}

Each webview iframe gets the active theme class (e.g. dark) added to its <body> by the webview host, but without the tailwind import these panels never defined the matching CSS variables or the body background/text colors. So the empty-state text rendered with default colors instead of theme-aware ones — failing to respect dark mode.

Fix

Add @use './tailwind'; to both panel stylesheets so they match the main editor and pick up the theme-aware body styling (and the tw: utilities). This covers the Model text, Bible texts, and Commentaries empty states.

Testing

  • Verified all three webview SCSS files in the extension now include @use './tailwind';.
  • The change is a one-line addition identical to the proven import already used by platform-scripture-editor.web-view.scss in the same directory.

AI-assisted — session

🤖 Generated with Claude Code


Generated by Claude Code


This change is Reviewable

…y states

The model text and Bible texts/commentaries panels render empty-state
prompts ("No model text selected…" / "No Bible texts selected…") that did
not respect the active dark theme.

Their webview stylesheets (model-text-panel.web-view.scss and
resource-text-panel.web-view.scss) omitted `@use './tailwind';`, which the
main editor stylesheet includes. That import defines the theme CSS variables
(`--background`, `--foreground`, the `.dark` block) and the base rule
`body { @apply tw:bg-background tw:text-foreground; }`. Without it, the
panel body never picked up the theme-aware background/text colors, so the
empty-state text ignored dark mode.

Add the tailwind import to both panel stylesheets to match the editor.

Co-authored-by: Claude <noreply@anthropic.com>
Session-URL: https://claude.ai/code/session_01GyVicRy5VvNPxgyryovrgV
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants