Project

General

Profile

Actions

Feature #102444

open

Show FlashMessages on Drag and Drop (DND) in TYPO3 page tree

Added by Josef Glatz 7 months ago. Updated 7 months ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Pagetree
Target version:
-
Start date:
2023-11-22
Due date:
% Done:

0%

Estimated time:
PHP Version:
Tags:
datahandler, backendux, ux, flashmessage, flashmessages, notification, notifications
Complexity:
Sprint Focus:

Description

Problem/Description

There are scenarios where you have to inform the backend editor via flash messages or notifications when you hook into the TYPO3 DataHandler where DataHandler is started by drag-n-drop (DnD) in the TYPO3 pagetee.

Some scenarios:

  • add a barrier prevent a action on pages which was started via DnD (drag and drop) in the TYPO3 pagetree
  • prevent copying/moving pages from one TYPO3 site to another TYPO3 site (e.g. due to #102345)
  • inform the backend editor about automatically changed values on moved/copied pages
  • ...

Example of creating a FlashMessage in a DataHandler hook:

// ... and show a flash message
$message = GeneralUtility::makeInstance(
    FlashMessage::class,
    LocalizationUtility::translate('LLL:EXT:theme/Resources/Private/Language/locallang_BackendGeneral.xlf:flashMessage.body.move_or_copy_denied'),
    LocalizationUtility::translate('LLL:EXT:theme/Resources/Private/Language/locallang_BackendGeneral.xlf:flashMessage.title.move_or_copy_denied'),
    AbstractMessage::WARNING,
    true
);
$flashMessageService = GeneralUtility::makeInstance(FlashMessageService::class);
$flashMessageService->getMessageQueueByIdentifier()
    ->addMessage($message);

ToDo(s)

Introduce a possibility like AJAX-Middlewares which are looking for "things" in the response like checking if there are flash messages in the queue which are then shown as e.g. notifications.

Acceptance Criteria

Creating flashMessages in DataHandler hooks would be a benefit for any scenario in improving the backend user experience

Actions #1

Updated by Josef Glatz 7 months ago

  • Description updated (diff)
Actions

Also available in: Atom PDF