Dup 2.6 Migrate Content Page Components to CSS - #2844
Closed
RoyEJohnson wants to merge 2 commits into
Closed
Conversation
RoyEJohnson
force-pushed
the
dup-2.6-for-copilot
branch
from
April 6, 2026 14:31
8831282 to
4f28199
Compare
RoyEJohnson
force-pushed
the
dup-2.6-for-copilot
branch
from
April 7, 2026 14:25
63dddac to
1aaaceb
Compare
RoyEJohnson
force-pushed
the
dup-2.6-for-copilot
branch
from
April 7, 2026 17:31
1aaaceb to
d0a17cc
Compare
RoyEJohnson
force-pushed
the
dup-2.6-for-copilot
branch
from
April 7, 2026 19:25
d0a17cc to
a194a54
Compare
Contributor
There was a problem hiding this comment.
Copilot reviewed 54 out of 55 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
RoyEJohnson
force-pushed
the
dup-2.6-for-copilot
branch
from
April 9, 2026 11:06
d30bd48 to
43e6b67
Compare
RoyEJohnson
force-pushed
the
dup-2.6-for-copilot
branch
from
April 9, 2026 11:29
750c496 to
d161d04
Compare
RoyEJohnson
force-pushed
the
dup-2.6-for-copilot
branch
from
April 9, 2026 11:45
d161d04 to
9dadd6a
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 58 out of 58 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
RoyEJohnson
force-pushed
the
dup-2.6-for-copilot
branch
from
April 9, 2026 15:47
9dadd6a to
a0c162b
Compare
RoyEJohnson
force-pushed
the
dup-2.6-for-copilot
branch
from
April 9, 2026 18:27
a0c162b to
c7457d6
Compare
Contributor
Author
|
This was a "spare" copy to run tests on. |
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> Co-Authored-By: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
RoyEJohnson
force-pushed
the
dup-2.6-for-copilot
branch
from
April 9, 2026 22:15
c7457d6 to
d638374
Compare
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> Co-Authored-By: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Contributor
Author
|
This was just to gather Copilot reviews. |
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.
CORE-1700
Summary
Migrated three critical content page layout components from styled-components to CSS Modules as part of Phase 2.6 of the Plain CSS Migration initiative.
Related Jira: CORE-1700
Components Migrated
1. PageContent (
src/app/content/components/Page/PageContent.tsx)highlightStylesarray in constantsPageContent.cssfor static stylesPageContent.legacy.tsfor backward-compatiblecontentTextStyleexport2. Topbar (
src/app/content/components/Topbar/)Topbar.csswith all responsive media queries3. Toolbar (
src/app/content/components/Toolbar/)Toolbar.csswith keyframe animationsToolbar.legacy.tsfor backward-compatible exports (PlainButton,barPadding,toolbarDefaultButton, etc.)Technical Implementation
CSS Variables for Dynamic Theming
Dynamic values (book theme colors, padding, gradients) are bound as CSS variables from JavaScript:
Icon Components
Kept icon components wrapped with
styled()using empty template literals for component selector compatibility, following pattern from Phase 1.4:Backward Compatibility
Created
.legacy.tsfiles to maintain exports used by other components:PageContent.legacy.ts: ExportscontentTextStyle(used by Attribution.tsx)Toolbar.legacy.ts: ExportsPlainButton,barPadding,toolbarDefaultButton, etc. (used by Topbar, TableOfContents, SidebarControl, PrintButton)Responsive Design
All media queries moved to top level in CSS (required for plain CSS):
Migration Patterns Followed
✅ Hybrid approach (theme in JavaScript, styles in CSS)
✅ CSS variables bound from theme at component level
✅ Top-level media queries (not nested)
✅ Separate
.legacy.tsfiles for backward compatibility✅
classNameslibrary for conditional class composition✅
React.forwardReffor components receiving refs✅ Transient prop filtering (props starting with
$)✅ Icon components wrapped with
styled()for compatibilityTesting Requirements
Responsive Testing
Test at all three breakpoints:
Topbar Functionality
Toolbar Functionality
PageContent / Highlights
Z-Index and Layering
Visual Regression
Files Changed
Next Steps
🤖 Generated with Claude Code
Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com