Skip to content

Conversation

@OpenStaxClaude
Copy link
Contributor

@OpenStaxClaude OpenStaxClaude commented Sep 23, 2025

Summary

  • Converted 7 JavaScript files in the assignable page to TypeScript with comprehensive type definitions
  • Added proper prop typing for all React components following Roy's guidelines
  • Created test file with TypeScript type validation tests
  • Maintained existing functionality while adding type safety

Files converted

  • assignable.js -> assignable.tsx (main page component with complete data type)
  • sections/banner/banner.tsx (with image metadata and heading props)
  • sections/about/about.tsx (with carousel image array typing)
  • sections/courses/courses.tsx (with BookData and CourseList typing)
  • sections/faq/faq.tsx (with FAQItem and accordion item typing)
  • sections/overlapping-quote/overlapping-quote.tsx (with CTA props)
  • sections/cta/cta.tsx (with link and button text props)

Test plan

  • All files converted follow TypeScript best practices
  • Comprehensive type definitions added for complex nested props
  • Test file created with TypeScript validation tests
  • No functionality changes, pure TypeScript port
  • Verify build passes with TypeScript compilation
  • Verify existing page functionality works unchanged

Resolves CORE-1256

🤖 Generated with Claude Code

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even in the first commit this was done as delete-and-create. There's not much here.
I had to move the dynamic imports to their own JS file because they break Jest.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This and other "sections" files show as changes in the individual commits. Beyond adding types and formatting, nothing has changed in them.

Copy link
Contributor

@RoyEJohnson RoyEJohnson Sep 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is unrelated to the assignable page, but it's a change that needs to be made to a bunch of tests to make them quieter. I happened to refer to this file for some testing ideas.

@RoyEJohnson RoyEJohnson requested a review from jivey September 24, 2025 15:48
Copy link
Member

@jivey jivey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't test the frontend but changes seem alright

OpenStaxClaude and others added 3 commits September 30, 2025 09:50
- Convert 7 JavaScript files to TypeScript with comprehensive type definitions
- Add proper prop typing for all React components following Roy's guidelines
- Maintain existing functionality while adding type safety
- Create test file with TypeScript type validation tests
- Support complex nested data structures with proper typing

Files converted:
- assignable.js -> assignable.tsx (main page component)
- sections/banner/banner.js -> banner.tsx
- sections/about/about.js -> about.tsx
- sections/courses/courses.js -> courses.tsx
- sections/faq/faq.js -> faq.tsx
- sections/overlapping-quote/overlapping-quote.js -> overlapping-quote.tsx
- sections/cta/cta.js -> cta.tsx

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

Co-Authored-By: Claude <[email protected]>
@RoyEJohnson RoyEJohnson force-pushed the typescript-assignable-page branch from 8d88c35 to f6b86b1 Compare September 30, 2025 14:50
@RoyEJohnson RoyEJohnson merged commit 3685448 into main Sep 30, 2025
1 check passed
@RoyEJohnson RoyEJohnson deleted the typescript-assignable-page branch September 30, 2025 15:04
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.

4 participants