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

Focus in code input when totp is checked #645

Merged
merged 2 commits into from
Dec 2, 2024

Conversation

thrijith
Copy link
Contributor

@thrijith thrijith commented Oct 24, 2024

What?

This PR updates the UX for when TOTP is checked it focuses in the code input, fixes #159

Why?

For better UX as requested in #159

How?

Adds an event listener to check when the checkbox is enabled to focus into the code.

Testing Instructions

Start the env after checking out into the branch go to http://localhost:8888/wp-admin/profile.php, scroll down two factor options, confirm it focuses into the input.

Screenshots or screencast

https://share.cleanshot.com/qWNlb6gQTp90hDS8Fq0Q

Changelog Entry

Changed - UX update, focus into code input when TOTP is enabled

@jeffpaul jeffpaul added this to the 0.10.0 milestone Oct 24, 2024
@jeffpaul jeffpaul requested a review from dd32 October 24, 2024 18:17
Copy link
Collaborator

@kasparsd kasparsd left a comment

Choose a reason for hiding this comment

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

This looks good! Can switch to jQuery for consistency with the rest of the inline JS in a follow-up pull request.

Also, need to ensure that this JS doesn't fail if the TOTP method is not available (disabled via code, for example).

@kasparsd kasparsd merged commit 636dc0b into WordPress:master Dec 2, 2024
24 checks passed
@jeffpaul jeffpaul modified the milestones: 0.11.0, 0.10.0 Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

UX: Focus the confirmation code field while configuring the TOTP method
3 participants