Skip to content
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

feat: implement 'app-command' events for browser history navigation keys on Linux #15441

Merged
merged 7 commits into from Dec 5, 2018

Conversation

Projects
None yet
8 participants
@SaswatB
Copy link
Contributor

commented Oct 29, 2018

Description of Change

Implemented the browser-backward and browser-forward app-command events on Linux.

For issue #6996.

Checklist

  • PR description included and stakeholders cc'd
  • npm test passes
  • tests are changed or added
  • relevant documentation is changed or added
  • PR title follows semantic commit guidelines

Release Notes

Notes: The browser-backward and browser-forward app-command events events available in BrowserWindow now work on Linux

@SaswatB SaswatB requested review from as code owners Oct 29, 2018

@welcome

This comment has been minimized.

Copy link

commented Oct 29, 2018

💖 Thanks for opening this pull request! 💖

We use semantic commit messages to streamline the release process. Before your pull request can be merged, you should update your pull request title to start with a semantic prefix.

Examples of commit messages with semantic prefixes:

  • fix: don't overwrite prevent_default if default wasn't prevented
  • feat: add app.isPackaged() method
  • docs: app.isDefaultProtocolClient is now available on Linux

Things that will help get your PR across the finish line:

  • Follow the JavaScript, C++, and Python coding style.
  • Run npm run lint locally to catch formatting errors earlier.
  • Document any user-facing changes you've made following the documentation styleguide.
  • Include tests when adding/changing behavior.
  • Include screenshots and animated GIFs whenever possible.

We get a lot of pull requests on this repo, so please be patient and we will get back to you as soon as we can.

@SaswatB

This comment has been minimized.

Copy link
Contributor Author

commented Oct 29, 2018

Apologies if this isn't the correct way to cc someone, but could you take a look @codebytere?

@SaswatB

This comment has been minimized.

Copy link
Contributor Author

commented Oct 29, 2018

Also I was unable to test these changes on Mac or Windows, I can remove the second commit if that is an issue and no one else can test.

@MarshallOfSound
Copy link
Member

left a comment

Can these be collapsed into the app-command event that already supports these events on Windows.

Refs: https://electronjs.org/docs/api/browser-window#event-app-command-windows

E.g. browser-backward and browser-forward

@SaswatB

This comment has been minimized.

Copy link
Contributor Author

commented Nov 2, 2018

app-command is a Windows only feature, so I didn't know whether it'd be appropriate to have some events returned by that be explicitly supported on all platforms vs a new history-action event that is guaranteed to work everywhere for all events implemented.

@MarshallOfSound

This comment has been minimized.

Copy link
Member

commented Nov 2, 2018

@SaswatB Adding new platform support for those events is semver/minor, the same as adding this new event. I'd prefer to keep API surface area down and minimize the amount of API duplication

@SaswatB SaswatB changed the title feat: add 'history-action' event for browser history navigation keys feat: implement 'app-command' events for browser history navigation keys on Linux and macOS Nov 2, 2018

@MarshallOfSound
Copy link
Member

left a comment

Looking good, just a code style comment 👍

Show resolved Hide resolved atom/browser/native_window_views.cc Outdated

@SaswatB SaswatB changed the title feat: implement 'app-command' events for browser history navigation keys on Linux and macOS feat: implement 'app-command' events for browser history navigation keys on Linux Nov 4, 2018

@sevenryze

This comment has been minimized.

Copy link

commented Nov 5, 2018

very appreciate you guys if this pr could be merged soon. 👍

@MarshallOfSound
Copy link
Member

left a comment

Looking good 👍

Show resolved Hide resolved docs/api/browser-window.md Outdated
@SaswatB

This comment has been minimized.

Copy link
Contributor Author

commented Nov 5, 2018

Would it be possible to backport these changes to versions 3 and 2? What would be the process for such?

@MarshallOfSound

This comment has been minimized.

Copy link
Member

commented Nov 5, 2018

Would it be possible to backport these changes to versions 3 and 2? What would be the process for such?

@SaswatB This change is semver/minor (it adds a feature) and as such according to semver it can't be backported to the existing 2.0.x and 3.0.x streams

@SaswatB

This comment has been minimized.

Copy link
Contributor Author

commented Nov 10, 2018

Is there anything blocking this from being merged?

@zcbenz zcbenz force-pushed the SaswatB:master branch 2 times, most recently from 402d2f6 to de18af1 Dec 5, 2018

@zcbenz zcbenz force-pushed the SaswatB:master branch from de18af1 to c57fb9d Dec 5, 2018

@zcbenz

zcbenz approved these changes Dec 5, 2018

@codebytere codebytere merged commit d243a45 into electron:master Dec 5, 2018

22 of 23 checks passed

Artifact Comparison Changes Detected
Details
Absolute Zero
Semantic Pull Request ready to be squashed
Details
WIP ready for review
Details
appveyor: win-ia32-testing-pr AppVeyor build succeeded
Details
appveyor: win-x64-testing-pr AppVeyor build succeeded
Details
ci/circleci: linux-arm-debug Your tests passed on CircleCI!
Details
ci/circleci: linux-arm-testing Your tests passed on CircleCI!
Details
ci/circleci: linux-arm64-debug Your tests passed on CircleCI!
Details
ci/circleci: linux-arm64-testing Your tests passed on CircleCI!
Details
ci/circleci: linux-checkout Your tests passed on CircleCI!
Details
ci/circleci: linux-ia32-debug Your tests passed on CircleCI!
Details
ci/circleci: linux-ia32-testing Your tests passed on CircleCI!
Details
ci/circleci: linux-ia32-testing-tests Your tests passed on CircleCI!
Details
ci/circleci: linux-x64-debug Your tests passed on CircleCI!
Details
ci/circleci: linux-x64-testing Your tests passed on CircleCI!
Details
ci/circleci: linux-x64-testing-tests Your tests passed on CircleCI!
Details
ci/circleci: mas-testing Your tests passed on CircleCI!
Details
ci/circleci: mas-testing-tests Your tests passed on CircleCI!
Details
ci/circleci: osx-testing Your tests passed on CircleCI!
Details
ci/circleci: osx-testing-tests Your tests passed on CircleCI!
Details
electron-lint Build #20181205.17 succeeded
Details
release-notes Release notes found
@release-clerk

This comment has been minimized.

Copy link

commented Dec 5, 2018

Release Notes Persisted

The browser-backward and browser-forward app-command events events available in BrowserWindow now work on Linux

@welcome

This comment has been minimized.

Copy link

commented Dec 5, 2018

Congrats on merging your first pull request! 🎉🎉🎉

@sevenryze

This comment has been minimized.

Copy link

commented Dec 30, 2018

Could you please tell me which version of electron this feature will be merged into?

@gergelypolonkai

This comment has been minimized.

Copy link

commented Jan 27, 2019

@sevenryze it seems it’s in electron 3.something already.

@britalmeida

This comment has been minimized.

Copy link

commented Apr 19, 2019

@SaswatB Thank you so much for addressing this issue!
@MarshallOfSound as for the backporting, I would say that this isn't a feature, but a much needed bug fix for "back and forward navigation mouse buttons don't work on Linux".
This issue has affected several electron apps for quite a long time, so it would be nice to get the fix backported or we'd be relying on apps updating their electron version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.