Skip to content

Conversation

@amym-li
Copy link

@amym-li amym-li commented Nov 27, 2025

SUMMARY

To migrate the Tab component, the following steps were performed:

  1. Renamed the index file from index.js => index.ts
  2. Renamed the component file from Tab.jsx => Tab.tsx
  3. In Tab.tsx
    • Replaced the propTypes const with an interface TabProps definition
    • Typed callbacks and handlers to their expected values
  4. In Tab.test.tsx,
    • Imported RENDER_TAB and RENDER_TAB_CONTENT from Tab.tsx
    • In createProps function, casted component and parentComponent properties to LayoutItem type
  5. In DashboardComponent.jsx,
    • Added missing properties to propTypes const
  6. In types.ts,
    • Added missing properties to the DashboardState and LayoutItemMeta types
  7. Resolved type errors

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Before:
image
image

After:
image
image

TESTING INSTRUCTIONS

CI and unit tests. Add a Tabs layout element to a dashboard and confirm that adding/editing/removing a tab works as expected.

ADDITIONAL INFORMATION

  • Has associated issue: [SIP-36] Proposal for standardizing use of TypeScript #9101
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

REVIEWERS

to: @rusackas @msyavuz @justinpark @sadpandajoe @geido

@bito-code-review
Copy link
Contributor

bito-code-review bot commented Nov 27, 2025

Code Review Agent Run #488c7e

Actionable Suggestions - 0
Additional Suggestions - 1
  • superset-frontend/src/dashboard/containers/DashboardComponent.jsx - 1
    • Convert JavaScript file to TypeScript · Line 52-58
      This file is written in JavaScript and uses PropTypes, but the codebase is actively migrating to TypeScript for better type safety. Consider converting this file to .tsx and defining prop types with TypeScript interfaces instead of PropTypes to align with ongoing refactors.
Review Details
  • Files reviewed - 3 · Commit Range: 3c4930a..3c4930a
    • superset-frontend/src/dashboard/components/gridComponents/Tab/Tab.test.tsx
    • superset-frontend/src/dashboard/containers/DashboardComponent.jsx
    • superset-frontend/src/dashboard/types.ts
  • Files skipped - 0
  • Tools
    • Eslint (Linter) - ✔︎ Successful
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful

Bito Usage Guide

Commands

Type the following command in the pull request comment and save the comment.

  • /review - Manually triggers a full AI review.

  • /pause - Pauses automatic reviews on this pull request.

  • /resume - Resumes automatic reviews.

  • /resolve - Marks all Bito-posted review comments as resolved.

  • /abort - Cancels all in-progress reviews.

Refer to the documentation for additional commands.

Configuration

This repository uses Default Agent You can customize the agent settings here or contact your Bito workspace admin at [email protected].

Documentation & Help

AI Code Review powered by Bito Logo

@dosubot dosubot bot added change:frontend Requires changing the frontend dashboard:tab Related to the usage of tabs in the Dashboard labels Nov 27, 2025
@amym-li amym-li changed the title [SIP-36] Migrate Tab.jsx to Tab.tsx chore(ts): Migrate Tab.jsx to Tab.tsx [SIP-36] Nov 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

change:frontend Requires changing the frontend dashboard:tab Related to the usage of tabs in the Dashboard size/L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants