Excluding Vertical Tabs for Media Entities

Created on 20 February 2025, 3 months ago

Problem/Motivation

When editing a media entity, specifically an image, the "advanced" vertical tabs are still displayed, even though they are unnecessary. This leads to a cluttered UI and can confuse users who do not need these settings for media entities.

Steps to reproduce

  1. Go to the media library in Drupal.
  2. Edit an existing image media entity.
  3. Observe that the "advanced" vertical tabs are present, even though they are not required.

Proposed resolution

Modify the gin_everywhere_form_alter() function to check if the entity type is media. If so, remove the advanced vertical tabs to provide a cleaner UI.

Remaining tasks

  • Verify that the change correctly removes the advanced vertical tabs for media entities.
  • Test other entity types to ensure they are unaffected.
  • Review the impact on form usability.

User interface changes

  • The "advanced" vertical tabs will no longer appear when editing media entities.

API changes

  • No API changes. This is purely a UI-level alteration.

Data model changes

  • No data model changes.
Feature request
Status

Needs review

Version

1.2

Component

Code

Created by

🇯🇴Jordan mohammad faqeh

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @mohammad faqeh
  • 🇩🇪Germany Hydra

    Hi @mohammad faqeh thx for your report!

    I see that issue but I don't think we should solve this specifically for media. It is theoretically possible to make some of those fields that belong to the advanced section visible with media and even more important I thin, is that this is actually happening on other entity forms as well (like path_alias for instance and possibly more).

    I am totally into fixing this, but I would prefer a solution which would fix that issue in general. Haven't had the possibility to think about a solution yet, I am not even sure this is possible, but before excluding media entities I would suggest trying it :)

    So thx again for pointing this out and starting the discussion :)

Production build 0.71.5 2024