Skip to content

Conversation

@didip1000
Copy link
Contributor

@didip1000 didip1000 commented Mar 24, 2025

With this change we introduce the new picker component ui5-yearrange-picker which users can use to quickly navigate through a range of years.

Selecting the header or pressing shift + f4, in the in Year picker, will open the Year Range picker

Demo:

YRP-demo

More examples:

yrp-min-max yrp-2nd-cal

[Left] Like in the Year picker, dates before the min-date will not be shown, and dates after the max-date will be disabled
[Right] Year Range picker with primary-calendar-type="Islamic" and secondary-calendar-type="Gregorian"

Fixes: #3200
Fixes: #11011
Fixes: #10867

@didip1000 didip1000 self-assigned this Mar 24, 2025
@unazko
Copy link
Contributor

unazko commented Apr 15, 2025

  1. There is a difference in the displayed years when in the year view compared to what it was before and in openui5 calendar. For example the years would now be from 2016 to 2035 whereas before it was from 2015 to 2034 when the current day is 15 of April 2025. That affects the year range view as well for example with the 15 of April we'll receive 1976 to 2135 in the year range view instead of 1935 to 2094.
  2. The year range rectangles have smaller width than the same in openui5. Also if a secondary calendar type "Islamic" gets set then we'll have the same amount of displayed rectangles for the years and the year ranges. Then it's clearly visible that the year rectangles are wider than the year range rectangles.

@didip1000
Copy link
Contributor Author

  1. There is a difference in the displayed years when in the year view compared to what it was before and in openui5 calendar. For example the years would now be from 2016 to 2035 whereas before it was from 2015 to 2034 when the current day is 15 of April 2025. That affects the year range view as well for example with the 15 of April we'll receive 1976 to 2135 in the year range view instead of 1935 to 2094.

I changed the "focused date" to be the 10th grid date (in normal year view) instead of the 11th since it is more centered, and we discussed this with the designers that it would be preferable for the focus to be in the upper left of the "center". I believe the date change was caused by that. I will confirm with the designers again if this is correct.

For the year range view, the centered date is the 3rd one always.

  1. The year range rectangles have smaller width than the same in openui5. Also if a secondary calendar type "Islamic" gets set then we'll have the same amount of displayed rectangles for the years and the year ranges. Then it's clearly visible that the year rectangles are wider than the year range rectangles.

the rectangles in openui5 aren't according to spec, they text reaches where the border is supposed to be, as for year picker vs year-range-picker, you're right, they seem to be ever so slightly thinner, I will check that.

@unazko unazko requested a review from tsanislavgatev May 5, 2025 08:26
@didip1000 didip1000 marked this pull request as ready for review May 22, 2025 15:27
@didip1000 didip1000 requested a review from tsanislavgatev May 23, 2025 14:40
@tsanislavgatev tsanislavgatev requested a review from vladitasev May 28, 2025 13:53
Copy link
Contributor

@vladitasev vladitasev left a comment

Choose a reason for hiding this comment

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

Everything looks great! I didn't test much but from what I did, F4 on year picker does not trigger year range picker (as it says in the commit)

@didip1000 didip1000 dismissed tsanislavgatev’s stale review May 29, 2025 13:50

Already has an approval from Vladi :)

@didip1000
Copy link
Contributor Author

didip1000 commented May 29, 2025

Everything looks great! I didn't test much but from what I did, F4 on year picker does not trigger year range picker (as it says in the commit)

Corrected it to the following:

Selecting the header or pressing shift + f4, in the in Year picker, will open the Year Range picker

Also keep in mind that on mac it's fn + the other keys because the default behaviour of f4 is to search

@didip1000 didip1000 merged commit d9a40d2 into main May 29, 2025
12 checks passed
@didip1000 didip1000 deleted the year-range-picker branch June 2, 2025 07:09
@DMihaylova DMihaylova added this to the 2.11.0 milestone Jun 5, 2025
@ui5-webcomponents-bot
Copy link
Collaborator

🎉 This PR is included in version v2.11.0-rc.4 🎉

The release is available on v2.11.0-rc.4

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Calendar]: Various issues with latest calendar Refactor ui5-calendar's onAfterRendering logic Calendar: wrong header of year view

7 participants