New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct app-command name corresponding to APPCOMMAND_MEDIA_PLAY_PAUSE #12408

Merged
merged 5 commits into from May 21, 2018

Conversation

Projects
None yet
4 participants
@htk3
Contributor

htk3 commented Mar 22, 2018

  • Operating system: Windows 10 Version 1709
  • Keyboard: Surface Pro 3 Type Cover, Elecom TK-GMFCM006, and Logicool K270

I tested this code:

win.on('app-command', (e, cmd) => {
  dialog.showMessageBox({message: `invoked app command: ${cmd}`})
})

When I pressed play/pause key in my keyboard, alerted invoked app command: media-play_pause, not media-play-pause.
I think, that command must be named media-play-pause. Because documentation of app-command event says "underscores are replaced with hyphens", and any command names excluding that are not including underscore.

This PR corrects media-play_pause to media-play-pause.

@htk3 htk3 requested a review from electron/reviewers as a code owner Mar 22, 2018

@MarshallOfSound

This is a breaking change, can we simply make it emit both for now and remove the _ in a major release

@ckerr

Agree with @MarshallOfSound about this being a breaking change, so to fix this:

  1. Add a special case in NativeWindowViews::ExecuteWindowsCommand() to use both on APPCOMMAND_MEDIA_PLAY_PAUSE
  2. Add a FIXME comment to remove the play_pause in 3.0
  3. Add a comment to docs/tutorial/planned-breaking-changes.md saying that media-play_pause will be removed in 3.0 and that media-play-pause should be used instead

@htk3 htk3 requested a review from electron/docs as a code owner Mar 22, 2018

@zcbenz

zcbenz approved these changes May 21, 2018

@htk3 htk3 requested review from electron/browserview as code owners May 21, 2018

@MarshallOfSound

This comment has been minimized.

Show comment
Hide comment
@MarshallOfSound

MarshallOfSound May 21, 2018

Member

This PR has broken or something 😆 250+ commits, can you retarget this 👍

Member

MarshallOfSound commented May 21, 2018

This PR has broken or something 😆 250+ commits, can you retarget this 👍

@zcbenz

zcbenz approved these changes May 21, 2018

@zcbenz zcbenz merged commit 7c2303c into electron:master May 21, 2018

10 checks passed

WIP ready for review
Details
ci/circleci: electron-linux-arm Your tests passed on CircleCI!
Details
ci/circleci: electron-linux-arm-test Your tests passed on CircleCI!
Details
ci/circleci: electron-linux-arm64 Your tests passed on CircleCI!
Details
ci/circleci: electron-linux-arm64-test Your tests passed on CircleCI!
Details
ci/circleci: electron-linux-ia32 Your tests passed on CircleCI!
Details
ci/circleci: electron-linux-x64 Your tests passed on CircleCI!
Details
ci/circleci: electron-mas-x64 Your tests passed on CircleCI!
Details
ci/circleci: electron-osx-x64 Your tests passed on CircleCI!
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details

@ckerr ckerr added the semver/major label May 21, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment