[MGNLUI-5531] Implement configurable action shortcuts for grids Created: 27/Nov/19  Updated: 12/Jan/23  Resolved: 12/Jan/23

Status: Closed
Project: Magnolia UI
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Neutral
Reporter: Šimon Demočko Assignee: Šimon Demočko
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Relates
relates to MGNLUI-5921 Refactor interwoven Action-related cl... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Epic Link: Keyboard shortcuts

 Description   

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

Generated at Mon Feb 12 09:27:30 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.