Uploaded image for project: 'Magnolia UI'
  1. Magnolia UI
  2. MGNLUI-5531

Implement configurable action shortcuts for grids

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Won't Do
    • Icon: Neutral Neutral
    • None
    • None
    • None
    • None

      Following grid table in https://wiki.magnolia-cms.com/display/UX/M6+Keyboard+navigation this issue should implement support for:

      • n - new item
      • m - move action
      • CTRL + C, X, V, D (copy, cut?, paste, duplicate) — these will first need to be discussed with Anja and specified in the above mentioned doc.

       


      Development notes:

      • Noop exists in info.magnolia.ui.api.action.ActionExecutor that should ideally replace introduced info.magnolia.ui.contentapp.browser.actions.ShortcutActionsExecutor.Noop
        • However info.magnolia.ui.contentapp.browser.ActionExecutionService is main user — loses access to the Noop.
        • Which is then used in ActionbarPresenter to execute actions (undesirable)
      • info.magnolia.ui.dialog.ActionExecution could be reused and adapted
        • Resides in dialog package, would be used however in more contexts (browser) 
        • would need to handle more than one item.
      • Emulate generic way of applying shortcut listeners to all actions that have a shortcut like Sasha did it for dialogs (see below) instead of having an interface method per action as is done now with delete and default action in info.magnolia.ui.actionbar.definition.ActionbarDefinition
      ContentDetailSubApp
      
        Map<Integer, Runnable> shortcuts = actionExecutions.stream().filter(execution -> execution.getDefinition().getShortcut() > 0) .collect(toMap(execution -> execution.getDefinition().getShortcut(), actionExecution -> (Runnable) actionExecution::execute));
      
      • rewrite e, m, delete shortcuts to use this approach instead of ActionbarPresenter

        Acceptance criteria

              sdemocko Šimon Demočko
              sdemocko Šimon Demočko
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Task DoD