Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: expose i18n object by adding setter and getter #6330

Merged
merged 9 commits into from
Jul 11, 2024

Conversation

vursen
Copy link
Contributor

@vursen vursen commented May 29, 2024

Description

The PR provides public access to the i18n object of DateTimePicker by adding setter and getter methods.

Note

The i18n object has only two properties at the moment: dateLabel and timeLabel. These properties specify a suffix to be added to the aria-label of DatePicker and TimePicker, where the first part of that aria-label is the aria-label or label of DateTimePicker. Due to an API design issue, we also have methods setDateAriaLabel and setTimeAriaLabel set these suffixes despite their name suggesting they set the whole aria-label (overriding the default aria-label format). Ideally, they would be changed to set the whole aria-label while suffixes would only be set through i18n. However, this would be a significant breaking change, which is too big to be included in a minor version. So, for now, it was decided to keep these properties in i18n and also retain these methods, with the difference that the methods will store their labels separately from i18n and their labels will take precedence over the labels set through i18n to avoid undesired side effects.

Part of #4618

Type of change

  • Feature

@vursen vursen changed the title feat: expose i18n object by providing corresponding setter and getter feat: expose i18n object by adding setter and getter methods May 29, 2024
@vursen vursen changed the title feat: expose i18n object by adding setter and getter methods feat: expose i18n object by adding setter and getter May 29, 2024
@vursen vursen marked this pull request as ready for review May 29, 2024 11:56
@vursen vursen force-pushed the refactor/expose-date-time-picker-i18n branch from 5534811 to bfcbf42 Compare May 29, 2024 13:15
@vursen vursen force-pushed the refactor/expose-date-time-picker-i18n branch from bfcbf42 to 926208a Compare June 3, 2024 08:45
@vursen vursen requested a review from yuriy-fix June 3, 2024 09:37
Copy link

sonarcloud bot commented Jun 4, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@vursen vursen force-pushed the refactor/expose-date-time-picker-i18n branch from ed18cac to 96478fe Compare July 11, 2024 05:48
Copy link

sonarcloud bot commented Jul 11, 2024

@vursen vursen requested review from DiegoCardoso and removed request for DiegoCardoso and yuriy-fix July 11, 2024 08:19
@vursen vursen merged commit cb88298 into main Jul 11, 2024
5 checks passed
@vaadin-bot
Copy link
Collaborator

This ticket/PR has been released with Vaadin 24.5.0.alpha5 and is also targeting the upcoming stable 24.5.0 version.

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

Successfully merging this pull request may close these issues.

5 participants