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

Add support to enter select mode when user has 10+ opts #585

Merged
merged 3 commits into from
Mar 17, 2025

Conversation

jules2689
Copy link
Contributor

The Problem

I have a user that brought up a concern around the automatic selection of an option when 1 is selected but there are 10+ options. The user expected to enter a select mode so they could enter 10, but it automatically selected option 1. Unfortunately this started a deletion of their branch (as the select prompt was to select a branch to delete), which the user was surprised by.

Screen.Recording.2025-03-13.at.11.25.33.PM.mov

Solution

This PR is proposing to enter the select mode when the user selects 1 and there are 10+ options (2 when there are 20+, etc).

Screen.Recording.2025-03-13.at.11.26.49.PM.mov

This is anticipated to make the select option a little bit safer, though does introduce some (albeit minor) inconsistency by not auto-selecting. The benefit, however, is that we can now better support options 10+! I also doubt that most prompts actually have 10+ options unless choosing from a big list, and so this may be preferable anyways.

@jules2689 jules2689 requested a review from a team as a code owner March 14, 2025 06:33
@burke burke merged commit 9de43ff into Shopify:main Mar 17, 2025
8 checks passed
@ChanChar
Copy link
Member

ChanChar commented Mar 19, 2025

@jules2689 this seems to have broken the selectors - we can no longer hit enter on the single digits when there are more than 10 entries.

Scenarios:
w/ 10+ options, 1 + enter doesn't work
w/ 20+ options, 1 nor 2 work
and so on

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.

None yet

3 participants