Needs work
Project:
Drupal core
Version:
main
Component:
contextual.module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
8 May 2015 at 09:57 UTC
Updated:
20 Nov 2022 at 19:16 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
rudraram commentedAdded patch.
Comment #2
lewisnymanThis change seems to break the icon in the toolbar:
According to caniuse we only need to have the standard gradient property and the -webkit- property
Comment #3
rudraram commented@lewis you are right the issue image issue is happening with the non-active state. I updated my patch fixing that and also reverting the vendor prefixes.
Comment #4
lewisnymanCan you help me understand why we are changing this selector, I think the original selector made more sense than the new ones, as we want to make selectors as short as possible
Comment #5
saki007sterUpdating the patch with the comments mentioned in #4
Comment #6
saki007sterComment #7
saki007sterComment #8
saki007sterComment #9
manjit.singhGuys please don't forget to upload interdiff along with patch. It became easy to other reviewers to review you patch.
Comment #10
manjit.singh@lewis Can you look into this screenshot .. Don't know about whether is it issue or not :P Can we solve it ?
Comment #11
saki007ster@Manjit.Singh This is not happening for me, how to reproduce this ? Any specific browser ?
Comment #12
rudraram commented@saki007ster Set contextual toolbar to be active. Check the contextual links in the footer blocks. Screenshot attached.
Comment #13
lewisnymanWe have't changed the CSS for the contextual icons, the only changed we have made so far are to the toolbar item for contextual links.
Is it ok if we start the patch again after we discuss the changes to make to the CSS? I don't understand the changes made so far and I think there are a few more to make.
I've uploaded the current CSS files in HEAD so we can review them using Dreditor.
Comment #14
lewisnymanHere are some comments on contextual.module.css, remember we need to update the markup as well.
contextual__region
This should be contextual__trigger
We should use .contextual.is-open and .contextual__links
Comment #15
manjit.singhUpdating patch as per #14 comment by lewis :)
Comment #16
manjit.singhComment #17
lewisnymanGreat thanks, we need to update the classes in the markup so the styles apply again and take some screenshots to show they still look right.
Comment #18
skippednote commentedIncluding css and markup changes.
Comment #19
skippednote commentedadd interdiff
Comment #21
MathieuSpil commentedAlright, this is looking better and better. (Lets not worry about the failing test just yet, it is because of the html-changes.)
Some thoughts:
1) In #18, I see that we no longer use the
.is-open-class ? Don't think this is intentional? Lets double-check that we use one class in js and css.2) Is there a possibility that we change the following:
.contextual__region .contextual .contextual__linkswith.contextual__region .contextual__links(The whole point is to not overspecify, so in this scenario the class can maybe be deleted (haven't tested it...))
3) In the same way: can't we change:
.toolbar .toolbar-bar .contextual-toolbar-tabby.contextual-toolbar-tabor something similar (css-specificity-issues?)Comment #22
_KurT_ commentedComment #23
_KurT_ commented1) change
.isOpento.openin js files2) fixed
3) almost fixed, need to overwrite other css styles, left comments in patch
Also i have a question about
.contextual__linksclass. When i applied patch #18 in css and js this class was changed, but in source code i still have.contextual-linksclass (so js and css didn't work for me). I can't found where.contextual-linksgenerated so i left it as it is now. Could someone explain me why.contextual-linksis changed to.contextual__linksnow.Comment #24
_KurT_ commentedComment #25
MathieuSpil commentedHey @Kurt,
The
contextual-links-class should no longer be used see #14. So If you still find this class in the markup, this should indeed be changed too. (Sure you cleared the cache after applying the patch? I see in the patch that the class should be changed)Can you explain what the problem is in this ticket? I am not really finding your comment in css. (You should also avoid adding extra comments in patches)
Thanks for the work!
Comment #27
MathieuSpil commentedComment #28
MathieuSpil commentedFixed the patch so it now applies again, not sure why exactly it was failing, but redid the rejected hunks.
Please review, not very sure everything is intentional?
Thanks for the work so far!
Comment #29
MathieuSpil commentedComment #33
rudraram commentedDon't understand why the above failed testing.
Comment #34
manjit.singhtypo :(
Comment #35
MathieuSpil commentedThe test failed because it was expecting the class
contextual-links, but this is now changed to.contextual__links.Comment #36
MathieuSpil commentedIgnore #35, wrongly patched...
Comment #37
MathieuSpil commentedComment #38
_KurT_ commented@MathieuSpil
i meant i applied patch, cleared cache, and still see
.contextual-linksclass in source code, see 2015-06-12_1446.png. Is it proper behaviour or what i'm doing wrong.About my comments in css, see lines 166, 174, 183 in patch #22
Comment #39
lewisnymanGreat work here people.
This .open class should be .is-open
Can we remove the contextual__region class from these selectors? I don't think we need it
The class should be 'is-open' not just 'open'
Comment #40
manjit.singhComment #41
lewisnymanThanks, I found a few more places where we are still using the old class names:
On line 25 of contextual.icons.theme.css:
Can we remove the !importants from here? Maybe we need to move these properties to a new selector like
.visually-hidden.focusable.contextual__trigger?Also for line 29 of contextual.icons.theme.css and line 19 of contextual.toolbar.css:
CSSLint says:
“Negative text-indent doesn't work well with RTL. If you use text-indent for image replacement explicitly set direction for that item to ltr.”
In contextual.module.css:
We have an important, can we change the selector to
.visually-hidden.focusable.contextual_trigger:focusto remove the !important?Comment #42
lewisnymanCan we add a blank line about these comments?
Comment #43
Eski commentedI will have a looksee!
Comment #44
Aleksandar_P commentedComment #45
Aleksandar_P commentedPatch re-roll.
Comment #46
Aleksandar_P commentedComment #47
manjit.singhComment #48
lewisnymanThis patch was not working. I noticed that we missed a few conversions from
opentois-open.This revealed a few problems, as Bartik's theme CSS overrides the contextual CSS as it is now weak.
This is actually already considered in the contextual CSS:
Maybe we just have to have stronger selectors here but it feels very unstable. We don't know for sure that they will always override the theme CSS.
Comment #49
MathieuSpil commentedOk, we have this regression inside bartik because of the removal of the
.contextual__region-class that is proposed in #39 So maybe we should check carefully where we can delete this class in CSS without losing necessary specificity.Also: #42 and #41 still need to be implemented.
Comment #51
MathieuSpil commentedComment #52
gertjanmeire commentedComment #53
aliyakhan commentedSpecificity issue with contextual links on hover here.
Comment #54
MathieuSpil commentedRe-assigning, because of hangovers.
@Aliyakhan: Thank you, I think the error is caused by the css-specificity issue addressed in #48.
Comment #55
MathieuSpil commentedHmmm, re-applying the patch causes more stuff to go wrong... Won't be needing screenshots for now.
Comment #56
MathieuSpil commentedComment #57
Arnion commentedRerolled
Comment #58
Arnion commentedComment #59
kostyashupenkoComment #70
komalk commentedComment #74
larowlanI think at this point we'll need to retain the old classes too, even if we have no CSS for them, otherwise it will be a BC break for existing sites.
here too
Comment #77
andregp commentedI'm working on a reroll. I'll send it here soon.
Edit.: Sorry, I didn't mean to change the status before sending the patch.
Comment #78
andregp commentedI ended up doing a reroll both for Drupal 9.3 and 10.0
I also addressed @larowlan suggestion on #74
Comment #80
andregp commentedI'll see what I can do to reduce the failing tests
Comment #81
andregp commentedI made some more replacements to see if I get less errors (I know I can test locally, and I did it for some tests, but I was not able to configure JavascriptFunctional tests to work on my Lando environment)
Comment #84
ajaypratapsingh commentedreroll the patch
Comment #85
akshayadhavWorking on it
Comment #86
akshayadhavComment #87
ameymudras commentedFixed the phpcs issues with #84
Comment #88
medha kumariReroll the patch #87 with Drupal 9.5.x and Fixed custom commands.
Comment #89
medha kumariReroll the patch #88 with Drupal 9.5.x and Fixed custom commands.
Comment #91
nod_There are commit check failures in the last patch
Comment #92
ravi.shankar commentedI've rerolled the patch #89 on Drupal 9.5.x as It was not getting applied, also addressed the Drupal CS issues of patch.
Comment #93
longwaveThis will have to go into 10.1.x now. Still doesn't pass commit checks, and @larowlan's comments about backward compatibility in #74 still need addressing.
Comment #94
ameymudras commentedSubmitting a D9 patch, tried to fix the CI errors and the feedback on #74
Comment #95
ameymudras commentedThere was an issue with the above patch, created the patch again
Comment #96
ameymudras commentedFixing a small css issue in the above patch
Comment #97
spokjeBack to NW because of #83
So rerolling for D9 isn't going to be useful.