Skip to content

Conversation

@OpenStaxClaude
Copy link
Contributor

Summary

Port all 4 JavaScript files in src/app/layouts/default/header/menus/main-menu to TypeScript following the project's guidelines.

Changes

  • login-menu/login-menu.jslogin-menu/login-menu.tsx
  • login-menu/login-menu-with-dropdown.jslogin-menu/login-menu-with-dropdown.tsx
  • dropdown/dropdown.jsdropdown/dropdown.tsx
  • main-menu.jsmain-menu.tsx

Guidelines Followed

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

Test Plan

  • Build passes without type errors
  • No runtime errors in main menu functionality
  • Visual regression tests pass

Related to: https://openstax.atlassian.net/browse/CORE-1266

🤖 Generated with Claude Code

@OpenStaxClaude OpenStaxClaude marked this pull request as ready for review November 3, 2025 22:07
OpenStaxClaude and others added 6 commits November 10, 2025 16:53
- Port all 4 files in src/app/layouts/default/header/menus/main-menu to .tsx
- Add type annotations following guidelines: avoid any, prefer type over interface
- Use inline type definitions for function parameters
- Rely on type inference where possible
- Keep line lengths under 120 characters

Related to CORE-1266

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

Co-Authored-By: Claude <[email protected]>
- Make children props optional to handle JSX children
- Add type assertion for window.SETTINGS
- Add explicit types for filter/map callbacks
- Use index as fallback key in map operations

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

Co-Authored-By: Claude <[email protected]>
Use double type assertion via unknown to properly convert Window type.

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

Co-Authored-By: Claude <[email protected]>
- Port all 4 files in src/app/layouts/default/header/menus/main-menu to .tsx
- Add type annotations following guidelines: avoid any, prefer type over interface
- Use inline type definitions for function parameters
- Rely on type inference where possible
- Keep line lengths under 120 characters

Related to CORE-1266

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

Fix lint issues

Fix window.SETTINGS type assertion

Use double type assertion via unknown to properly convert Window type.

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

Fix TypeScript type issues in main-menu files

- Make children props optional to handle JSX children
- Add type assertion for window.SETTINGS
- Add explicit types for filter/map callbacks
- Use index as fallback key in map operations

🤖 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