sapling/addons
Evan Krause 1ec4945eaf Add context menu
Summary:
Add a library to open custom context menus, rendered in HTML. This allows us to customize options when right clicking on diffs or commits, which lets us expose new options

The API is to call one hook, and pass that to `onContextMenu`. I think it's pretty easy to use and should be powerful enough to provide onClick callbacks with recoil and to generate the list of menu items using recoil.

I have a few small nice features, like a divider option, and a little animation + fade out when selecting an item. It also dismisses the context menu if you click outside, or press escape.

I don't yet support accessibility use cases unfortunately. Ideally when you right click, it lets you press tab or up/down arrow to select different options and press enter to confirm. We should add support for this soon.

Adding context menus will let us add a lot of smaller misc features, which can be an easy way for new folks to add features to ISL. Some examples include copying commit hash, hiding a commit, etc.

Reviewed By: bolinfest

Differential Revision: D42492674

fbshipit-source-id: 7c0bae5411c0bbc474109857c2e3d80d5ee1ce9d
2023-01-13 09:14:31 -08:00
..
.vscode Re-sync with internal repository 2022-11-15 00:48:09 -08:00
eslint-rules Re-sync with internal repository 2022-11-15 00:48:09 -08:00
isl Add context menu 2023-01-13 09:14:31 -08:00
isl-server Add server-side support to delete files from the file system 2023-01-12 16:40:50 -08:00
reviewstack reviewstack: fix parsing logic to hide stack info from PR body 2022-12-21 21:32:14 -08:00
reviewstack.dev reviewstack: include the screencast on the home page 2022-12-20 12:36:37 -08:00
shared Add context menu 2023-01-13 09:14:31 -08:00
textmate upgrade prettier to 2.7.1 2022-11-15 19:56:38 -08:00
vscode Platform API for copying to clipboard 2023-01-12 16:40:50 -08:00
.eslintrc.js Re-sync with internal repository 2022-11-15 00:48:09 -08:00
.gitignore internal build script 2022-11-22 11:57:15 -08:00
.prettierignore Re-sync with internal repository 2022-11-15 00:48:09 -08:00
.prettierrc Re-sync with internal repository 2022-11-15 00:48:09 -08:00
LICENSE Re-sync with internal repository 2022-11-15 00:48:09 -08:00
package.json upgrade prettier to 2.7.1 2022-11-15 19:56:38 -08:00
verify-addons-folder.py Re-sync with internal repository 2022-11-15 00:48:09 -08:00
yarn.lock more dependency updates based on yarn audit 2022-12-05 22:43:02 -08:00