Skip to content

fix: correct submenu ordering and icon placement on android#176

Open
AshleyField wants to merge 1 commit into
mpiannucci:mainfrom
AshleyField:fix/menu-order-and-icon-position
Open

fix: correct submenu ordering and icon placement on android#176
AshleyField wants to merge 1 commit into
mpiannucci:mainfrom
AshleyField:fix/menu-order-and-icon-position

Conversation

@AshleyField

Copy link
Copy Markdown
Contributor

What's broken

On Android parent items with a submenu we're causing two layout problems:

  1. Item order is not respected when an item contains a submenu (submenu parents get bumped to the top of the list).
  2. Icons are shifted onto the wrong list items

What this fix does

  1. Respect menu order, specifically when submenus are passed - submenu parents were being collected/rendered in a separate pass and prepended
  2. Remove index on submenu parent icon placement to prevent the icon being placed on the incorrect menu item - The icon was keyed by list index, which drifted when submenu parents were reordered

Screenshots

On the before, the 'Transparent' item should have a trash icon and the 'More Actions' item should have a circle icon. However the icon has been bumped off the 'Transparent' menu item and replaced by the 'More Actions' icon.

Also on before, all menu items that contain a submenu have been bumped to the top of the list, rather than respecting the order they've been added to the list.

Before After
Screenshot_1781832573 Screenshot_1781832386

@AshleyField

Copy link
Copy Markdown
Contributor Author

@mpiannucci any chance of getting a review on this? Thanks so much 😄

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.

1 participant