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

SaswatB
Copy link
Contributor

@SaswatB SaswatB 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 a team October 29, 2018 05:47
@welcome
Copy link

welcome bot 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
Copy link
Contributor Author

SaswatB commented Oct 29, 2018

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

@SaswatB
Copy link
Contributor Author

SaswatB 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.

Copy link
Member

@MarshallOfSound MarshallOfSound left a comment

Choose a reason for hiding this comment

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

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
Copy link
Contributor Author

SaswatB 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
Copy link
Member

@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
Copy link
Member

@MarshallOfSound MarshallOfSound left a comment

Choose a reason for hiding this comment

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

Looking good, just a code style comment 👍

atom/browser/native_window_views.cc Outdated Show resolved Hide resolved
@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
Copy link

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

@MarshallOfSound MarshallOfSound added the semver/minor backwards-compatible functionality label Nov 5, 2018
Copy link
Member

@MarshallOfSound MarshallOfSound left a comment

Choose a reason for hiding this comment

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

Looking good 👍

@SaswatB
Copy link
Contributor Author

SaswatB 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
Copy link
Member

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
Copy link
Contributor Author

SaswatB commented Nov 10, 2018

Is there anything blocking this from being merged?

@zcbenz zcbenz force-pushed the master branch 2 times, most recently from 402d2f6 to de18af1 Compare December 5, 2018 10:51
@codebytere codebytere merged commit d243a45 into electron:master Dec 5, 2018
@release-clerk
Copy link

release-clerk bot 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
Copy link

welcome bot commented Dec 5, 2018

Congrats on merging your first pull request! 🎉🎉🎉

@sevenryze
Copy link

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

@gergelypolonkai
Copy link

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

@britalmeida
Copy link

@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
Labels
semver/minor backwards-compatible functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants