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

Remove string refs from SelectDropdown. #34989

Closed
wants to merge 2 commits into from

Conversation

sgomes
Copy link
Contributor

@sgomes sgomes commented Jul 30, 2019

It's been rewritten to use React.createRef instead.
In addition, SelectDropdownItem has been rewritten as a functional component, and some ARIA fixes were added.

Changes proposed in this Pull Request

  • Rewrite SelectDropdown to use React.createRef instead of string refs.
  • Rewrite SelectDropdownItem as a functional component with ref forwarding.
  • Fix some ARIA attributes on SelectDropdown and SelectDropdownItem.

Testing instructions

  • Go to e.g. stats/insights
  • Try the dropdown in "Comments" and ensure that it works correctly with the mouse.
  • Ensure that it also works correctly with the keyboard. Note that the "focus" state is very hard to see (it's just a thin black outline), but hitting Space should select the currently focused item.

Note: If I added you as a reviewer and you're not familiar with this code, sorry about that, I'm just going by GitHub recommendations! If that's the case, please feel free to remove yourself or ignore the PR. And if you can point me to a better reviewer, please do! 🙂

It's been rewritten to use React.createRef instead.
In addition, SelectDropdownItem has been rewritten as a functional
component.
@sgomes sgomes added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. [Type] Janitorial labels Jul 30, 2019
@sgomes sgomes requested review from retrofox, gwwar, jsnmoon and a team July 30, 2019 10:50
@matticbot
Copy link
Contributor

@matticbot
Copy link
Contributor

This PR does not affect the size of JS and CSS bundles shipped to the user's browser.

Generated by performance advisor bot at iscalypsofastyet.com.

@sgomes
Copy link
Contributor Author

sgomes commented Aug 2, 2019

Closing this PR in favour of @jsnajdr's much more comprehensive #35086.

@sgomes sgomes closed this Aug 2, 2019
@matticbot matticbot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Aug 2, 2019
@sgomes sgomes deleted the update/remove-string-refs-from-select-dropdown branch January 6, 2020 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants