Problem/Motivation

In media (iamge/video) block, when add/update block, block link field require link URL and link title.
The link title field is not used because the link will be a wrapper of the block.

Steps to reproduce

  • Add media (image/video) block from layout builder page.
  • In block modal there is a link field.
  • Hide title input in link field.

Proposed resolution

  • Hide input title in link field by a change for the link filed configs
  • Limit the link display only to the image media type
  • Hide the link field from the form and in the twig for all other media types based on the selected media type

Remaining tasks

  • ✅ File an issue about this project
  • ✅ Addition/Change/Update/Fix to this project
  • ✅ Testing to ensure no regression
  • ➖ Automated unit/functional testing coverage
  • ➖ Developer Documentation support on feature change/addition
  • ➖ User Guide Documentation support on feature change/addition
  • ✅ Accessibility and Readability
  • ✅ Code review from 1 Varbase core team member
  • ✅ Full testing and approval
  • ✅ Credit contributors
  • ✅ Review with the product owner
  • ✅ Update Release Notes and Update Helper on new feature change/addition
  • ✅ Release varbase-9.0.7, varbase_layout_builder-10.0.16

Varbase update type

  • ✅ No Update
  • ➖ Optional Update
  • ➖ Forced Update
  • ➖ Forced Update if Unchanged

User interface changes

Before the fix:
Before

After the fix:

On creating a new Varbase Media Block in the Varbase Layout Builder
On Creating new Varbase Media Block in the Varbase Layout Builder

When having media Image
When having media Image

When having a local video
When having a local video

When having a remote video
When having a remote video

When having an audio
When having an audio

When Having a local file like pdf or docs
When Having a local file like pdf or docs

having an update process only to hide the link title
Test updating Varbase media block link title

API changes

  • N/A

Data model changes

  • N/A

Release notes snippet

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

Abdullah Yassin created an issue. See original summary.

rajab natshah’s picture

This is a great capture issue

Thanks for reporting and the fix.

It is a basic config change

go to "/admin/structure/block/block-content/manage/varbase_media_block/fields"
and edit the link
you will find Allow link text
Disabled

rajab natshah’s picture

Limit the link display in twig only for the image media type
as it's not logical to have a link when the media type is not an image
both in the form and in the twig

rajab natshah’s picture

Issue summary: View changes

  • Rajab Natshah committed 3cc6072 on 10.0.x
    Issue #3284568: Hide media (image/video) field link title input
    

  • Rajab Natshah committed e6909ba on 10.1.x
    Issue #3284568: Hide media (image/video) field link title input
    

  • Rajab Natshah committed 4443c11 on 10.0.x
    Issue #3284568: Hide media (image/video) field link title input
    

  • Rajab Natshah committed b4397cb on 10.1.x
    Issue #3284568: Hide media (image/video) field link title input
    
rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

Assigned: Unassigned » mohammed j. razem
Issue summary: View changes
Issue tags: +varbase-9.0.7, +varbase_layout_builder-10.0.16
rajab natshah’s picture

Assigned: mohammed j. razem » Unassigned
rajab natshah’s picture

Status: Needs review » Fixed
rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

Issue summary: View changes

✅ Released varbase-9.0.7

rajab natshah’s picture

Status: Fixed » Closed (fixed)