Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

fix(menu): Updated menu to use list's custom event #4151

Merged
merged 31 commits into from
Jan 31, 2019

Conversation

abhiomkar
Copy link
Collaborator

@abhiomkar abhiomkar commented Dec 6, 2018

BREAKING CHANGE: Replaced menu's foundation methods handleClick and handleSelection with handleItemAction to handle list item action (i.e., list's custom event MDCList:action)

Other Changes:

  • Removed redundant handleKeyboard and preventDefault logic from menu which is already handled in list's foundation.

Fixes #3481

packages/mdc-menu/README.md Outdated Show resolved Hide resolved
@kfranqueiro
Copy link
Contributor

Wait until #4144 is merged, then merge this to master separately, so that both appear in the changelog.

Copy link
Contributor

@kfranqueiro kfranqueiro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found an issue with this. Activating a menu item with space now causes the page to scroll, because we're no longer calling preventDefault under any circumstance here (nor in List, aside from the single-selection case).

See also https://github.com/material-components/material-components-web/pull/4144/files#r245053405

@kfranqueiro
Copy link
Contributor

FYI, I think this branch will need to be synced with master and you'll need to test your updated fixture.js against other existing menu screenshot test pages. I think it might break on some of them (e.g. the group-selection test page).

See #4172

@acdvorak acdvorak self-assigned this Jan 25, 2019
Copy link
Contributor

@kfranqueiro kfranqueiro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this seems reasonable; once #4144 is finished and merged, switch this to base on master so CI will run.

@codecov-io
Copy link

codecov-io commented Jan 25, 2019

Codecov Report

❗ No coverage uploaded for pull request base (master@7ebb2c8). Click here to learn what that means.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff            @@
##             master   #4151   +/-   ##
========================================
  Coverage          ?   98.4%           
========================================
  Files             ?     127           
  Lines             ?    5688           
  Branches          ?     757           
========================================
  Hits              ?    5597           
  Misses            ?      91           
  Partials          ?       0
Impacted Files Coverage Δ
packages/mdc-menu/foundation.js 83.87% <100%> (ø)
packages/mdc-menu/index.js 100% <100%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7ebb2c8...ae0ac81. Read the comment docs.

@googlebot
Copy link

So there's good news and bad news.

👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there.

😕 The bad news is that it appears that one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that here in the pull request.

Note to project maintainer: This is a terminal state, meaning the cla/google commit status will not change from this state. It's up to you to confirm consent of all the commit author(s), set the cla label to yes (if enabled on your project), and then merge this pull request when appropriate.

@googlebot
Copy link

CLAs look good, thanks!

test/screenshot/spec/mdc-menu/fixture.js Outdated Show resolved Hide resolved
test/screenshot/spec/mdc-menu/classes/baseline.html Outdated Show resolved Hide resolved
Copy link
Contributor

@acdvorak acdvorak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one small nit, otherwise LGTM!

@mdc-web-bot
Copy link
Collaborator

@mdc-web-bot
Copy link
Collaborator

@abhiomkar abhiomkar merged commit a4e08f1 into master Jan 31, 2019
@abhiomkar abhiomkar deleted the list_custom_event_menu_update_issue3481 branch January 31, 2019 18:03
@jamesmfriedman jamesmfriedman mentioned this pull request Feb 5, 2019
24 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants