Skip to content

fix(dataset-editor): add missing Data type label in calculated columns tab - #37165

Merged
rusackas merged 3 commits into
apache:masterfrom
massucattoj:fix/calculated-columns-data-type-label
Jan 23, 2026
Merged

rusackas merged 3 commits into
apache:masterfrom
massucattoj:fix/calculated-columns-data-type-label

Conversation

@massucattoj

Copy link
Copy Markdown
Contributor

SUMMARY

The "Data type" field in the calculated columns tab of the dataset editor was missing its label. This was caused by using the Select component which doesn't render form labels passed via props. Fixed by replacing Select with SelectControl, which includes ControlHeader for proper label rendering - matching the pattern used by other fields in the same form.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

BEFORE:
image

AFTER:
Screenshot 2026-01-15 at 07 33 08

TESTING INSTRUCTIONS

  1. Go to the dataset list
  2. Click edit on any dataset
  3. Switch to the calculated columns tab
  4. Add an item
  5. You will see now the Data Type select field.

ADDITIONAL INFORMATION

  • Has associated issue:
  • 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

@codeant-ai-for-open-source

Copy link
Copy Markdown
Contributor

CodeAnt AI is reviewing your PR.


Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@bito-code-review

bito-code-review Bot commented Jan 15, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Agent Run #52fe9a

Actionable Suggestions - 0
Review Details
  • Files reviewed - 1 · Commit Range: c5fae26..c5fae26
    • superset-frontend/src/components/Datasource/components/DatasourceEditor/DatasourceEditor.jsx
  • Files skipped - 0
  • Tools
    • 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 Superset You can customize the agent settings here or contact your Bito workspace admin at evan@preset.io.

Documentation & Help

AI Code Review powered by Bito Logo

@dosubot dosubot Bot added the change:frontend Requires changing the frontend label Jan 15, 2026
@codeant-ai-for-open-source

Copy link
Copy Markdown
Contributor

CodeAnt AI finished reviewing your PR.

@netlify

netlify Bot commented Jan 15, 2026

Copy link
Copy Markdown

✅ Deploy Preview for superset-docs-preview ready!

Name Link
🔨 Latest commit c5fae26
🔍 Latest deploy log https://app.netlify.com/projects/superset-docs-preview/deploys/6968c295e7fb480008c26a48
😎 Deploy Preview https://deploy-preview-37165--superset-docs-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

label={t('Data type')}
control={
<Select
<SelectControl

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I am not sure I am clear about why Select would not handle this properly. The Field component should care about the label to be displayed and the Select should work ok with this too. Is there a deeper issue going on in the components?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Looking a little bit deeper and yes, the Fieldcomponent correctly passes the label prop to child. However, the raw Select component uses a header prop for displaying labels, not a label. The SelectControl wrapper handles this by converting the label prop into a ControlHeader and passing it as the header prop that Select expects.

But yes there is a way to keep the Select component here, that is add this header prop. I'll use the old component with the new prop

@bito-code-review

Copy link
Copy Markdown
Contributor

Based on the PR diff, the change replaces the generic Select component with SelectControl, which is likely the standardized control for Superset forms. This ensures better integration with the Field component for proper label display and form behavior. A deeper issue might be that Select lacks support for props like freeForm, potentially affecting functionality beyond labeling.

@codeant-ai-for-open-source

Copy link
Copy Markdown
Contributor

CodeAnt AI is running Incremental review


Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@massucattoj
massucattoj requested a review from geido January 19, 2026 12:49
Comment on lines 317 to +319
<Select
ariaLabel={t('Data type')}
header={<FormLabel>{t('Data type')}</FormLabel>}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggestion: The added JSX uses the generic Select component which doesn't integrate with the form Field API and likely won't wire the value/onChange into the dataset column item; replace the Select usage with SelectControl and provide the controlId so the Field/Fieldset will correctly bind this input to the type field (this ensures the value is saved and the label is handled by the form control). [possible bug]

Severity Level: Critical 🚨
- ❌ Data type may not persist on calculated columns.
- ⚠️ Dataset editor form binding inconsistent.
- ⚠️ Users may lose edits when saving dataset.
Suggested change
<Select
ariaLabel={t('Data type')}
header={<FormLabel>{t('Data type')}</FormLabel>}
<SelectControl
controlId="type"
ariaLabel={t('Data type')}
Steps of Reproduction ✅
1. Open
superset-frontend/src/components/Datasource/components/DatasourceEditor/DatasourceEditor.jsx
and find the Field for "type" in the calculated-columns expandFieldset. The control JSX is
at hunk lines 317-324 (317 <Select ... 324 />).

2. Note the pattern used elsewhere in this file: controls wired to fields typically use
form-aware controls (e.g., TextControl has controlId set at lines ~296-300 for
"verbose_name"). Those controls integrate with Field/Fieldset binding.

3. Start the web app, go to dataset list, click Edit on a dataset, switch to Calculated
columns tab (the render for this tab mounts ColumnCollectionTable with allowEditDataType
enabled — see the render of the Calculated columns tab where ColumnCollectionTable is
rendered).

4. Add or edit a calculated column and change the Data type using the rendered Select (the
JSX at lines 317-324). Because the code uses the generic Select without
controlId/form-binding semantics, the Field/Fieldset machinery is not receiving input
through the same API other controls use. This can be observed by comparing other Field
controls in the same file that supply controlId (e.g., TextControl at lines ~296-300).
Replacing the JSX with <SelectControl controlId="type" .../> at the same location binds
this input to the Field API, ensuring values are persisted when the dataset is saved.
Prompt for AI Agent 🤖
This is a comment left during a code review.

**Path:** superset-frontend/src/components/Datasource/components/DatasourceEditor/DatasourceEditor.jsx
**Line:** 317:319
**Comment:**
	*Possible Bug: The added JSX uses the generic `Select` component which doesn't integrate with the form Field API and likely won't wire the value/onChange into the dataset column item; replace the `Select` usage with `SelectControl` and provide the `controlId` so the Field/Fieldset will correctly bind this input to the `type` field (this ensures the value is saved and the label is handled by the form control).

Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.

@codeant-ai-for-open-source

Copy link
Copy Markdown
Contributor

CodeAnt AI Incremental review completed.

@VanessaGiannoni VanessaGiannoni left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

Image

@bito-code-review

bito-code-review Bot commented Jan 19, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Agent Run #92d95d

Actionable Suggestions - 0
Review Details
  • Files reviewed - 1 · Commit Range: c5fae26..1014e4e
    • superset-frontend/src/components/Datasource/components/DatasourceEditor/DatasourceEditor.jsx
  • Files skipped - 0
  • Tools
    • 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 Superset You can customize the agent settings here or contact your Bito workspace admin at evan@preset.io.

Documentation & Help

AI Code Review powered by Bito Logo

@rusackas

Copy link
Copy Markdown
Member

Almost merged this, but spotted some suggested cahnges. Please slap a change request or hold label on this if you don't want a trigger happy merge to occur ;)

@codeant-ai-for-open-source

Copy link
Copy Markdown
Contributor

CodeAnt AI is running Incremental review


Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@massucattoj

Copy link
Copy Markdown
Contributor Author

Almost merged this, but spotted some suggested cahnges. Please slap a change request or hold label on this if you don't want a trigger happy merge to occur ;)

You can merge it now, thanks!

@codeant-ai-for-open-source

Copy link
Copy Markdown
Contributor

CodeAnt AI Incremental review completed.

@bito-code-review

bito-code-review Bot commented Jan 22, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Agent Run #892da7

Actionable Suggestions - 0
Review Details
  • Files reviewed - 2 · Commit Range: 1014e4e..b25e7f9
    • superset-frontend/src/components/Datasource/components/DatasourceEditor/DatasourceEditor.jsx
    • superset-frontend/src/components/Datasource/components/DatasourceEditor/tests/DatasourceEditor.test.tsx
  • Files skipped - 0
  • Tools
    • 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 Superset You can customize the agent settings here or contact your Bito workspace admin at evan@preset.io.

Documentation & Help

AI Code Review powered by Bito Logo

@rusackas
rusackas merged commit 04c5517 into apache:master Jan 23, 2026
76 of 77 checks passed
sadpandajoe pushed a commit that referenced this pull request Jan 23, 2026
@sadpandajoe sadpandajoe added the v6.0 Label added by the release manager to track PRs to be included in the 6.0 branch label Jan 23, 2026
alex-poor pushed a commit to alex-poor/superset that referenced this pull request Mar 15, 2026
qfcwell pushed a commit to qfcwell/superset that referenced this pull request May 12, 2026
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 size/S v6.0 Label added by the release manager to track PRs to be included in the 6.0 branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants