Skip to content

Conversation

@OpenStaxClaude
Copy link
Contributor

@OpenStaxClaude OpenStaxClaude commented Nov 25, 2025

This may need to be redone, since #2799 removed sticky-footer, including some code in the microsurvey stuff. Wait until it is merged to pick this up.

Summary

Converts JavaScript files in src/app/layouts/default/microsurvey-popup to TypeScript as part of the migration effort tracked in CORE-1386.

Changes

  • adoption-content.tsx: Added proper TypeScript types for cookie management, dismissal hooks, and component types
  • queue.tsx: Typed the microsurvey queue system with MicrosurveyComponent and UseContentHook types
  • sticky-content.tsx: Created StickyData type for sticky note content structure and typed all hook returns

Guidelines Followed

  • Avoided using any type
  • Preferred type over interface
  • Relied on type inference where possible
  • Used inline type definitions for function parameters
  • Kept line lengths under 120 characters
  • Each file ends with a blank line

Related Issue

https://openstax.atlassian.net/browse/CORE-1386

🤖 Generated with Claude Code

@RoyEJohnson RoyEJohnson marked this pull request as draft December 3, 2025 19:51
OpenStaxClaude and others added 2 commits December 4, 2025 12:21
- Convert adoption-content.js to TypeScript with proper return types
- Convert queue.js to TypeScript with typed queue and component types
- Convert sticky-content.js to TypeScript with StickyData type
- Add React.ComponentType for microsurvey components
- Type all hook parameters and return values
- Add proper types for cookie reducer and dismissal logic

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[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.

3 participants