Skip to content

Conversation

@bnussman-akamai
Copy link
Member

@bnussman-akamai bnussman-akamai commented May 21, 2024

Description 📝

Removes one-off onKeyDown logic from the RegionSelect to fix unexpected keyboard behavior ⌨️

Behavior Before this PR ❌

  • Pressing esc clears the value
  • Pressing enter clears the value
  • Basically, any keypress clears the input

Behavior After this PR ✅

  • Pressing esc should close the popover (not clear the value)
  • Pressing enter should not clear the value

How to test 🧪

  • Go to the Linode Create flow (v1 or v2 is fine)
  • Test the RegionSelect
  • Verify the RegionSelect feels ergonomic and works as you'd expect

As an Author I have considered 🤔

  • 👀 Doing a self review
  • ❔ Our contribution guidelines
  • 🤏 Splitting feature into small PRs
  • ➕ Adding a changeset
  • 🧪 Providing/Improving test coverage
  • 🔐 Removing all sensitive information from the code and PR description
  • 🚩 Using a feature flag to protect the release
  • 👣 Providing comprehensive reproduction steps
  • 📑 Providing or updating our documentation
  • 🕛 Scheduling a pair reviewing session
  • 📱 Providing mobile support
  • ♿ Providing accessibility support

@bnussman-akamai bnussman-akamai self-assigned this May 21, 2024
@bnussman-akamai bnussman-akamai requested a review from a team as a code owner May 21, 2024 16:12
@bnussman-akamai bnussman-akamai requested review from AzureLatte and carrillo-erik and removed request for a team May 21, 2024 16:12
Comment on lines -115 to -120
onKeyDown={(e) => {
if (e.key !== 'Tab') {
setSelectedRegion(null);
handleRegionChange(null);
}
}}
Copy link
Member Author

Choose a reason for hiding this comment

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

I'm curious about the original intention of this. Might warrant further discussion

Copy link
Contributor

Choose a reason for hiding this comment

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

If i remember well i had this in place cause a tab keydown would clear the select, but that's not something i can reproduce at all, so i am frankly doubting my sanity doing something like this - should've commented why.

Long story short, thx for fixing

Copy link
Member Author

Choose a reason for hiding this comment

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

No worries! 🚀

@github-actions
Copy link

github-actions bot commented May 21, 2024

Coverage Report:
Base Coverage: 81.53%
Current Coverage: 81.54%

Copy link
Contributor

@abailly-akamai abailly-akamai left a comment

Choose a reason for hiding this comment

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

This is much better, thx for fixing

@bnussman-akamai bnussman-akamai added the Add'tl Approval Needed Waiting on another approval! label May 21, 2024
@AzureLatte AzureLatte removed their request for review May 22, 2024 13:06
@jaalah-akamai jaalah-akamai added the Approved Multiple approvals and ready to merge! label May 22, 2024
@bnussman-akamai bnussman-akamai merged commit abb762a into linode:develop May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Add'tl Approval Needed Waiting on another approval! Approved Multiple approvals and ready to merge!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants