Skip to content

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

Merged
codebytere merged 7 commits into
electron:masterfrom
SaswatB:master
Dec 5, 2018
Merged

codebytere merged 7 commits into
electron:masterfrom
SaswatB:master

Conversation

@SaswatB

@SaswatB SaswatB commented Oct 29, 2018 •

Copy link
Copy Markdown
Contributor

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

welcome Bot commented Oct 29, 2018

Copy link
Copy Markdown

💖 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

SaswatB commented Oct 29, 2018

Copy link
Copy Markdown
Contributor Author

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

@SaswatB

SaswatB commented Oct 29, 2018

Copy link
Copy Markdown
Contributor Author

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 MarshallOfSound left a comment

Copy link
Copy Markdown
Member

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

SaswatB commented Nov 2, 2018

Copy link
Copy Markdown
Contributor Author

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
Copy Markdown
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

@MarshallOfSound MarshallOfSound left a comment

Copy link
Copy Markdown
Member

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 👍

Comment thread atom/browser/native_window_views.cc Resolved
Comment thread atom/browser/native_window_views.cc 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
Copy Markdown

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

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

@MarshallOfSound MarshallOfSound left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looking good 👍

Comment thread docs/api/browser-window.md Resolved
@SaswatB

SaswatB commented Nov 5, 2018

Copy link
Copy Markdown
Contributor Author

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

@MarshallOfSound

Copy link
Copy Markdown
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

SaswatB commented Nov 10, 2018

Copy link
Copy Markdown
Contributor Author

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

release-clerk Bot commented Dec 5, 2018

Copy link
Copy Markdown

Release Notes Persisted

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

@welcome

welcome Bot commented Dec 5, 2018

Copy link
Copy Markdown

Congrats on merging your first pull request! 🎉🎉🎉

@sevenryze

Copy link
Copy Markdown

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

@gergelypolonkai

Copy link
Copy Markdown

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

@britalmeida

Copy link
Copy Markdown

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

8 participants