Paint slides text-box edit mode in the deck theme color#300
Conversation
Entering text-box edit mode on a dark deck theme (e.g. Simple Dark) painted the text black/invisible. The committed slide canvas remaps the docs-default '#000000' and undefined inline colors to the deck's text role color via makeColorResolver, but the in-place text-box editor called paintLayout with no colorResolver, so it fell back to the docs default (literal black). Thread a colorResolver through initializeTextBox and mountSlidesTextBox, and have the slides editor build it from the active theme so edit mode and the committed canvas paint identically. Optional everywhere, so docs/sheets callers are unaffected. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (8)
📝 WalkthroughWalkthroughThis PR fixes a dark-theme bug where text-box edit mode renders text as invisible black. The canvas and editor render paths previously used different theme color resolvers. The fix exports a reusable color resolver from the canvas renderer and threads it through the text-box editor pipeline, using the active deck theme when entering edit mode. ChangesSlides Text-Box Dark-Theme Edit-Mode Fix
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint skipped: no ESLint configuration detected in root package.json. To enable, add 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. Comment |
Verification: verify:selfResult: ✅ PASS in 233.8s
Verification: verify:integrationResult: ✅ PASS |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
These tasks landed on main per recent commit log: docker-publish-arm64 (#296), import-progress-toast (#299), pptx-blipfill-fillrect-crop (#297), release-v0.4.2 (#295), slides-textbox-autogrow (cf83a49), and slides-textbox-edit-theme-color (#300). Move their docs to archive/2026/05 and regenerate the task indexes. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
These tasks landed on main per recent commit log: docker-publish-arm64 (#296), import-progress-toast (#299), pptx-blipfill-fillrect-crop (#297), release-v0.4.2 (#295), slides-textbox-autogrow (cf83a49), and slides-textbox-edit-theme-color (#300). Move their docs to archive/2026/05 and regenerate the task indexes. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Summary
Entering text-box edit mode on a dark deck theme (e.g. Simple Dark)
painted the text black/invisible.
Slides text renders through two paths that must agree on color:
drawText) builds a theme-awarecolorResolver(makeColorResolver) that remaps the docs-default'#000000'andundefinedinline colors to the deck'stextrolecolor (a light ink in dark themes).
initializeTextBox→paintLayout) was calledwith no
colorResolver, so it fell back to the docsdefaultColorResolver(literal black). The docs editor seeds newinlines with
DEFAULT_INLINE_STYLE.color = '#000000'.Result: text turned black the moment you entered edit mode.
Fix
Thread a
colorResolverend-to-end:packages/docs/.../text-box-editor.ts— addcolorResolver?toTextBoxEditorOptions; pass it into thepaintLayoutcall.packages/slides/.../canvas/text-renderer.ts— export the existingmakeColorResolver(reused, not duplicated, so canvas + editor staysingle-sourced).
packages/slides/.../editor/text-box-editor.ts— addcolorResolver?to
MountSlidesTextBoxOptions; forward it.packages/slides/.../editor/editor.ts—enterEditModebuilds theresolver from the active theme (
makeColorResolver(getActiveTheme(doc))).colorResolveris optional everywhere, so docs/sheets callers fall backto
defaultColorResolver(string passthrough) unchanged.Test plan
slides/test/view/editor/text-box-editor.test.ts:in a
default-darkdeck, edit mode receives a resolver that maps both'#000000'andundefinedto the theme text color. Proven to failwithout the fix (
colorResolverundefined), passes with it.pnpm verify:fastgreen (frontend / backend / sheets / slides / cli / docs).pnpm devwith Simple Dark.Summary by CodeRabbit