Skip to content

fix(number-format): preserve custom smart formatter id - #43439

Merged
sadpandajoe merged 1 commit into
apache:masterfrom
russlan23:fix/smart-number-formatter-id
Aug 25, 2026
Merged

sadpandajoe merged 1 commit into
apache:masterfrom
russlan23:fix/smart-number-formatter-id

Conversation

@russlan23

Copy link
Copy Markdown
Contributor

SUMMARY

createSmartNumberFormatter treated id || signed as the ternary condition, so any supplied formatter ID was replaced with a built-in smart-number ID. This preserves a supplied ID and only selects the signed or unsigned default when id is absent.

Regression coverage verifies custom IDs with both signed modes.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Not applicable; this fixes formatter metadata without changing UI rendering.

TESTING INSTRUCTIONS

  • npm test -- packages/superset-ui-core/test/number-format/factories/createSmartNumberFormatter.test.ts --runInBand - 23 passed
  • npx tsc --build packages/superset-ui-core/tsconfig.json
  • npx oxfmt <changed files> --check
  • npx oxlint --config oxlint.json --quiet <changed files>

ADDITIONAL INFORMATION

@dosubot dosubot Bot added the change:frontend Requires changing the frontend label Aug 24, 2026
@bito-code-review

bito-code-review Bot commented Aug 24, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Agent Run #2182d5

Actionable Suggestions - 0
Review Details
  • Files reviewed - 2 · Commit Range: e94b7af..e94b7af
    • superset-frontend/packages/superset-ui-core/src/number-format/factories/createSmartNumberFormatter.ts
    • superset-frontend/packages/superset-ui-core/test/number-format/factories/createSmartNumberFormatter.test.ts
  • Files skipped - 0
  • Tools
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful
    • Eslint (Linter) - ✔︎ Successful

Bito Usage Guide

Commands

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

  • /review - Manually triggers an incremental AI Review.

  • /review full - 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 [email protected].

Documentation & Help

AI Code Review powered by Bito Logo

@codecov

codecov Bot commented Aug 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.85%. Comparing base (9f505eb) to head (e94b7af).
⚠️ Report is 13 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #43439      +/-   ##
==========================================
- Coverage   78.85%   78.85%   -0.01%     
==========================================
  Files        2876     2876              
  Lines      164581   164580       -1     
  Branches    38011    38010       -1     
==========================================
- Hits       129786   129785       -1     
  Misses      32348    32348              
  Partials     2447     2447              
Flag Coverage Δ
javascript 74.21% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@rusackas rusackas left a comment

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.

LGTM, approving. Confirmed the only internal callers never pass a custom id, so this only fixes the external-consumer case the issue describes, no risk to existing behavior.

@sadpandajoe
sadpandajoe merged commit 02b3e43 into apache:master Aug 25, 2026
88 checks passed
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 packages size/S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

createSmartNumberFormatter drops a caller-supplied id and mislabels the formatter as signed

3 participants