looker-open-source / components

Looker's UI Components, Design Infrastructure and more
https://components.looker.com
MIT License
62 stars 31 forks source link

fix(Menu): Nested menu parent item background and click #2879

Closed mdodgelooker closed 3 years ago

mdodgelooker commented 3 years ago

A couple fixes on a nested menu parent item:

  1. The nested menu opens on hover but a user could easily assume they need to click to open it. If they do this, it opens briefly when they hover then quickly closes when they click. I thought this was a regression but apparently we did this intentionally without thinking of this scenario.
  2. Awhile back the aria-selected prop was moved to ListItemContent but the associated background style was not.
github-actions[bot] commented 3 years ago

Coverage report

Total coverage

Status Category Percentage Covered / Total
🟒 Statements 94.84% 7301/7698
🟑 Branches 87.16% 4650/5335
🟒 Functions 93.63% 2102/2245
🟒 Lines 95.38% 7065/7407

Status of coverage: 🟒 - ok, 🟑 - slightly more than threshold, πŸ”΄ - under the threshold

Show files with reduced coverage πŸ”» ### Reduced coverage | Status | Filename | Statements | Branches | Functions | Lines | | :----: | :------------------------------------ | :--------- | :------- | :-------- | :---- | | 🟑 | components/src/Menu/useNestedMenu.tsx | 88.89% | 68.09% | 100% | 90% | > Status of coverage: 🟒 - ok, 🟑 - slightly more than threshold, πŸ”΄ - under the threshold

Report generated by πŸ§ͺjest coverage report action from 75c3301e6dbf74e60d120950cdd31cf4af267406

mdodgelooker commented 3 years ago

Oops, I messed up Tree with my aria-expanded fix. Stay tuned...

mdodgelooker commented 3 years ago

Ok sorry about that. I just re-did the aria-expanded style fix but this time without breaking lint or snapshots. πŸ™‚