adobe / aem-brackets-extension

Brackets extension for Adobe Experience Manager (AEM) front-end developers with auto-sync and HTL support.
https://docs.adobe.com/content/docs/en/dev-tools/aem-brackets.html
Apache License 2.0
52 stars 22 forks source link

Align context menu creation with the Brackets Extension UI Guidelines #61

Closed raducotescu closed 9 years ago

raducotescu commented 9 years ago

The Brackets Extension UI Guidelines [0] states the following, regarding context menus:

Only show items that are relevant to the current context. Unlike application menus, you should generally show/hide items in the context menu rather than simply disabling them. However, if an item would ordinarily be applicable to the current context, but the specific selection doesn't allow it, then disable it rather than hiding it. For example, if you want to add an item to the context menu for a particular file type, but it only works for writable files and the file is read-only, then disable it rather than hiding it.

Therefore the behaviour of the AEM Brackets extension context menu should be the following:

  1. display it only for content projects (projects that have a jcr_root folder)
  2. toggle its state depending on the selection:
    1. enable it if the selected item can be synchronised directly
    2. disable it if the selected item is not in the jcr_root folder

[0] - https://github.com/adobe/brackets/wiki/Extension-UI-Guidelines#context-menus