Review 12.4 Merged

81815[BUGFIX] Allow creating bookmark after it was removed

Christian Kuhn CR +2 V +2 Normal +60 −8 updated 11/21/23, 11:40

Commit message

This commit addresses 2 bugs in BE bookmarks management:

- After adding and removing a page from bookmarks, it couldn't be
  re-added without reloading the page.

- If a page was bookmarked, the bookmark button wasn't marked as
  inactive/disabled during BE content rendering.

Given the current implementation challenges, like the inability to
reload the shortcuts dropdown view and difficulty in modifying
backend button classes, most of the handling was delegated to the FE.

- BE always returns the shortcut button with necessary data attributes
  for frontend dispatch actions. BE only sets (or omits) the
  `data-dispatch-disabled` and `disabled` attributes.

- For every bookmarked entry, the BE also provides its `route` and
  `args`.

- Upon FE bookmark removal, the BE response includes the `route` and
  `args`. The FE uses these to match the shortcut button's data
  attributes and, if they match, enables the button.

This change is effective for both the shortcuts dropdown and the
standalone bookmark button.

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
  • Verified V +2 Done
    • Christian Kuhn +2
    • core-ci +1 CI

Issues 1

Files 4

Review log 34

  1. Christian Kuhn uploaded patch set 1 11/21/23, 11:32

  2. core-ci voted on patch set 1 V +1 11/21/23, 11:37 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/49213

  3. Christian Kuhn voted on patch set 1 V +2 CR +2 11/21/23, 11:40

  4. Christian Kuhn merged patch set 2 11/21/23, 11:40