Skip to content

⬆️ Upgrade React 18, TypeScript 5, antd 4 with react-hook-form migration#433

Merged
ra100 merged 16 commits intomasterfrom
feat/react-18-antd-4-phase1
Feb 14, 2026
Merged

⬆️ Upgrade React 18, TypeScript 5, antd 4 with react-hook-form migration#433
ra100 merged 16 commits intomasterfrom
feat/react-18-antd-4-phase1

Conversation

@ra100
Copy link
Owner

@ra100 ra100 commented Feb 13, 2026

Summary

  • Upgrade React from 17 to 18.3.1 with createRoot API
  • Upgrade TypeScript from 4.9 to 5.7.3
  • Upgrade antd from 3.x to 4.24.15 with @ant-design/icons
  • Migrate all forms (SSM, QCLM, PAS) from antd 3 form HOC to react-hook-form
  • Implement lazy loading for feature-viewer with dynamic imports for jQuery/d3
  • Fix ESM compatibility issues by converting require() to import for JSON files
  • Migrate Menu component to antd 4 items API

Changes

React 18 Migration

  • Updated index.tsx to use createRoot API
  • Fixed React strict mode compatibility

antd 4 Migration

  • Installed @ant-design/icons@4.8.3 for icon components
  • Migrated Icon component pattern from antd 3 to antd 4
  • Updated Menu to use items prop instead of Menu.Item children
  • Fixed Table rowKey type annotations

react-hook-form Migration

  • Replaced antd 3 form HOC with react-hook-form
  • Updated validation functions from callback-based to return-based
  • Simplified form state management

Feature-viewer Lazy Loading

  • Created FeatureViewerLoader.ts for dynamic loading
  • Lazy loads jQuery and d3 as window globals
  • Dynamically imports feature-viewer module
  • Updated all three FeatureViewer scene components

ESM Compatibility

  • Converted require() calls to import statements for JSON files
  • Fixed TypeScript type annotations for JSON imports

Testing

  • ✅ TypeScript compilation successful
  • ✅ Production build successful
  • ✅ 84/84 E2E tests pass
  • ✅ No console errors in browser

ra100 added 16 commits February 13, 2026 18:24
- Update Python from 3.7 to 3.11 in Makefile
- Upgrade biopython to 1.86, boto3 to latest
- Update lambda runtime to python3.11
- Update README installation instructions
- Add FastAPI server implementation (server_fastapi.py)
- Update requirements with fastapi, uvicorn, pydantic
- Update server.py to use FastAPI instead of hug
- Update axios to 1.7.0
- Update uuid to 10.0.0
- Update lodash and other dependencies
- Update devDependencies for compatibility
- Update axios, uuid, lodash to latest versions
- Update TypeScript type definitions
- Replace React.SFC with React.FC for future React 18 compatibility
- Add migration plan for React 18 + antd 4+ + Vite

Note: antd 4+ upgrade requires Form API rewrite (Form.create → Form.useForm)
This is a prerequisite change for the eventual React 18 migration.
- Add path aliases for shared, scenes, services, typings directories
- Configure feature-viewer as CommonJS module for proper import resolution
- Add optimizeDeps and commonjsOptions for feature-viewer compatibility
- Build now passes with Vite
- Update React to 18.3.1 with createRoot API
- Update TypeScript to 5.7.3
- Update antd to 4.24.15 with @ant-design/icons 4.8.3
- Migrate Icon components to @ant-design/icons
- Remove legacy webpack dependencies
- Rewrite withForm HOC for antd 4 compatibility
- Replace antd 3 Form.create() with react-hook-form
- Migrate SSMForm, QCLMForm, PASForm to use Controller/useWatch
- Migrate MinOptMaxInputs, ParametersFormSection, CodonUsage
- Install react-hook-form dependency
- Keep antd Form.Item for layout/validation display

TypeScript errors remaining due to type mismatches between
react-hook-form types and existing form data types.
- Convert withForm HOC to use react-hook-form's useForm and FormProvider
- Migrate SSMForm, QCLMForm, PASForm to use Controller components
- Update validation functions to return values instead of callbacks
- Fix table rowKey type for antd 4 Table component
- Add TypeScript declaration for MutationsTable JSX component
- Install @ant-design/compatible for legacy Form usage
- Update tsconfig to properly exclude feature-viewer from type checking
- Convert require() calls to ES module imports for JSON files
- Add vite config for global/process polyfills
- Update feature-viewer to use ES module syntax
- Add 'start' script to package.json for vite dev server
- Create FeatureViewerLoader.ts for dynamic imports of feature-viewer
- Update FeatureViewerComponent to use async initialization
- Refactor SSM/QCLM/PAS FeatureViewer components to receive FeatureViewer class
- Add @types/d3 for TypeScript support
- Fix TypeScript type issues in genes.ts for JSON imports
- Convert Menu.Item children to items prop pattern
- Fix console error test to use proper assertion
- Remove unused @ant-design/compatible package (required antd 3.x)
- Rewrite MutationsTable to use antd 4 Form API directly
- Add --legacy-peer-deps for npm install in CI for recompose
- Replace placeholder test gene with 772bp sequence (257 codons)
- Design primers with achievable Tm thresholds (67-68°C)
- Fix plasmid structure: forward_primer + gene + RC(reverse_primer)
- Update mutation positions to match actual amino acids in sequence
- Set max_three_end_temperature=78°C to match achievable 3' Tm values
- All SSM preset and config range tests now pass
- Replace placeholder 30bp gene with 772bp gene (257 codons)
- Add proper flanking primers for test scenarios
- Fixes randrange() error in random_qclm_mutations()
@ra100 ra100 merged commit f5f774d into master Feb 14, 2026
4 of 6 checks passed
@ra100 ra100 deleted the feat/react-18-antd-4-phase1 branch February 14, 2026 17:53
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