Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

Specifications

Secondary menus

http://wiki.magnolia-cms.com/display/DEV/Concept+-+Action+availability+and+access+control

 

What is the definition for an Action Popup?

Overview

An ActionPopup is similar to an Actionbar in that it is a vertical list of actions with the same appearance.
An ActionPopup is used in the following cases:

  • Right click on a an item in a tree, list, thumbnail view.
    • Here the actions will be a limited subset of the actions in the Actionbar for the browser subapp. (Usually less then 5)
  • Click on a "more actions" button - a little icon that shows up in the FileUploadField for example.
    • Here the actions are not

Consider that in the case of a browser view - the actionpopup needs to be defined to handle what kind of item is clicked on - nodeType, is it a property, etc.

Options

 IdeaProsCons 
ActionPopup definitionSimilar to the Actionbar definition.
  • You only have to work in one place.
  • You only have to look in once place and you know the definition. 
  • Easily get out of sync with the actionbar.
    • Order of items
    • Which items are in, which are out.
  • A pain to manage two configurations.
 
Extend Actionbar definitionAn ActionPopup definition that extends the Actionbar definition instead of totally redefining it.
  • Stays in sync with actionbar

  • Must implement a way to remove an item from a definition.
  • Need to look in 2 places to understand what is in ActionPopup.
  • Still a pain to create and manage two configurations.
 
Action definitionAn additional flag in each action that marks that it should show up in the popup
  • ActionbarItemDefinition gets: isCommon, isInPopup, includeInContextMenu
  • Stays in sync with actionbar
  • Simple implementation.
  • Simple configuration (just one tree)
  • Need to look in all the action definitions to understand what is in ActionPopup.
 
Something else??    

 

How to display it in the UI?

Can we leverage existing code?

Generic menu

Could we extract a generic menu out of the actionbar that could be used in actionbar and in actionpopup? (section)

What about in cases where we need the popup - but there is no regular actionbar?

Where is the right place to instantiate the ActionPopup

 

Probably define an actionbar for this case.

Parts

  • Invokation
    • Right click on workbench row invokes ActionPopup:
      • BrowserSubApp.registerSubAppEventsHandlers()
    • Click on a button in FileUploadField can invoke ActionPopup - probably needs to point to which one it wants.
    • Shell has a method - or UIContext, so you can get it from anywhere? openActionPopup("name") (could take the name of an actionpopup or of an actionbar)
  • UI


    • ActionPopup should float above all UI.

    • ActionPopup should be positioned at mouse (and fully onscreen)

    • It should go away if


      • Click on menu Item

      • or click mouse (It could display a modal curtain while it is open)

      • or timeout

      • or switch apps, or subapps, or open an Overlay, or open a shellapp,

      • Does Vaadin have concept of foccused item - could this help us know when the popup should close?

  • Generalize UI menu


    • Actionbar becomes ActionMenu

    • Css must get tuned.

    • Actionbar uses ActionMenu

    • Actionpopup uses ActionMenu

    • ActionPopup takes an ActionMenu definition

    • can be build from configuration

    • can be construct manually.

Right Clicking

 

  • TreeViewImpl.addItemClickListener > presenterOnRightClick()
  • TreeViewImpl.presenterOnRightClick() >
  • ContentPresenter.onRightClick() > fires ItemRightClickedEvent() on SubAppEventBus.
  • BrowserSubApp

 


  • No labels