Skip to content

docs: Clarify that menus use non-native styles - #45033

Merged
codebytere merged 5 commits into
electron:mainfrom
lah7:patch-2
Nov 25, 2025
Merged

codebytere merged 5 commits into
electron:mainfrom
lah7:patch-2

Conversation

@lah7

@lah7 lah7 commented Dec 16, 2024 •

Copy link
Copy Markdown
Contributor

Description of Change

As confirmed in #42262 (comment), at this time, Electron won't be taking steps to restore native menus since the Chrome Refresh 2023 removed them upstream. Electron's docs still refers to them as "native", however, it would be more accurate to imply they are inherited from Chromium.

More so for Windows/Linux, where Chromium inherits colours for the menu, but not the padding, fonts or spacing. macOS seems to be the only one that's native with menus looking identical to any other macOS application (as observed in macOS 11).

This will help provide clarity to Electron applications that they shouldn't assume Electron's API for menus are truly "native" for their users, which allows them to take steps to cover UI and accessibility needs. For example, VS Code has a custom menu implementation, but also a related bug that's waiting for "upstream" (Electron):

Checklist

  • relevant documentation, tutorials, templates and examples are changed or added

Release Notes

Notes: none

@welcome

welcome Bot commented Dec 16, 2024

Copy link
Copy Markdown

💖 Thanks for opening this pull request! 💖

Semantic PR titles

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

Commit signing

This repo enforces commit signatures for all incoming PRs.
To sign your commits, see GitHub's documentation on Telling Git about your signing key.

PR tips

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.

@nikwen

nikwen commented Dec 16, 2024

Copy link
Copy Markdown
Member

Thanks for the PR! :)

I'm not particularly for or against documenting this (leaving this to others to decide). I've added a small inline comment on formatting.

@electron-cation electron-cation Bot removed the new-pr 🌱 PR opened recently label Dec 17, 2024
@Kilian
Kilian requested a review from a team February 17, 2025 13:11
@Kilian

Kilian commented Feb 17, 2025

Copy link
Copy Markdown
Member

I'm +1 on this change, they make the docs more useful.

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

Damn, I noticed my inline comment never got submitted!

Comment thread docs/api/menu.md Resolved

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

Sorry for the delay! Looks good to me except for one little grammar change.

Comment thread docs/api/menu.md Resolved
@nikwen
nikwen requested a review from erickzhao February 27, 2025 23:20

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

Thanks!

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

docs: lgtm

@electron-docs-reviewer electron-docs-reviewer Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Approving on behalf of the Electron Docs Team

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

@lah7 please correct lint failure:

docs/api/menu.md:13:1 MD009/no-trailing-spaces Trailing spaces [Expected: 0; Actual: 1]

@lah7 lah7 changed the title docs: Clarify menus use non-native styles docs: Clarify that menus use non-native styles Nov 1, 2025
@lah7
lah7 requested a review from codebytere November 1, 2025 18:54
@ckerr

ckerr commented Nov 25, 2025

Copy link
Copy Markdown
Member

@codebytere it looks like the latest test addresses the change request you made; could you do a re-review?

@codebytere
codebytere merged commit fdb7fc7 into electron:main Nov 25, 2025
@welcome

welcome Bot commented Nov 25, 2025

Copy link
Copy Markdown

Congrats on merging your first pull request! 🎉🎉🎉

@release-clerk

release-clerk Bot commented Nov 25, 2025

Copy link
Copy Markdown

No Release Notes

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.

8 participants