The indentation.html.twig file have raw SVG file in code. We should move this file to images folder then include this file.

Why? So that we can use this icon on other places as well. If we have this icon in Images directory, we can use this icon on different places by just including the icon in twig or adding as background-image.

By the current scenario we need to duplicate the icon on different places.

Issue fork drupal-3337909

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

Gauravvv created an issue. See original summary.

gauravvvv’s picture

Title: Claro: Remove svg from menu-local-task.html.twig file » Claro: Remove svg from indentation.html.twig file
Issue summary: View changes
gauravvvv’s picture

Status: Active » Needs review
StatusFileSize
new2.37 KB

I have provided the patch for same, Please review

rinku jacob 13’s picture

StatusFileSize
new269.97 KB
new60.43 KB
new111.33 KB

Hi @Gauravvv, I have Reviewed the patch on drupal 10.1.x.The patch was successfully applied. Need RTBC+1

guru2023’s picture

Assigned: Unassigned » guru2023
guru2023’s picture

Assigned: guru2023 » Unassigned
Status: Needs review » Reviewed & tested by the community
StatusFileSize
new375.23 KB
new198.39 KB

Verified the patch #3 on Drupal version 10.1.x.
The patch works fine and I have added the before and after screenshot for reference.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 3: 3337909-3.patch, failed testing. View results

gauravvvv’s picture

Status: Needs work » Reviewed & tested by the community

Restoring status, unrelated failure.

bnjmnm’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs screenshots

This needs screenshots of use cases where indentation.html.twig is in use. Tabledrag, including situations where the tree lines are visible would work.

This does not (and never did) need screenshots of a patch applying or source code. The patches + testbot do that for us already.

gauravvvv’s picture

Status: Needs work » Needs review
StatusFileSize
new253.6 KB
new207.78 KB

I have added before/after patch screenshots. please review

smustgrave’s picture

Priority: Normal » Minor
Status: Needs review » Reviewed & tested by the community
Issue tags: +Needs Review Queue Initiative

Doesn't seem to cause any disruption.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 3: 3337909-3.patch, failed testing. View results

akshay kashyap’s picture

StatusFileSize
new119.01 KB
new128.91 KB
new105.19 KB

@Gauravvvv Thanks for the work. Applied patch #3 cleanly on Drupal version 10.1.x. Please see attached screenshot.

akshay kashyap’s picture

Status: Needs work » Needs review
smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Random failure.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 3: 3337909-3.patch, failed testing. View results

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.

gauravvvv’s picture

Status: Needs work » Reviewed & tested by the community
Issue tags: -Needs screenshots

Restoring status as random failure

catch’s picture

Status: Reviewed & tested by the community » Needs work

This needs a conversion to an MR now, shame it's been stuck on random test failures for so long.

Binoli Lalani made their first commit to this issue’s fork.

binoli lalani’s picture

Status: Needs work » Needs review

Hello,

I have converted the patch into MR. Please review.

Thank you!

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

restoring previous status

alexpott’s picture

Status: Reviewed & tested by the community » Needs review

I'm not sure about this change. I think the reason this is inlined is due to core/themes/claro/images/icons/002e9a/plus.svg core/themes/claro/images/icons/545560/plus.svg etc... existing. If you need to have a plus icon in Claro then, I think, you should be using those. The svg in indentation.html.twig is for a very specific use-case - hence the inlining.

However, maybe the Claro maintainers will think differently, will ping them. However, if I'm right then perhaps this issue should be about adding a comment to Claro's indentation.html.twig about why the svg is inlined.

bnjmnm’s picture

Status: Needs review » Postponed (maintainer needs more info)

@alexpott is correct, this is a very specialized use case. It defaults to being a blank square, and there are several hidden svgs that use tabbledrag specific functionality to become visible on mousedown to display lines that visually connect related drag items. (so very coupled to tabledrag JS)

Keeping it inline makes it easier to maintain and allows for improvements to the Tabledrag UI without having to worry about BC with other uses of the image. I don't think it is worth moving it to a separate image unless there are specific use cases to justify it. The reported use cases seem more hypothetical.

If there is something more specific that seems best addressed by un-inlining the SVG, comment or update the IS with it an reopen, but as reported this seems like something best left alone.

gauravvvv’s picture

Thank you @bnjmnm, for your response.

In the Stable theme, we're using space for indentation in core/themes/stable9/templates/admin/indentation.html.twig. We have different behaviors within the core themes. Can we make them similar for both? We can make changes to Claro or Stable.

Stable:
<div class="js-indentation indentation">&nbsp;</div>

bnjmnm’s picture

In the Stable theme, we're using space for indentation in core/themes/stable9/templates/admin/indentation.html.twig. We have different behaviors within the core themes. Can we make them similar for both? We can make changes to Claro or Stable.

This is unlikely

The Stable theme, as the name suggests, exists to provide a stable set of markup and styling that will not make any changes that could potentially result in regressions (sometimes referred to as the "stable fence"). Updating Stable to work like Claro would be counter to this.

Claro is arguably a better implementation and would not want to roll it back to a pre-2019 implementation for the sake of making the approach similar in two themes - particularly since Stable's purpose is to provide a minimal frozen-in-amber theme intended for use as a base theme, while Claro is built to be an admin theme that accommodates innovations across updates.

Simlar to my stance in #25, if there's a non-theoretical real-world use case that this might address, making the change is a conversation worth having. If the desire is to have consistent approaches across themes without that real-world use case, it would not get FEFM signoff from me.

alexpott’s picture

f the desire is to have consistent approaches across themes without that real-world use case, it would not get FEFM signoff from me.

+1

Themes can have different approaches to CSS / HTML and design - that's kinda the point.

smustgrave’s picture

Should this be closed out?

smustgrave’s picture

Status: Postponed (maintainer needs more info) » Closed (won't fix)

Going to close out.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.