Skip to content

Remove Radium from TeacherContentToggle#72206

Open
Erin007 wants to merge 1 commit intostagingfrom
remove-radium-teacher-content-toggle
Open

Remove Radium from TeacherContentToggle#72206
Erin007 wants to merge 1 commit intostagingfrom
remove-radium-teacher-content-toggle

Conversation

@Erin007
Copy link
Copy Markdown
Contributor

@Erin007 Erin007 commented Apr 16, 2026

Trello card

https://trello.com/c/V4tl5zTF/9-remove-radium-from-apps-src-code-studio-components-teachercontenttogglejs

Summary

  • Removes radium import and Radium() HoC wrapper from TeacherContentToggle.js
  • Replaces Radium's array-merge style syntax ([baseStyle, condStyle]) with plain object spread: showX ? baseStyle : {...baseStyle, ...hiddenStyle}
  • UnconnectedTeacherContentToggle export is now the bare class instead of Radium(TeacherContentToggle)
  • All 13 existing unit tests pass without modification

Where to verify

TeacherContentToggle renders in the teacher panel on any level page. Log in as a teacher and visit any student level, then toggle View as → Student to exercise the locked/hidden lesson overlay behavior:

/s/csp1-2023/lessons/1/levels/1 (or any unit with a lockable lesson)

Check that:

  • The level content is visible by default in instructor view
  • Switching "View as Student" on a locked lesson shows the lock message overlay
  • Switching "View as Student" on a hidden lesson shows the hidden message overlay

Test plan

  • Visit a level page as a teacher, confirm normal instructor view renders correctly
  • Toggle "View as Student" with a locked lesson — lock overlay should appear
  • Toggle "View as Student" with a hidden lesson — hidden overlay should appear

🤖 Generated with Claude Code

Replace Radium array-merge style syntax with plain object spreads:
  [frameStyle, !showX && styles.hidden]
  → showX ? frameStyle : {...frameStyle, ...styles.hidden}

Drop the Radium HoC wrapper; UnconnectedTeacherContentToggle is now
the bare class. All 13 existing unit tests pass unchanged.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
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.

1 participant