Repository navigation
refactor(editor): relocate stylesheets into docx-editor-react (styling Phase 2) - #163
Merged
Merged
Conversation
CSS is a DOM/client concern, so it belongs in the client package, not core (the core/react seam is headless-vs-DOM, and CSS never enters the headless server path). Move-first, behaviour-preserving: - styles/editor.css + prosemirror/editor.css -> docx-editor-react/src/styles/ (editor.css chrome, prosemirror.css painter/PM DOM). - Rewire imports: hidden-prose-mirror uses a relative import; the frontend imports @eigenpal/docx-editor-react/styles/editor.css. Move the export off core's package map onto react's; update both exports-map tests. - Frontend's only direct use of docx-editor-core was that stylesheet, so drop the now-unused workspace dep (still present transitively via react/agents). - Update CLAUDE.md (the '5 symbols + 1 stylesheet' path + a stale --docx- mention), the READMEs, and stale path comments. Concern-split of the two files follows in Phase 2b.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…lesheets The move made prosemirror.css's 'Lives in core' header false (flagged by review); also drop the now-meaningless 'matches the Vue adapter' rationale from three editor.css comments (the Vue adapter was removed in the leaning). Dead Vue scrollbar selectors logged to the plan-doc ledger for a dead-CSS sweep.
This branch was successfully deployed
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.
Phase 2 of the styling consolidation (plan:
living-docs/editor-styling-consolidation.md). Move-first, behaviour-preserving relocation — the concern-split follows in 2b.What moved
The two editor stylesheets leave
docx-editor-corefordocx-editor-react/src/styles/:styles/editor.css→docx-editor-react/src/styles/editor.css(chrome + tokens)prosemirror/editor.css→docx-editor-react/src/styles/prosemirror.css(painter/PM DOM)Why
CSS is a DOM/client concern; the
core/reactseam is headless-vs-DOM and CSS never enters the headless server path. So the stylesheets belong in the client package — making "restyle the editor → look indocx-editor-react" literally true.Wiring (the contract-path change)
hidden-prose-mirrornow importsprosemirror.cssrelatively (same package).@eigenpal/docx-editor-react/styles/editor.css(was…-core/styles/editor.css) — the stylesheet export moves off core's package map onto react's. Both exports-map tests updated.docx-editor-corewas that stylesheet, so it's dropped fromapps/frontenddeps (still present transitively via react/agents; knip enforced this). Lockfile updated.CLAUDE.md(the '5 symbols + 1 stylesheet' path), the READMEs, and stale path comments updated.Verification
pnpm checkgreen (incl. knip) ·bun test1739 pass · rename-detected diff (0 content change onprosemirror.css).