Skip to content

Files

Latest commit

 Cannot retrieve latest commit at this time.

History

History
30 lines (19 loc) · 1.16 KB

context-menus.md

File metadata and controls

30 lines (19 loc) · 1.16 KB
ContentId DateApproved MetaDescription
fdd5476c-13e2-4f78-9dd3-0157eed36a29
04/03/2025
UX guidelines for using context menus in a Visual Studio Code extension.

Context Menus

Menu items appear in views, actions, and right-click menus. It's important that the grouping of menus remain consistent. If your extension has actions that relate to files, place your actions in the File Explorer context menu (when appropriate). If an extension has actions for certain file types, only display it for those items.

✔️ Do

  • Show actions when contextually appropriate
  • Group similar actions together
  • Place large groups of actions into a submenu

❌ Don't

  • Show actions for every file without context

Context Menu

This example places a Copy GitHub Permalink next to the other copy commands. This action only appears on files that are from a GitHub repository.

Links