AlaskaAirlines / auro-menu

Custom element that provides a list of options for the user to choose from
https://auro.alaskaair.com/components/auro/menu
Apache License 2.0
2 stars 3 forks source link

fix(slots): pass noCheckmark attribute down on each slot change #170 #171

Closed jason-capsule42 closed 1 year ago

jason-capsule42 commented 1 year ago

Alaska Airlines Pull Request

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes: #170

Summary:

Please summarize the scope of the changes you have submitted, what the intent of the work is and anything that describes the before/after state of the project.

Type of change:

Please delete options that are not relevant.

Checklist:

By submitting this Pull Request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Pull Requests will be evaluated by their quality of update and whether it is consistent with the goals and values of this project. Any submission is to be considered a conversation between the submitter and the maintainers of this project and may require changes to your submission.

Thank you for your submission!
-- Auro Design System Team

blackfalcon commented 1 year ago

@jason-capsule42 how are you validating that this is working? I tried linking this to auro-combobox, but I am not seeing a way to validate that this is working. In combobox, the API example for the dynamic menu is not working either?

Screen Shot 2023-01-31 at 5 59 10 PM

jason-capsule42 commented 1 year ago

@blackfalcon I can look why the dynamic menu example is broken right now. It certainly was working when I tested so not sure what is wrong right now.

The main thing you are looking for here is that before this fix noCheckmark attribute was applied to the menu but was not passed down to all the menu options until you took an action that caused the JS to reassess the state of all menu options (hovered over it works because that recalculates which option is activeOption). The extra space that was visible was the space for the checkmark.

If you test the working dynamic menu against the main branch:

  1. Type into the input
  2. Inspect the auro-menuoptions that are populated into the menu. You will see that none of them have noCheckmark.
  3. Hover of the menu.
  4. Inspect the auro-menuoptions that are populated into the menu. You will see that they now have noCheckmark.

Repeat this test on my branch and you will see that noCheckmark is correctly applied as soon as the slot content changes rather than waiting for a manual interaction with the menu.

I'll look into the dynamic menu issue in the morning.

blackfalcon commented 1 year ago

:tada: This PR is included in version 3.9.5 :tada:

The release is available on:

Your semantic-release bot :package::rocket: