Phase 4.3: Study Guides UI Migration (Remaining Components)#3023
Merged
Conversation
RoyEJohnson
force-pushed
the
CORE-1830-study-guides-phase-4.3
branch
from
May 13, 2026 20:18
b8c016a to
15904de
Compare
RoyEJohnson
force-pushed
the
CORE-1704-study-guides-css-migration
branch
from
May 20, 2026 12:20
835719a to
40d290c
Compare
RoyEJohnson
force-pushed
the
CORE-1830-study-guides-phase-4.3
branch
2 times, most recently
from
May 20, 2026 15:36
619f51d to
56b338e
Compare
This comment was marked as resolved.
This comment was marked as resolved.
Migrate Filters.tsx and StudyGuides.tsx from styled-components to plain CSS following the hybrid approach documented in PLAIN_CSS_MIGRATION_GUIDE.md. Changes: - Filters.tsx: Migrated StyledColorFilter and RightButtonsWrapper to CSS classes - Created Filters.css with study-guides-color-filter and study-guides-right-buttons classes - Removed styled-components, replaced with className props - StudyGuides.tsx: Migrated nested component styling to CSS descendant selectors - Created StudyGuides.css targeting HighlightsChapterWrapper, HighlightSection, HighlightWrapper - Used :has() selectors to target styled-components by their data-testid attributes - Bound theme.color.neutral.darkest as CSS variable for print styles - Preserved mobile breakpoint and print styles Note: StudyGuidesPopUp.tsx and StudyGuidesToasts.tsx do not require migration as they only use shared components with no study-guides-specific styling. Related to CORE-1830 Snaps/lint css
Address Copilot review comments by fixing CSS selectors that were incorrectly using direct child combinator (>) from .study-guides-wrapper. Since .study-guides-wrapper has display:contents, the styled-components (HighlightsChapterWrapper, HighlightWrapper) are nested inside HighlightsWrapper, not direct children. Changes: - Remove > from .study-guides-wrapper > div selectors - Use div:has(> h2[...]) to precisely target HighlightsChapterWrapper - Use div:has(> h3[...]) to precisely target HighlightWrapper - Update comments to clarify the DOM structure and targeting approach Fixes all four issues identified in the review: 1. Mobile styles for HighlightsChapterWrapper (line 21) 2. Print padding for HighlightsChapterWrapper (line 45) 3. Print margin-left for HighlightWrapper (line 54) 4. Print margin-top for adjacent siblings (line 63) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
RoyEJohnson
force-pushed
the
CORE-1830-study-guides-phase-4.3
branch
from
June 3, 2026 18:02
83f0caa to
d2f4dab
Compare
Dantemss
approved these changes
Jun 8, 2026
RoyEJohnson
approved these changes
Jun 8, 2026
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.
Summary
This PR completes the study guides migration by converting the remaining study guides components from styled-components to plain CSS, continuing the work from Phase 4.2 (PR #2936).
Related Jira Ticket
CORE-1830: Phase 4.3: Study Guides UI Migration (Remaining Components)
Components Migrated
1. Filters.tsx ✅
StyledColorFilter(min-width styling)RightButtonsWrapper(flexbox layout)Filters.csswith plain CSS classes2. StudyGuides.tsx ✅
:has()to target styled-components by data-testidStudyGuides.csswith comprehensive comments3. StudyGuidesPopUp.tsx ✅
4. StudyGuidesToasts.tsx ✅
Migration Approach
Following the hybrid approach from
PLAIN_CSS_MIGRATION_GUIDE.md:Key Technical Notes
StudyGuides.tsx Nested Styling Challenge
The most complex part of this migration was handling
StudyGuides.tsx, which previously used styled-components' component interpolation feature to style imported components:Since the nested components (
HighlightsChapterWrapper,HighlightSection,HighlightWrapper) are styled-components that generate dynamic class names, we can't target them by class name. Instead, we use CSS descendant selectors with:has()pseudo-class to target elements by their structure and data-testid attributes:This approach:
:has()pseudo-class (all modern browsers)Testing
Due to Node version incompatibility in the environment, automated tests couldn't be run. Manual verification recommended:
Areas to Test
Test Steps
Follow the Testing Guide from Phase 4.2 (CORE-1704):
Success Criteria
Notes
PopupStyles,ToastNotifications) will be migrated in future phases🤖 Generated with Claude Code
Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com