Skip to content

Conversation

@RoyLee1224
Copy link
Contributor

@RoyLee1224 RoyLee1224 commented Sep 1, 2025

Closes #54951

Summary

Replaced the hardcoded color scale in the Calendar view with a dynamic system. The new scale is generated based on the true min/max of the data.

Key Changes:

  • Dynamic Legend: The legend now intelligently adjusts its labels and display type (gradient vs. single value) to match the data distribution.

  • Fixes Low-Variance Display: Correctly handles cases where run counts are uniform (e.g., all days have 5 runs). The view now shows an appropriate medium-intensity color and a single-value legend, instead of a misleading maximum color.

Screenshots:

dynamic_legend.mp4

UI in different scenario (with mock data)

high_volume wide uniform

^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in airflow-core/newsfragments.

@boring-cyborg boring-cyborg bot added the area:UI Related to UI/UX. For Frontend Developers. label Sep 1, 2025
@pierrejeambrun pierrejeambrun added this to the Airflow 3.1.0 milestone Sep 2, 2025
Copy link
Member

@pierrejeambrun pierrejeambrun left a comment

Choose a reason for hiding this comment

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

Nice, tested locally and working. That's a cool addition.

Just a few suggestion, mainly to make the code more readable because there is a lot of computation, cases to handle and it can be hard to read in the current state.

@RoyLee1224
Copy link
Contributor Author

Hi @pierrejeambrun, I've pushed the updates addressing your comments. The code should be cleaner now. Please let me know what you think. Thanks!

@bbovenzi bbovenzi merged commit beaf15c into apache:main Sep 3, 2025
55 checks passed
@RoyLee1224 RoyLee1224 deleted the calendar-dynamic-range branch September 3, 2025 17:49
RoyLee1224 added a commit to RoyLee1224/airflow that referenced this pull request Sep 12, 2025
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Sep 30, 2025
* feat(ui): implement dynamic legend system for calendar

* refactor(ui): simplify calendar data handling

* refactor(ui): extract calendar color constants
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 1, 2025
* feat(ui): implement dynamic legend system for calendar

* refactor(ui): simplify calendar data handling

* refactor(ui): extract calendar color constants
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 2, 2025
* feat(ui): implement dynamic legend system for calendar

* refactor(ui): simplify calendar data handling

* refactor(ui): extract calendar color constants
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 3, 2025
* feat(ui): implement dynamic legend system for calendar

* refactor(ui): simplify calendar data handling

* refactor(ui): extract calendar color constants
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 4, 2025
* feat(ui): implement dynamic legend system for calendar

* refactor(ui): simplify calendar data handling

* refactor(ui): extract calendar color constants
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 5, 2025
* feat(ui): implement dynamic legend system for calendar

* refactor(ui): simplify calendar data handling

* refactor(ui): extract calendar color constants
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 5, 2025
* feat(ui): implement dynamic legend system for calendar

* refactor(ui): simplify calendar data handling

* refactor(ui): extract calendar color constants
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 7, 2025
* feat(ui): implement dynamic legend system for calendar

* refactor(ui): simplify calendar data handling

* refactor(ui): extract calendar color constants
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 8, 2025
* feat(ui): implement dynamic legend system for calendar

* refactor(ui): simplify calendar data handling

* refactor(ui): extract calendar color constants
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 9, 2025
* feat(ui): implement dynamic legend system for calendar

* refactor(ui): simplify calendar data handling

* refactor(ui): extract calendar color constants
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 10, 2025
* feat(ui): implement dynamic legend system for calendar

* refactor(ui): simplify calendar data handling

* refactor(ui): extract calendar color constants
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 11, 2025
* feat(ui): implement dynamic legend system for calendar

* refactor(ui): simplify calendar data handling

* refactor(ui): extract calendar color constants
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 12, 2025
* feat(ui): implement dynamic legend system for calendar

* refactor(ui): simplify calendar data handling

* refactor(ui): extract calendar color constants
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 14, 2025
* feat(ui): implement dynamic legend system for calendar

* refactor(ui): simplify calendar data handling

* refactor(ui): extract calendar color constants
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 15, 2025
* feat(ui): implement dynamic legend system for calendar

* refactor(ui): simplify calendar data handling

* refactor(ui): extract calendar color constants
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 17, 2025
* feat(ui): implement dynamic legend system for calendar

* refactor(ui): simplify calendar data handling

* refactor(ui): extract calendar color constants
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 19, 2025
* feat(ui): implement dynamic legend system for calendar

* refactor(ui): simplify calendar data handling

* refactor(ui): extract calendar color constants
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:UI Related to UI/UX. For Frontend Developers.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Calendar view: remove hardcoded data range

3 participants