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: add Substitutions menu roles on macOS #32024

Merged
merged 3 commits into from Jan 6, 2022

Conversation

mitchchn
Copy link
Contributor

@mitchchn mitchchn commented Nov 27, 2021

Description of Change

Chromium has supported macOS text substitutions for some time now. They already work in Electron, but there was no way to control them from the menubar like in native Mac apps.

This PR exposes the necessary menu roles, and also adds a default Edit > Substitutions menu on macOS.

Fixes #15535.

Checklist

Release Notes

Notes: Added Substitutions menu roles on macOS: showSubstitutions, toggleSmartQuotes, toggleSmartDashes, toggleTextReplacement.

@welcome
Copy link

welcome bot commented Nov 27, 2021

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

@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label Nov 27, 2021
@mitchchn mitchchn changed the title feat: add Substitutions menu rules on macOS feat: add Substitutions menu roles on macOS Nov 27, 2021
@electron-cation electron-cation bot removed the new-pr 🌱 PR opened in the last 24 hours label Dec 4, 2021
@zcbenz zcbenz added api-review/requested 🗳 no-backport semver/minor backwards-compatible functionality labels Jan 6, 2022
@zcbenz
Copy link
Member

zcbenz commented Jan 6, 2022

API LGTM

@miniak
Copy link
Contributor

miniak commented Jan 6, 2022

API LGTM

Copy link
Member

@codebytere codebytere left a comment

Choose a reason for hiding this comment

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

API LGTM

@nornagon nornagon merged commit 5af6b89 into electron:main Jan 6, 2022
@welcome
Copy link

welcome bot commented Jan 6, 2022

Congrats on merging your first pull request! 🎉🎉🎉

@release-clerk
Copy link

release-clerk bot commented Jan 6, 2022

Release Notes Persisted

Added Substitutions menu roles on macOS: showSubstitutions, toggleSmartQuotes, toggleSmartDashes, toggleTextReplacement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Text replacements / expansions doesn't work on MacOS
5 participants