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

Rename contextMenus -> menus #367

Closed
wants to merge 3 commits into from
Closed

Rename contextMenus -> menus #367

wants to merge 3 commits into from

Conversation

wbamberg
Copy link
Collaborator

@wbamberg wbamberg commented Sep 8, 2017

Bug 1333403 introduced browser.menus as a replacement for browser.contextMenus, keeping contextMenus as an alias but recommending menus as the preferred form.

Chrome, Opera, and Edge only support contextMenus at this time. So, I've tried to handle this by:

  • renaming the contextMenus node in the data to menus
  • adding alternative_name for Chrome, Opera, and Edge, indicating that these APIs are available under contextMenus for those browsers
  • adding a note for the Firefox data, indicating that that these APIs are also available under contextMenus for Firefox.

I also need to move menus to keep things alphabetical. But that makes the diff really hard to read. So I'v made the change in 2 commits:

  • this commit: 73c00b3 is the one that actually changes the data, but doesn't move menus, so should be readable

  • this commit: eb1b584 only moves menus, and doesn't change the data at all.

@wbamberg
Copy link
Collaborator Author

wbamberg commented Sep 8, 2017

Sorry about the commit messages. They were supposed to be things like "Rename `contextMenus`" but I guess git commit -m swallows backticks :(.

@Elchi3 Elchi3 added the data:webext 🎲 Compat data for Browser Extensions. https://developer.mozilla.org/Add-ons/WebExtensions label Sep 10, 2017
@Rob--W
Copy link
Member

Rob--W commented Sep 10, 2017

but I guess git commit -m swallows backticks :(.

No, the shell swallows backticks (and executes whatever is in between as code!).

You can either use git commit and then write the commit message in an editor, or use single quotes instead of double quotes:

git commit -m 'Rename `contextMenus`'

Or, if you really want to use double quotes, put slashes before the backtick:

git commit -m "Rename \`contextMenus\`"

Now you've made the commits, it is possible to use interactive rebase with git rebase -i HEAD^^ and then use reword to change the commit message.

@Elchi3
Copy link
Member

Elchi3 commented Sep 14, 2017

Thanks for splitting this change in 2 commits. Really helpful for reviewing! I'm sorry for my slowness in getting to this.

I think instead of the notes for Firefox, I would have put the information like this:

"firefox": [
  {
    "version_added": "55"
  },
  {
    "alternative_name": "contextMenus.ACTION_MENU_TOP_LEVEL_LIMIT",
    "version_added": "48"
  }
],

The menu API namespace isn't actually usable before 55 and we need that information displayed, right?

@wbamberg wbamberg mentioned this pull request Sep 14, 2017
@wbamberg
Copy link
Collaborator Author

Let's try this again: #378.

@wbamberg wbamberg closed this Sep 14, 2017
@Elchi3 Elchi3 deleted the rename-contextMenus branch September 14, 2017 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data:webext 🎲 Compat data for Browser Extensions. https://developer.mozilla.org/Add-ons/WebExtensions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants