Move create media library menu item link state to a method

Created on 13 January 2023, almost 2 years ago
Updated 31 January 2023, almost 2 years ago

Problem/Motivation

For some custom requirements we need to alter the link state for the media library menu items. To do so, we have created a decorator for "media_library.ui_builder" service and swapped out buildMediaTypeMenu method (as it contains the create of the link state).

For our requirements, we don't want to change the how the menu is build but to change the link state for the menu items.
It would be cleaner to do split the create of the link state in another method, so that, sites can override the link state method only.

Proposed resolution

Move the link state creation to new method.

Feature request
Status

Needs work

Version

10.0

Component
Media 

Last updated about 23 hours ago

Created by

🇧🇪Belgium msnassar

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

  • Needs change record

    A change record needs to be drafted before an issue is committed. Note: Change records used to be called change notifications.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇺🇸United States smustgrave

    This issue is being reviewed by the kind folks in Slack, #needs-review-queue-initiative. We are working to keep the size of Needs Review queue [2700+ issues] to around 400 (1 month or less), following Review a patch or merge request as a guide.

    createMediaTypeMenuItemLinkState
    1. should be typehinted

    2. Will need a test case to show this new feature in action.

    3. A change record to announce the change and how it can be overridden.

    Thanks!

Production build 0.71.5 2024