Skip to content

feat(input-time-picker): allow toggling time picker by clicking the input or entering the down/escape key #6832

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

Conversation

Elijbet
Copy link
Contributor

@Elijbet Elijbet commented Apr 23, 2023

Related Issue: #6830

Summary

This enhances the input-time-picker to allow it to be toggled via mouse and keyboard vs initial focus.

@github-actions github-actions bot added the enhancement Issues tied to a new feature or request. label Apr 23, 2023
@Elijbet Elijbet marked this pull request as ready for review April 23, 2023 22:41
@Elijbet Elijbet requested a review from a team as a code owner April 23, 2023 22:41
@Elijbet Elijbet requested a review from jcfranco April 23, 2023 22:41
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.

✨🕐🤏✨

Comment on lines +388 to +395
it("does not open the time picker on input keyboard focus", async () => {
const popover = await page.find("calcite-input-time-picker >>> calcite-popover");

await page.keyboard.press("Tab");
await page.waitForChanges();

expect(await popover.getProperty("open")).not.toBe(true);
});
Copy link
Contributor

Choose a reason for hiding this comment

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

This is cool and more inline with how Chrome's native time input works. This will also setup users to expect the focus to be more on the input than in the popup, which will transition usage nicely over to the popover-less input-time component.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Awesome! Thanks for the note.

@jcfranco jcfranco added the pr ready for visual snapshots Adding this label will run visual snapshot testing. label Apr 24, 2023
@jcfranco jcfranco merged commit 4639d89 into master Apr 24, 2023
@jcfranco jcfranco deleted the elijbet/6830-improve-input-time-picker-toggling-options branch April 24, 2023 22:46
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants