Skip to content

fix(explore): show selected current date range - #42616

Merged
EnxDev merged 5 commits into
apache:masterfrom
endimonan:fix/current-date-radio-selection
Jul 31, 2026
Merged

fix(explore): show selected current date range#42616
EnxDev merged 5 commits into
apache:masterfrom
endimonan:fix/current-date-radio-selection

Conversation

@endimonan

@endimonan endimonan commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

SUMMARY

Fixes #42613.

The Current date range frame received the selected value but did not pass it to Radio.GroupWrapper, leaving the radio group uncontrolled. This passes the value through so the selected Current option is shown and adds a regression test.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Reproduced on master and verified on this branch, using the same chart and the same steps. Only the branch differs.

Before

The Current option is already applied, as the actual time range shows, but no radio button is checked:

05-BEFORE-tela-cheia

After

The radio button matching the current value is checked:

06-AFTER-tela-cheia

The same difference appears when the filter is reopened: on master, choosing Current day and applying it leaves every radio button unchecked once the filter is reopened, while here the corresponding radio button stays checked.

TESTING INSTRUCTIONS

  1. Open a Date Range filter.
  2. Select the Current frame and choose a value such as Current day.
  3. Reopen the filter and verify the corresponding radio button remains selected.
  4. Run:
    npm run test -- src/explore/components/controls/DateFilterControl/tests/CurrentCalendarFrame.test.tsx

Automated validation:

  • Focused Jest suite: 3 tests passed.
  • Pre-commit hooks for the changed files, including TypeScript type-checking: passed.
  • pre-commit run --all-files was executed; unrelated baseline/environment failures remain in main mypy checks, generated frontend declarations in the clean validation environment, and the unavailable helm-docs binary.

ADDITIONAL INFORMATION

@endimonan
endimonan marked this pull request as ready for review July 30, 2026 16:40
@dosubot dosubot Bot added change:frontend Requires changing the frontend explore:time Related to the time filters in Explore labels Jul 30, 2026
@sadpandajoe
sadpandajoe requested review from EnxDev and rusackas July 30, 2026 17:24
@bito-code-review

bito-code-review Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Code Review Agent Run #a3e774

Actionable Suggestions - 0
Review Details
  • Files reviewed - 2 · Commit Range: c10854e..dd90b51
    • superset-frontend/src/explore/components/controls/DateFilterControl/components/CurrentCalendarFrame.tsx
    • superset-frontend/src/explore/components/controls/DateFilterControl/tests/CurrentCalendarFrame.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

@EnxDev
EnxDev merged commit 7d2b184 into apache:master Jul 31, 2026
62 checks passed
@bito-code-review

Copy link
Copy Markdown
Contributor

Bito Automatic Review Skipped – PR Already Merged

Bito scheduled an automatic review for this pull request, but the review was skipped because this PR was merged before the review could be run.
No action is needed if you didn't intend to review it. To get a review, you can type /review in a comment and save it

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 explore:time Related to the time filters in Explore size/S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Date Range filter: CURRENT filter: radio-button on the filter does not show option selected

2 participants