Problem/Motivation

Claro: Move svg image from templates to images folder.

drupal/core/themes/claro/templates/admin/indentation.html.twig from this file

<svg
    xmlns="http://www.w3.org/2000/svg"
    class="tree"
    width="25"
    height="25"
    viewBox="0 0 25 25">
    <path
      class="tree__item tree__item-child-ltr tree__item-child-last-ltr tree__item-horizontal tree__item-horizontal-right"
      d="M12,12.5 H25"
      stroke="#888"/>
    <path
      class="tree__item tree__item-child-rtl tree__item-child-last-rtl tree__item-horizontal tree__horizontal-left"
      d="M0,12.5 H13"
      stroke="#888"/>
    <path
      class="tree__item tree__item-child-ltr tree__item-child-rtl tree__item-child-last-ltr tree__item-child-last-rtl tree__vertical tree__vertical-top"
      d="M12.5,12 v-99"
      stroke="#888"/>
    <path
      class="tree__item tree__item-child-ltr tree__item-child-rtl tree__vertical tree__vertical-bottom"
      d="M12.5,12 v99"
      stroke="#888"/>
  </svg>

Steps to reproduce

1. example : Go to admin/structure/menu/manage/admin
2. Check below menu link Here you can see parent and child link.
3. You can see space before the child menu. If you inspect you can see the svg tag.

Proposed resolution

Remove the svg tag code from the drupal/core/themes/claro/templates/admin/indentation.html.twig file and create a new svg file in the images folder.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Issue fork drupal-3226309

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

Gauravmahlawat created an issue. See original summary.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

sanket.tale made their first commit to this issue’s fork.

sanket.tale’s picture

Issue summary: View changes
Status: Active » Needs review
StatusFileSize
new51.52 KB
new51.7 KB

Created MR for the issue please review it.

Steps to reproduce

  • example : Go to admin/structure/menu/manage/admin
  • Check below menu link Here you can see parent and child link.
  • You can see the space before the child menu. If you inspect before the MR you can see the svg tag and after the MR you can see the ::before pseudo element.

Before :-

After :-

sanket.tale’s picture

Issue summary: View changes
smustgrave’s picture

Status: Needs review » Needs work
Issue tags: +Needs issue summary update, +Needs subsystem maintainer review

Issue summary should follow standard template.

Also may need submaintainer sign off

sanket.tale’s picture

Title: Claro: Move svg image from templates to images folder » Claro: Move svg image from template to images folder.
Issue summary: View changes
sanket.tale’s picture

Status: Needs work » Needs review
bhumikavarshney’s picture

StatusFileSize
new108.89 KB

The issue mentioned that svg image code drupal/core/themes/claro/templates/admin/indentation.html.twig added in this template need to be moved to image folder.

But this merge request https://git.drupalcode.org/project/drupal/-/merge_requests/8672/diffs?co... added the same svg by pseudo element.

So need more information do we need to include svg from img tag by using the image source in the url.

As you can refer the
Proposed resolution
Remove the svg tag code from the drupal/core/themes/claro/templates/admin/indentation.html.twig file and create a new svg file in the images folder.

ahsannazir’s picture

StatusFileSize
new70.08 KB

The SVG code has been removed from twig file and SVG has been moved to images/src folder.

kanchan bhogade’s picture

StatusFileSize
new80.59 KB
new83.73 KB

Hi
I've tested MR 8672 on Drupal 11.x
MR is applied cleanly...

Test Result:
The SVG code has been removed from the twig file.

Attaching SS for reference

needs-review-queue-bot’s picture

Status: Needs review » Needs work
StatusFileSize
new2.34 MB

The Needs Review Queue Bot tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".

This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.

Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

sanket.tale’s picture

Status: Needs work » Needs review
sagarmohite0031’s picture

Assigned: Unassigned » sagarmohite0031
StatusFileSize
new179.79 KB
new141.41 KB

I have tried to apply MR !8672 but MR is failing.

Please check Error screenshot.

shweta__sharma’s picture

StatusFileSize
new1.57 MB

I have applied MR 8672, but when I try to apply it locally, I receive an error. Attached a screenshot.

shweta__sharma’s picture

Status: Needs review » Needs work
sanket.tale’s picture

Status: Needs work » Needs review
sanket.tale’s picture

Status: Needs review » Needs work
sanket.tale’s picture

Status: Needs work » Needs review
smustgrave’s picture

Assigned: sagarmohite0031 » Unassigned
smustgrave’s picture

bnjmnm’s picture

Status: Needs review » Closed (works as designed)
StatusFileSize
new21.54 KB
new32.36 KB

This is intentionally added as an SVG document so it can receive CSS styling. This is responsible for the lines that show the relationship between tabledrag items that are seen while dragging. It functions as dynamic element in the UI, not just a background image.

Without the css to conditionally hide/show portions of the SVG this either results in losing the lines altogether or having ALL the lines visible at all times we don't want this 👇 (nor do we want those lines to be removed entirely)