Skip to content

refactor: extract private method for time-picker step truncation - #12856

Merged
web-padawan merged 1 commit into
mainfrom
refactor/time-picker-truncate-time
Sep 28, 2026
Merged

web-padawan merged 1 commit into
mainfrom
refactor/time-picker-truncate-time

Conversation

@web-padawan

@web-padawan web-padawan commented Sep 26, 2026 •

Copy link
Copy Markdown
Member

Description

Updated all places that truncate a time object to the step resolution to use one method.

  • Added a private __truncateTime(time) method to TimePickerMixin that wraps validateTime(time, this.step)
  • Routed __getTimeObject, __setValueFromTime and __generateDropdownList through __truncateTime
    • The dropdown list used its local step copy, which only differs from this.step when the latter is unset and defaults to 3600. Both give minute precision, so the item values do not change.

Also changed to use "truncated" instead of "stripped" as it feels more appropriate.

Type of change

  • Refactor

🤖 Generated with Claude Code

@web-padawan web-padawan changed the title refactor: route time-picker step truncation through one method refactor: extract private method for time-picker step truncation Sep 26, 2026
@web-padawan
web-padawan requested a review from vursen September 26, 2026 07:55

@vaadin-review-bot vaadin-review-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

✅ Nothing to flag — the changes look good.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@web-padawan
web-padawan force-pushed the refactor/time-picker-truncate-time branch from be31fc6 to 2cf70d8 Compare September 26, 2026 08:28
@sonarqubecloud

Copy link
Copy Markdown

@web-padawan
web-padawan removed the request for review from vursen September 28, 2026 07:47
@web-padawan
web-padawan merged commit 15a9051 into main Sep 28, 2026
15 checks passed
@web-padawan
web-padawan deleted the refactor/time-picker-truncate-time branch September 28, 2026 07:47
web-padawan added a commit that referenced this pull request Sep 28, 2026
) (#12863)

Co-authored-by: Serhii Kulykov <iamkulykov@gmail.com>
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.

4 participants