Skip to content

feat(input-time-picker): add separate hour, minute, second and meridiem input fields #11712

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

Merged
merged 122 commits into from
May 2, 2025

Conversation

eriklharper
Copy link
Contributor

@eriklharper eriklharper commented Mar 7, 2025

Related Issue: #2709

Summary

This PR adds separate focusable and editable input fields for each portion of the time value in calcite-input-time-picker.

…or meridiem order after adding the proper rendering order logic for meridiem. Also fixing background color css variable assignment to work with both light and dark modes
…inputs because of issue #3883 and adding meridiem ordering logic, although it doesn't currently work with arabic, so we'll fix that in a follow-up
… for RTL meridiems. This allows the Tab key to go in sequence properly. Need to fix this to match in time-picker too.
…ate localizeTimeStringToParts, updated tests. Refactoring to set the localized input value in willUpdate when the value changes. This will ensure that only the last change to value will relocalize the input value because Lit batches updates to properties in willUpdate.
…der ring to match input-text styling, removing unused internal css variables that applied to input-text and getting the toggle icon working to open and close the popover
…g a step argument to toISOTimeString which will force the returned time value to conform to the provided step.
…ction that can be used by parseTimeString and toISOTimeString
…e meridiem setting somehow and there's still a lot of cleanup to do, but this is great progress.
…ding a component.requestUpdate to get the component to re-render when time properties change in the controller.
… removing toISOTimeStringFromParts in favor of just toISOTimeString
…ctored toISOTimeString and isValidTime to accept Time objects with expanded and improved unit tests.
…ll having trouble re-rendering it on some changes to it
…n't include proper logic to validate fractional seconds
@eriklharper eriklharper added pr ready for visual snapshots Adding this label will run visual snapshot testing. and removed pr ready for visual snapshots Adding this label will run visual snapshot testing. labels Apr 30, 2025
Copy link
Contributor

@ashetland ashetland left a comment

Choose a reason for hiding this comment

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

Looking good from the design side!

Copy link
Member

@jcfranco jcfranco left a comment

Choose a reason for hiding this comment

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

Great stuff, @eriklharper! The only thing I'd like addressed before merging is for the input to emit change events on blur and commit to preserve the expected behavior of emitting when users type and finalize a value.

Per our conversation, please create a high-priority follow-up issue to address suggested refactors.

👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈
👈🕐🕐🕐🕐👈🕐👈👈👈👈👈🕐👈🕐🕐🕐🕐👈👈🕐🕐🕐👈👈🕐🕐👈👈🕐👈👈👈🕐👈🕐🕐🕐🕐👈🕐👈
👈🕐👈👈🕐👈🕐👈👈👈👈👈🕐👈🕐👈👈👈👈🕐👈👈👈👈🕐👈👈🕐👈🕐🕐👈🕐🕐👈🕐👈👈👈👈🕐👈
👈🕐🕐🕐🕐👈🕐👈👈🕐👈👈🕐👈🕐🕐🕐👈👈👈🕐🕐👈👈🕐👈👈🕐👈🕐👈🕐👈🕐👈🕐🕐🕐👈👈🕐👈
👈🕐👈👈🕐👈🕐👈🕐👈🕐👈🕐👈🕐👈👈👈👈👈👈👈🕐👈🕐👈👈🕐👈🕐👈👈👈🕐👈🕐👈👈👈👈👈👈
👈🕐👈👈🕐👈👈🕐👈👈👈🕐👈👈🕐🕐🕐🕐👈🕐🕐🕐👈👈👈🕐🕐👈👈🕐👈👈👈🕐👈🕐🕐🕐🕐👈🕐👈
👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈👈

@eriklharper eriklharper added pr ready for visual snapshots Adding this label will run visual snapshot testing. and removed pr ready for visual snapshots Adding this label will run visual snapshot testing. labels May 2, 2025
@eriklharper eriklharper merged commit bdffb56 into dev May 2, 2025
14 checks passed
@eriklharper eriklharper deleted the eriklharper/2709-input-time-picker-masking branch May 2, 2025 21:57
eriklharper added a commit that referenced this pull request May 7, 2025
…recision (#12100)

**Related Issue:** #12090

## Summary

This PR addresses refactor review comments from #11712.
eriklharper added a commit that referenced this pull request May 7, 2025
…ust the component instance it was fired from (#12109)

**Related Issue:** #11712

## Summary

This PR fixes a critical issue caused by changes added in #11712 that
caused multiple instances of `calcite-input-time-picker` on a single
page to get updated when only 1 instance's value changed.
benelan pushed a commit that referenced this pull request May 14, 2025
…em input fields (#11712)

**Related Issue:** #2709

## Summary

This PR adds separate focusable and editable input fields for each
portion of the time value in `calcite-input-time-picker`.
benelan pushed a commit that referenced this pull request May 14, 2025
…recision (#12100)

**Related Issue:** #12090

## Summary

This PR addresses refactor review comments from #11712.
benelan pushed a commit that referenced this pull request May 14, 2025
…ust the component instance it was fired from (#12109)

**Related Issue:** #11712

## Summary

This PR fixes a critical issue caused by changes added in #11712 that
caused multiple instances of `calcite-input-time-picker` on a single
page to get updated when only 1 instance's value changed.
@eriklharper eriklharper added the visual changes Issues with visual changes that are added for consistency, but are not backwards compatible. label May 14, 2025
eriklharper added a commit that referenced this pull request May 15, 2025
…comments (#12108)

**Related Issue:** #12090 

## Summary

Addresses refactor changes originally requested in #11712.

- Drops the `localized` prefix from the `LocalizedTime` interface.
- Refactors `isValidTime()` util function to use more readable internal
variable names.
- Unifies the return and reduces duplication in the `toISOTimeString()`
util function.
- Converting an `if/else` to a ternary in stacked focus trap test
jcfranco pushed a commit that referenced this pull request May 29, 2025
…comments (#12108)

**Related Issue:** #12090 

## Summary

Addresses refactor changes originally requested in #11712.

- Drops the `localized` prefix from the `LocalizedTime` interface.
- Refactors `isValidTime()` util function to use more readable internal
variable names.
- Unifies the return and reduces duplication in the `toISOTimeString()`
util function.
- Converting an `if/else` to a ternary in stacked focus trap test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Issues tied to a new feature or request. pr ready for visual snapshots Adding this label will run visual snapshot testing. visual changes Issues with visual changes that are added for consistency, but are not backwards compatible.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants