Problem/Motivation

THEN: See #2489460: [Meta] Move module.theme.css files to Classy or Seven

NOW: Changes to Classy are protected by strict backwards-compatibility requirements, so we'd rather move user.icons.admin.css (user.icons.theme.css was renamed to that in #2566771: [Voltron patch] Move all remaining *.theme.css to Classy, as we discovered in #75) from the core User module to Seven.

Remaining tasks

Move user.icons.admin.css, and its library, from the User module to Seven.
Add the library in the seven twig template (?)

User interface changes

None for Seven, but Stark will be more stark.

API changes

None.

Data model changes

CommentFileSizeAuthor
#94 2566831--after--patch--pic.png163.84 KBvikashsoni
#94 2566831--before--patch--pic.png149.61 KBvikashsoni
#90 Drupal9.1.png275.62 KBdjsagar
#90 Drupal9.2.png283.32 KBdjsagar
#88 move_user_icons_theme-2566831-88.patch2.58 KBbandanasharma
#79 move_user_icons_theme-2566831-79.patch1.5 KBedysmp
#73 move_user_icons_theme-2566831-73.patch1.48 KBstarshaped
#69 interdiff-2566831-61-69.txt1.23 KBhog
#69 move_user_icons_theme-2566831-69.patch1.07 KBhog
#67 interdiff-2566831-43-67.txt3.34 KBhog
#67 move_user_icons_theme-2566831-67.patch3.2 KBhog
#65 interdiff-2566831-43-65.txt3.34 KBhog
#65 move_user_icons_theme-2566831-65.patch91.99 KBhog
#61 interdiff-2566831-57-61.txt378 bytespguillard
#61 remove-user-icon-2566831-61.patch1.07 KBpguillard
#57 remove-user-icon-2566831-57.patch626 bytesimshivani
#55 move_user_icons_theme-2566831-43.patch3.2 KBdeepakkumar14
#52 move_user_icons_theme-2566831-42.patch3.2 KBdeepakkumar14
#42 wrong_path.png21.44 KBjoginderpc
#41 move_user_icons_theme-2566831-41.patch1.99 KBhog
#41 interdiff-move_user_icons_theme-2566831-41.txt2.16 KBhog
#38 interdiff-move_user_icons_theme-2566831-37.txt1.84 KBhog
#37 move_user_icons_theme-2566831-37.patch1.67 KBhog
#37 move_user_icons_theme-2566831-37.patch1.67 KBhog
#34 move_user_icons_theme-2566831-34.patch2.35 KBhog
#34 interdiff-move_user_icons_theme-2566831-34.txt2.53 KBhog
#32 patch_28.png37.07 KBkostyashupenko
#29 Selection_155.jpg371.39 KBhog
#28 interdiff-move_user_icons_theme-2566831-23-28.txt1.6 KBhog
#28 move_user_icons_theme-2566831-28.patch1.45 KBhog
#26 interdiff-move_user_icons_theme-2566831-23-26.txt1.59 KBhog
#26 move_user_icons_theme-2566831-26.patch22.92 MBhog
#23 move_user_icons_theme-2566831-23.patch1.44 KBpguillard
#22 move_user_icons_theme-2566831-22.patch1.44 KBmanjit.singh
#20 move_user_icons_theme-2566831-10898514.patch1.42 KBfinnsky
#17 interdiff-2566831-14.txt877 bytesfinnsky
#17 move_user_icons_theme-2566831-17.patch1.42 KBfinnsky
#14 drupalcore-move_user_icons_theme_to_seven-2566831-10837324-8.patch1.07 KBSumit kumar
#11 Screen Shot 2016-01-30 at 1.28.37 PM.png238.73 KBmanjit.singh
#9 move_user_icons_theme_to_seven-2566831-9.patch2.06 KBpguillard
#8 move_user_icons_theme_to_seven-2566831-7.patch0 bytespguillard
#7 move_user_icons_theme_to_seven-2566831-7.patch0 bytespguillard
#5 move_user_icons_theme_to_seven-2566831-5.patch1.66 KBpguillard
#3 move_user_icons_theme_to_seven-2566831-3.patch1.32 KBpguillard
#2 move_user_icons_theme_to_seven-2566831-2.patch755 bytespguillard

Comments

Manjit.Singh created an issue. See original summary.

pguillard’s picture

Status: Active » Needs review
StatusFileSize
new755 bytes

Like this ?

pguillard’s picture

Status: Needs review » Needs work

The last submitted patch, 3: move_user_icons_theme_to_seven-2566831-3.patch, failed testing.

pguillard’s picture

Status: Needs work » Needs review
StatusFileSize
new1.66 KB

I wonder if this is still needed ?
Here is a re-rolled patch

Status: Needs review » Needs work

The last submitted patch, 5: move_user_icons_theme_to_seven-2566831-5.patch, failed testing.

pguillard’s picture

pguillard’s picture

Status: Needs work » Needs review
StatusFileSize
new0 bytes
pguillard’s picture

StatusFileSize
new2.06 KB

The last submitted patch, 8: move_user_icons_theme_to_seven-2566831-7.patch, failed testing.

manjit.singh’s picture

Status: Needs review » Needs work
StatusFileSize
new238.73 KB

@pguillard seems like patch is not working well on local.
I have checked a UI and the "person.svg" has not been called in css. Please check the screenshot.

issues

may be there is problem with the embedding CSS file in seven.libraries.yml

hog’s picture

andypost’s picture

+++ b/core/themes/seven/seven.libraries.yml
+++ b/core/themes/seven/seven.libraries.yml
@@ -31,6 +31,7 @@ global-styling:

@@ -31,6 +31,7 @@ global-styling:
+      css/components/user.icons.admin.css: {}

do we really need that on each page?

Sumit kumar’s picture

Adding Patch for this

andypost’s picture

Status: Needs work » Needs review

to trigger testing

andypost’s picture

Status: Needs review » Needs work

this should extend toolbar library so loaded only when toolbar module enabled

finnsky’s picture

StatusFileSize
new1.42 KB
new877 bytes

added condition for this css.
same idea as in https://www.drupal.org/node/2566855#comment-10823376

finnsky’s picture

Status: Needs work » Needs review
andypost’s picture

+++ b/core/themes/seven/seven.info.yml
@@ -41,6 +41,8 @@ libraries-extend:
+  toolbar/toolbar:
+    - seven/seven.toolbar    ¶

trailing whitespace

finnsky’s picture

fixed

manjit.singh’s picture

Version: 8.0.x-dev » 8.1.x-dev
manjit.singh’s picture

StatusFileSize
new1.44 KB

Needs reroll for 8.1.x-dev.

pguillard’s picture

StatusFileSize
new1.44 KB

Patch rerolled on 8.1.x-dev.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.0-beta1 was released on March 2, 2016, which means new developments and disruptive changes should now be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

pguillard’s picture

.. and still applies to 8.2.x

hog’s picture

Status: Needs review » Needs work

The last submitted patch, 26: move_user_icons_theme-2566831-26.patch, failed testing.

hog’s picture

Status: Needs work » Needs review
StatusFileSize
new1.45 KB
new1.6 KB

Edited path to icon.

hog’s picture

Issue summary: View changes
StatusFileSize
new371.39 KB

Patch works correct.
Seven toolbar user icon

hog’s picture

Status: Needs review » Reviewed & tested by the community
andypost’s picture

Status: Reviewed & tested by the community » Needs review

Do not rtbc own patches

kostyashupenko’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new37.07 KB

Patch from #28 looks ok on my side
patch_28_0.png

star-szr’s picture

Title: move user.icons.theme to seven » Move user.icons.theme to Seven
Status: Reviewed & tested by the community » Needs work

Thanks everyone who has worked on this so far. The patch here is not moving, it's copying (doesn't match up with title/issue summary).

I don't see it being discussed in this issue but we could potentially remove the CSS entirely from the user module as long as we ensure the Stable version is still loaded. That's one of the main purposes of the Stable theme – to provide a backwards compatibility layer.

hog’s picture

Status: Needs work » Needs review
StatusFileSize
new2.53 KB
new2.35 KB
andypost’s picture

This break a lot of things

core8$ git grep -F 'drupal.user.icons'
core/modules/user/user.libraries.yml:30:drupal.user.icons:
core/modules/user/user.module:1382:        'user/drupal.user.icons',
core/themes/stable/stable.info.yml:223:  user/drupal.user.icons:
  1. +++ b/core/modules/user/user.libraries.yml
    @@ -26,9 +26,3 @@ drupal.user.permissions:
    -drupal.user.icons:
    

    all themes that override this library will fail

  2. +++ b/core/themes/seven/seven.libraries.yml
    @@ -25,6 +25,7 @@ global-styling:
    +      css/components/user.icons.admin.css: {}
    

    unneeded

Status: Needs review » Needs work

The last submitted patch, 34: move_user_icons_theme-2566831-34.patch, failed testing.

hog’s picture

Status: Needs work » Needs review
StatusFileSize
new1.67 KB
new1.67 KB
hog’s picture

StatusFileSize
new1.84 KB

The last submitted patch, 37: move_user_icons_theme-2566831-37.patch, failed testing.

Status: Needs review » Needs work

The last submitted patch, 37: move_user_icons_theme-2566831-37.patch, failed testing.

hog’s picture

Status: Needs work » Needs review
StatusFileSize
new2.16 KB
new1.99 KB
joginderpc’s picture

Status: Needs review » Needs work
StatusFileSize
new21.44 KB

It seems that we are not on right track to moving the css to Seven theme. As mentioned in Screenshot the path is showing for Stable theme. Please check.

path not correct

hog’s picture

@joginderpc, check pls https://www.drupal.org/node/2566831#comment-11126239.
If we move code to Seven we have issue in Bartik & another themes - icon in toolbar not display. As this themes are subthemes for Stable, icons in stable theme works ok & we not need to copy this code to each theme.

hog’s picture

Status: Needs work » Needs review
andypost’s picture

Assigned: Unassigned » star-szr
Issue tags: +Needs committer feedback

Patch makes sense to me
Stable actually the one that used so makes no sense to keep the same file in user module.

So probably we need to re-title issue subject cos no actual changes are happen except removal styling from user module.
Suppose @Cottser should decide here

joginderpc’s picture

Issue tags: +stable

Ya that's fine @HOG and yes now the title need to be changed @Cottser need to help on this.

manjit.singh’s picture

Status: Needs review » Needs work
Issue tags: +Needs issue summary update
star-szr’s picture

Title: Move user.icons.theme to Seven » Remove user.icons.theme from core CSS
Assigned: star-szr » Unassigned
Issue tags: -Needs committer feedback

I don't quite follow the logic here anymore, maybe an issue summary update would help indeed :)

Based on what we did in #2566771: [Voltron patch] Move all remaining *.theme.css to Classy I have a couple thoughts:

I would say it makes more sense (based on what we were doing before 8.0.0 and the fact that we have Stable now) to remove the CSS from core leaving the library intact and leave Stable alone. But this assumes that we actually do want to remove all toolbar icons from the core CSS and this decision shouldn't be based on the fact that it's loading from Stable now. No CSS is loaded directly from core modules unless you go base theme-less which means you don't get backwards compatibility. Based on this train of thought I'm tentatively retitling the issue.

Regarding issue scoping this change seems like it's too small. If we go along the route of removing all the toolbar icons from the core CSS I think we'd be committing lots of tiny patches and potentially leaving the toolbar in a very weird state (in core sans base theme). There's also shortcut's star icon and such. If we want to keep pursuing the removal of the icons from the toolbar in core CSS I think we need a larger patch or we need to Voltron again (meaning get a bunch of small patches ready and roll them together into one patch).

joginderpc’s picture

Issue tags: +move icons file, +tiny patches

Yes i agree with @cottser we need to make tiny patches and club them in one big patch so the tester also track the changes.

star-szr’s picture

Issue tags: -move icons file, -tiny patches

We don't need more tags :)

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.0-beta1 was released on August 3, 2016, which means new developments and disruptive changes should now be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

deepakkumar14’s picture

StatusFileSize
new3.2 KB

Submit patch for this issues.
Reviews this patch.

deepakkumar14’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 52: move_user_icons_theme-2566831-42.patch, failed testing.

deepakkumar14’s picture

Status: Needs work » Needs review
StatusFileSize
new3.2 KB

I have submitted new patch for this.
Please review this.

Status: Needs review » Needs work

The last submitted patch, 55: move_user_icons_theme-2566831-43.patch, failed testing.

imshivani’s picture

StatusFileSize
new626 bytes

Submitted patch for the issue. You can review the patch.

imshivani’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 57: remove-user-icon-2566831-57.patch, failed testing.

Sumit kumar’s picture

Issue tags: +Dublin2016
pguillard’s picture

StatusFileSize
new1.07 KB
new378 bytes

Should pass tests

pguillard’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 61: remove-user-icon-2566831-61.patch, failed testing.

hog’s picture

Assigned: Unassigned » hog
hog’s picture

Assigned: hog » Unassigned
Status: Needs work » Needs review
StatusFileSize
new91.99 KB
new3.34 KB

Rerolled patch.

Status: Needs review » Needs work

The last submitted patch, 65: move_user_icons_theme-2566831-65.patch, failed testing.

hog’s picture

StatusFileSize
new3.2 KB
new3.34 KB
hog’s picture

Status: Needs work » Needs review
hog’s picture

I rerolled Pguillard's patch. I think it's good decision.

The last submitted patch, 67: move_user_icons_theme-2566831-67.patch, failed testing.

Status: Needs review » Needs work

The last submitted patch, 69: move_user_icons_theme-2566831-69.patch, failed testing.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.0-alpha1 will be released the week of January 30, 2017, which means new developments and disruptive changes should now be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

starshaped’s picture

Status: Needs work » Needs review
StatusFileSize
new1.48 KB

Removed reference to drupal.user.icons in user.libraries.yml as this was causing the kernel test to fail.

phenaproxima’s picture

Status: Needs review » Needs work

Thank you, @starshaped, for fixing the tests!

Unfortunately, I gave this a quick manual test and discovered that it still appears to be broken, in that there is no user icon in the toolbar when I switch into Seven with this patch applied. So that will need to be addressed :(

phenaproxima’s picture

Issue tags: +Needs reroll

Did some git bisect work on this with @starshaped and @xjm at DrupalCamp Montreal.

It turns out this will need to be re-rolled because user.icons.theme.css was renamed to user.icons.admin.css, in 5cb0783 (#2566771: [Voltron patch] Move all remaining *.theme.css to Classy). And it definitely needs an issue summary update.

phenaproxima’s picture

Issue summary: View changes
Issue tags: -Needs issue summary update

The IS, she is fixed.

phenaproxima’s picture

Title: Remove user.icons.theme from core CSS » Remove user.icons.admin library from core CSS
phenaproxima’s picture

Okay, something here is strange.

My current understanding is that the following things need to happen -- based on a heady combination of the BC policy for the core themes, and the current way that things seem to be put together:

  1. Remove user.icons.admin.css and its library definition from User.
  2. Remove all references to that library from User (currently only user_toolbar() makes mention of it).
  3. Replace Stable's libraries-override reference to user/drupal.user.icons with an actual library definition.
  4. Copy user.icons.admin.css, and the library definition, to Seven and Bartik separately, duplicating the code for each theme.
  5. Implement hook_toolbar_alter() in Seven, Stable and Bartik to re-add the library, effectively preserving BC for Stable.
  6. Possibly write tests for all this rigmarole.

I'd like a front-end maintainer to confirm this understanding before anything further happens here...

edysmp’s picture

Issue tags: -Needs reroll +needs re
StatusFileSize
new1.5 KB

Fixed needs reroll.

manjit.singh’s picture

Status: Needs work » Needs review
phenaproxima’s picture

Issue tags: -needs re

Removing bad tag.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.0-alpha1 will be released the week of July 31, 2017, which means new developments and disruptive changes should now be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.0-alpha1 will be released the week of January 17, 2018, which means new developments and disruptive changes should now be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

bandanasharma’s picture

StatusFileSize
new2.58 KB

Re-roll the patch for d9.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

djsagar’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new283.32 KB
new275.62 KB

Hi @bandanasharma,

Patch is applied after applied patch icon is gone in drupal 9.

Thanks!

catch’s picture

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

The patch doesn't look right to me. The patch should be moving the files to Seven and adding a new library definition there.

Additionally, rather than removing the definition from user module, it should be deprecated for removal in Drupal 10.

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

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

avpaderno’s picture

Issue tags: -Needs front +Needs frontend framework manager review
vikashsoni’s picture

StatusFileSize
new149.61 KB
new163.84 KB

Hi @bandanasharma,

Patch applied successfully
After patch icon is gone
Thanks for the patch
For ref sharing screenshots .....

bnjmnm’s picture

Removing credit for #94. Screenshots were already provided in #90. Both sets of screenshots are also used as evidence of success, but that's based on a misunderstanding of the issue requirements - the goal is not to remove the user icon from the toolbar, it's to remove it as a core library, and move it to a theme.

Based on the current issue summary, this is also likely unnecessary as core themes are now decoupled from Classy. This should be updated if there's an issue to ba addressed.

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.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.