mete-capar-kd opened a new pull request, #45179:
URL: https://github.com/apache/superset/pull/45179

   ### SUMMARY
   
   The shared time-range control requires switching range types to reach 
absolute date inputs. This PR adds a calendar editor with editable endpoints, 
separate input/icon interactions, and date-only or date-time modes for Explore 
and dashboard native filters.
   
   Selecting October 3 through October 7 includes both days (`2026-10-03 : 
2026-10-08`). A date-time range preserves the exact timestamp bounds. Relative 
presets remain relative, including recent minute/hour ranges; existing 
expression and custom controls remain available under Advanced options.
   
   `BasicDatePicker` provides strict manual input, a calendar-icon trigger, and 
hour/minute columns for date-time selection. `CalendarMonth` provides the 
shared month view and keyboard navigation. Incomplete, invalid, or unevaluated 
drafts disable Apply. Documentation and component/control regression tests are 
included, with no new dependencies or backend/schema changes.
   
   Implements the proposal in #45177. This PR is a draft pending SIP/design 
review, including display-format localization and rollout discussion.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   Before: the existing range-type selector, as shown in Superset's tutorial 
documentation.
   
   ![Existing time-range 
editor](https://raw.githubusercontent.com/apache/superset/b9e8188ad606f61317403c3be5ef9450dbe0e381/docs/static/img/tutorial/no_filter_on_time_filter.png)
   
   After: date range with editable endpoints and quick ranges.
   
   ![Date-range 
editor](https://raw.githubusercontent.com/mete-capar-kd/superset/e1e3bfd09c15a5590d5a926eebf25cce63b7223c/date-range.jpg)
   
   Single-date input and calendar popup:
   
   ![Date 
picker](https://raw.githubusercontent.com/mete-capar-kd/superset/e1e3bfd09c15a5590d5a926eebf25cce63b7223c/date-picker.jpg)
   
   Date-time input with hour/minute columns:
   
   ![Date-time 
picker](https://raw.githubusercontent.com/mete-capar-kd/superset/e1e3bfd09c15a5590d5a926eebf25cce63b7223c/datetime-picker.jpg)
   
   ### TESTING INSTRUCTIONS
   
   1. In Explore or a dashboard with a native time-range filter, open the 
time-range control.
   2. Click the endpoint text and type `03/10/2026` and `07/10/2026`. Confirm 
no endpoint popup opens and the evaluated range ends at `2026-10-08`.
   3. Enter `31/02/2026` or an incomplete date. Confirm the input retains the 
text and Apply stays disabled until corrected.
   4. Click an endpoint's calendar icon, select a date, and confirm it updates 
the input. Check Arrow Down, Escape, arrow-key navigation, and Page Up/Page 
Down.
   5. Switch to Date and time range. Enter `03/10/2026 12:10` through 
`07/10/2026 18:45`; alternatively select a date, hour, and minute and click 
Done. Confirm exact exclusive timestamp bounds.
   6. Select Last 4 hours and Apply. Confirm the stored value remains relative 
and resolves when the filter is evaluated.
   7. Select only a start date and confirm Apply is disabled. Cancel, reopen, 
and confirm the saved range is restored.
   8. Use Advanced options to edit existing custom/relative expressions. A 
saved unsupported expression should open the existing advanced editor 
automatically.
   9. On a shorter viewport, confirm the panel scrolls and the footer remains 
accessible.
   
   Automated validation:
   
   ```bash
   cd superset-frontend
   CI=true NODE_ENV=test node node_modules/jest/bin/jest.js --runInBand 
--silent \
     src/components/BasicCalendar \
     src/explore/components/controls/DateFilterControl
   ```
   
   Local validation on macOS (Node.js 26.7.0, Python 3.12):
   
   - 11 Jest suites / 109 tests passed, including manual-entry, picker-trigger, 
range-boundary, compatibility, and stale-response cases.
   - `pre-commit run` passed, including frontend formatting, lint, CSS lint, 
and TypeScript checking.
   - `npm run build` completed successfully (webpack emitted bundle/performance 
warnings).
   - `python scripts/translations/check_pot_drift.py` passed; the template 
includes the 48 new source messages.
   - Manually exercised the date-only and date-time controls in a running 
Superset dashboard; screenshots above use a local fictional dataset.
   
   The complete Docker image and upstream GitHub CI have not been validated 
locally.
   
   ### ADDITIONAL INFORMATION
   
   - [x] Has associated issue: #45177
   - [ ] Required feature flags:
   - [x] Changes UI
   - [ ] Includes DB Migration (follow approval process in 
[SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] Migration is atomic, supports rollback & is backwards-compatible
     - [ ] Confirm DB migration upgrade and downgrade tested
     - [ ] Runtime estimates and downtime expectations provided
   - [x] Introduces new feature or API: frontend date/time input components and 
range editing UI
   - [ ] Removes existing feature or API
   


-- 
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