siddhitripathi25 opened a new issue, #37231:
URL: https://github.com/apache/superset/issues/37231

   ### Bug description
   
   Current State
   Apache Superset has excellent TypeScript adoption with 2,998 TypeScript 
files (91.3%) and just 285 JavaScript files remaining to achieve 100% 
TypeScript coverage in the frontend codebase.
   
   Priority Areas Identified
   Analysis shows the remaining JS files are concentrated in:
   
   1. Core Dashboard Functionality (High Impact)
   
   src/dashboard/util/ - 10 utility files
   src/dashboard/reducers/ - 5 Redux reducers
   src/dashboard/actions/ - 4 Redux actions
   2. Explore UI Controls (User-facing Components)
   
   src/explore/components/controls/MetricControl/ - 6 files
   src/explore/components/controls/ - 5 additional files
   3. Legacy Plugins (Potentially Lower Priority)
   
   8 legacy plugins with 4+ JS files each (rose, partition, map-box, etc.)
   These may require assessment regarding conversion vs. deprecation
   Proposed Migration Strategy
   
   Phase 1: High-Impact Core Files (≈30 files)
   Convert dashboard and explore utilities first - these affect many users and 
have established TypeScript patterns to follow.
   
   Phase 2: Remaining Source Files (≈100 files)
   Convert remaining src/ directory files not in legacy plugins.
   
   Phase 3: Legacy Plugin Assessment (≈155 files)
   Review which legacy plugins should be converted vs. potentially deprecated.
   
   Sample Files to Convert
   From initial analysis:
   
   src/dashboard/util/*.js - Core dashboard utilities
   src/explore/components/controls/MetricControl/*.js - UI controls
   src/dashboard/reducers/*.js - State management
   Benefits of Completion
   Consistency: Eliminate the 8.7% JavaScript exceptions in a 91% TypeScript 
codebase
   Type Safety: Close type gaps in critical areas like dashboard utilities
   Developer Experience: Uniform tooling, autocompletion, and refactoring 
across entire codebase
   Maintainability: Reduce cognitive load from JS/TS context switching
   Onboarding: Clear, consistent codebase for new contributors
   Suggested Tracking Checklist
   
    Audit all 285 JS files (create complete inventory)
   
    Convert src/dashboard/util/ (10 files) - Proposed starting point
   
    Convert src/dashboard/reducers/ (5 files)
   
    Convert src/dashboard/actions/ (4 files)
   
    Convert src/explore/components/controls/ (11 files)
   
    Assess legacy plugins conversion strategy
   
    Document conversion patterns for future contributors
   
    Update contribution guidelines if needed
   
   Contribution Plan
   I propose:
   
   Start with src/dashboard/util/ (10 files) as a pilot conversion
   Create reusable conversion templates/patterns
   Document the process for other contributors
   Help triage remaining files by priority and complexity
   Assist in reviewing conversion PRs from community contributors
   Questions for Maintainers
   
   Should legacy plugins be converted or potentially deprecated/archived?
   Any specific TypeScript patterns to follow for Redux actions/reducers?
   Preferred PR approach: by directory, by file type, or individual files?
   Are there any files/directories that should NOT be converted?
   Should we create a dedicated ts-migration label for tracking?
   Quick Stats (for reference)
   
   $ find . -type f \( -name "*.js" -o -name "*.jsx" \) | wc -l
   285
   $ find . -type f \( -name "*.ts" -o -name "*.tsx" \) | wc -l
   2998
   # Total: 3283 files, 91.3% TypeScript, 8.7% JavaScript remaining
   
   
   ## Label Request
   Could a maintainer please add appropriate labels such as:
   - `enhancement`
   - `frontend` 
   - `TypeScript` / `typescript`
   - `help wanted` (optional)
   
   ### Screenshots/recordings
   
   _No response_
   
   ### Superset version
   
   master / latest-dev
   
   ### Python version
   
   3.9
   
   ### Node version
   
   16
   
   ### Browser
   
   Chrome
   
   ### Additional context
   
   _No response_
   
   ### Checklist
   
   - [ ] I have searched Superset docs and Slack and didn't find a solution to 
my problem.
   - [ ] I have searched the GitHub issue tracker and didn't find a similar bug 
report.
   - [ ] I have checked Superset's logs for errors and if I found a relevant 
Python stacktrace, I included it here as text in the "additional context" 
section.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to