Refactor MenuDropdown and replace sui.DropdownMenu in settings and docs #10726
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
this refactors the react-common MenuDropdown quite a bit and replaces the sui.DropdownMenu in the (?) and cog wheel icons in the top bar.
noticeable changes include:
<ul role="menu">
<li role="none"><ul role="group">
<a role="menuitem">
<li role="menuitemcheckbox">
<li role="menuitem">
i referred heavily to the w3c navigation menubar and editor menubar examples to make sure i was matching their behavior/structure
this change also involved a lot of tweaks to the
FocusTrap
component, some of which make theFocusList
component obsolete. after this is merged i think i'll renameFocusTrap
toFocusManager
(or something like that), get rid ofFocusList
and clean up some of the options to make them easier to understandsince this PR is pretty big, we might not want to take it for this release because we're so late in the current release cycle. that being said, we might be able to hotfix it later
here is an upload target: https://makecode.microbit.org/app/b593582fb02e4fb5b20cb4afd83ec59549642d1b-9835ad0d78
@microbit-matt-hillsdon FYI