Problem/Motivation
This is part of the CSS modernization initiative, and intended to be worked on by our Google Summer of Code student only.
Steps to reproduce
The stylesheet at https://git.drupalcode.org/project/drupal/-/blob/10.0.x/core/themes/claro/css/components/dialog.pcss.css needs to be refactored to make use of modern CSS and Drupal core's PostCSS tooling.
Proposed resolution
Use CSS Logical Properties where appropriate
Use CSS nesting where appropriate
Remaining tasks
We need two patches. One for Drupal 9.5.x and one for Drupal 10.0.x
We need a followup issue to refactor this component in Drupal 10.0.x to make use of component-level CSS custom properties and remove IE specific style definitions.
User interface changes
None. There should be no visual differences.
| Comment | File | Size | Author |
|---|---|---|---|
| #72 | Screenshot 2024-11-13 at 1.55.37 PM.png | 365.15 KB | smustgrave |
| #72 | Screenshot 2024-11-13 at 1.55.16 PM.png | 377.3 KB | smustgrave |
Issue fork drupal-3303546
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
Comment #2
sasanikolic commentedComment #3
aditya4478 commentedComment #4
aditya4478 commentedComment #5
smustgrave commentedThis issue is being reviewed by the kind folks in Slack, #need-reveiw-queue. We are working to keep the size of Needs Review queue [2700+ issues] to around 200
Thank you for the patch and work everyone.
At this time we would need a D10.1.x patch or MR for this issue.
Comment #6
sakthivel m commented#6 Please review the patch
Comment #10
gauravvvv commentedComment #11
smustgrave commentedMore nesting can be done. Left comments in MR.
Screenshots will be needed also.
Comment #12
gauravvvv commentedComment #13
smustgrave commentedThink we can fold these in to the parent.
Comment #14
gauravvvv commentedComment #15
smustgrave commentedattaching some screenshots to show nothing broke.
Comment #16
nod_There seems to be a regression on rtl the dialog is stuck on the right of the screen, it's not centered anymore.
Comment #18
santosh_verma commentedTested the MR#3546
Patch applied Clearly
Set the direction RTL and tested UI and popup is aligned perfectly center for reference attaching the screenshot
RTBC + 1
Comment #19
gauravvvv commentedComment #20
smustgrave commentedAdditional changes by Gauravvv looks good.
Comment #21
bnjmnmGitlab sees a merge conflict beyond the usual rebase, probably just a little out of sync with HEAD. I spotted two additional nesting opportunities as well, check the MR, so at least the additional work isn't just due to the post RTBC wait.
Comment #22
gauravvvv commentedAddressed feedbacks and rebased the MR
Comment #23
smustgrave commentedComment #24
santosh_verma commentedworking on it
Comment #25
santosh_verma commented“I noticed that comment #22 did not incorporate the feedback provided in comment #21 regarding the nesting opportunities. I have worked on the suggestions provided in and made the necessary changes. Tested the ui nothing broken. Please review the MR.
Comment #26
smustgrave commentedFYI this was tagged for drupalSouth to be looked at there. So if you’re there great
Comment #27
smustgrave commentedSeems to have a CI build.
Comment #29
gauravvvv commentedComment #30
gauravvvv commentedComment #31
bramdriesenI doubt an issue marked as Task will be added to the 10.1.x release since a beta has been released.
Comment #32
bnjmnmGood looking out. Fortunately the Claro stylesheet refactoring issues are incredibly nondisruptive and I'd have no issue committing them to a beta. It's also fine to continue work on the 10.1.x branch in general. We can bump the version up when necessary.
Comment #33
bramdriesenAh yes, didn't think about that 🙂 thanks @bnjmnm
Comment #34
smustgrave commentedCleaning up tags.
Believe all threads have been addressed so don't mind marking.
Comment #35
lauriiiThe MR needs to be rebased on 11.x
Comment #36
santosh_verma commentedworking on this
Comment #37
swatidhurandhar commentedHi,
In drupal-3303546, 11.x branch is not available to rebase. 11.0.x is present there but it is empty. So, unless we have 11.x branch with all the code, rebasing can't be done.
Thanks
Comment #39
pragati_kanade commentedHi @lauriii I have rebased MR to 11.x.
Please check now.
Thanks!
Comment #40
bramdriesenNot sure if the rebase was done correctly.
The failing spellcheck might be a false positive.
Comment #41
bramdriesenAh, I see the target branch of the MR is not set to 11.x
Comment #45
pragati_kanade commentedComment #46
smustgrave commentedMRs need to be cleaned up. Both seem to have failures., but should only be 1
Comment #47
gauravvvv commentedFixed linting errors and updated logical properties. please review
Comment #48
smustgrave commentedHave multiple MRs, patches up which is it? Can those be cleaned up please.
Comment #49
gauravvvv commentedComment #55
gauravvvv commentedI have hidden all redundant Merge Requests and patches. Merge Request !5874 is now ready for review.
Comment #56
smustgrave commentedThanks, refactoring seems good in the MR that's up.
Comment #57
bramdriesenComment #59
sourabhjainComment #60
bramdriesenTests are green again with my latest commit.
@sourabhjain Never edit .css files directly for Drupal Core. It's clearly mentioned on top of the file. Also, this has been brought up before. Don't just blindly apply code suggestions or merge request remarks.
Comment #61
smustgrave commentedThanks for fixing that @BramBriesen.
Comment #62
nod_Seems a forced-color image has been removed, can someone check in forced color mode? thx.
Comment #64
mithun sValidated the missing css and added it to the dialog.pcss.css file and compiled and pushed a commit to the branch.
Moving the issue to Needs review.
Comment #65
smustgrave commentedMR appears to have failures.
Comment #68
stanzin commentedI am requesting a REVIEW for a new MR. Thanks )
Comment #69
stanzin commentedComment #71
finnsky commentedThank you!
CSS changes looks good to me.
Also tested basically and didn't found visual regressions.
+1 RTBC. Would be cool if anyone can make before/after screenshots.
Comment #72
smustgrave commentedI used view dialog for example and things appear to be unchanged
Before
After
Comment #73
quietone commentedI didn't find unanswered questions in the comments or the MR. A reminder that this issue summary be improved by having the before/after screenshots available from the issue summary and the remaining tasks up to date.
Comment #79
nod_Committed and pushed 903f73fb30 to 11.x and fbad2d37f6 to 11.1.x and 431532d69a to 10.5.x and 8c1d5599ef to 10.4.x. Thanks!