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.

Issue fork drupal-3303546

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

sasanikolic created an issue. See original summary.

sasanikolic’s picture

Title: Refactor Claro's card stylesheet » Refactor Claro's dialog stylesheet
Issue summary: View changes
aditya4478’s picture

Status: Active » Needs review
StatusFileSize
new10.08 KB
aditya4478’s picture

Version: 9.5.x-dev » 10.0.x-dev
StatusFileSize
new12.65 KB
smustgrave’s picture

Status: Needs review » Needs work

This 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.

sakthivel m’s picture

Version: 10.0.x-dev » 10.1.x-dev
Status: Needs work » Needs review
StatusFileSize
new8.43 KB

#6 Please review the patch

Status: Needs review » Needs work

The last submitted patch, 6: 3303546-version-10.1.x-5.patch, failed testing. View results

Gauravvv made their first commit to this issue’s fork.

gauravvvv’s picture

Status: Needs work » Needs review
smustgrave’s picture

Status: Needs review » Needs work
Issue tags: +Needs Review Queue Initiative

More nesting can be done. Left comments in MR.

Screenshots will be needed also.

gauravvvv’s picture

Status: Needs work » Needs review
smustgrave’s picture

Status: Needs review » Needs work
/**
 * Off-canvas styles.
 */
.ui-dialog.ui-dialog-off-canvas .ui-widget-content.ui-dialog-content {
  background: none;
}
@media all and (max-width: 48em) { /* 768px */
  .ui-dialog:not(.ui-dialog-off-canvas) {
    min-width: 92%;
    max-width: 92%;
  }
}

Think we can fold these in to the parent.

gauravvvv’s picture

Status: Needs work » Needs review
smustgrave’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new56.54 KB
new75.5 KB
new80.29 KB

attaching some screenshots to show nothing broke.

nod_’s picture

Status: Reviewed & tested by the community » Needs work

There seems to be a regression on rtl the dialog is stuck on the right of the screen, it's not centered anymore.

VladimirAus made their first commit to this issue’s fork.

santosh_verma’s picture

StatusFileSize
new368.63 KB

Tested the MR#3546

Patch applied Clearly
Set the direction RTL and tested UI and popup is aligned perfectly center for reference attaching the screenshot
after

RTBC + 1

gauravvvv’s picture

Status: Needs work » Needs review
smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Additional changes by Gauravvv looks good.

bnjmnm’s picture

Status: Reviewed & tested by the community » Needs work

Gitlab 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.

gauravvvv’s picture

Status: Needs work » Needs review

Addressed feedbacks and rebased the MR

smustgrave’s picture

Issue tags: +DrupalSouth
santosh_verma’s picture

working on it

santosh_verma’s picture

“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.

smustgrave’s picture

FYI this was tagged for drupalSouth to be looked at there. So if you’re there great

smustgrave’s picture

Status: Needs review » Needs work

Seems to have a CI build.

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 » Needs review
gauravvvv’s picture

Version: 11.x-dev » 10.1.x-dev
bramdriesen’s picture

Status: Needs review » Needs work

I doubt an issue marked as Task will be added to the 10.1.x release since a beta has been released.

bnjmnm’s picture

Status: Needs work » Needs review

I doubt an issue marked as Task will be added to the 10.1.x release since a beta has been released.

Good 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.

bramdriesen’s picture

Ah yes, didn't think about that 🙂 thanks @bnjmnm

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: -CSS, -Needs followup, -DrupalSouth

Cleaning up tags.

Believe all threads have been addressed so don't mind marking.

lauriii’s picture

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

The MR needs to be rebased on 11.x

santosh_verma’s picture

working on this

swatidhurandhar’s picture

StatusFileSize
new57.38 KB

Hi,
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

pragati_kanade made their first commit to this issue’s fork.

pragati_kanade’s picture

Status: Needs work » Needs review

Hi @lauriii I have rebased MR to 11.x.
Please check now.
Thanks!

bramdriesen’s picture

Status: Needs review » Needs work

Not sure if the rebase was done correctly.

"composer.lock" does not contain valid JSON
Parse error on line 686:
...-vendor-hardening",<<<<<<< HEAD
---------------------^
Expected: 'STRING' - It appears you have an extra trailing comma

The failing spellcheck might be a false positive.

bramdriesen’s picture

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

Ah, I see the target branch of the MR is not set to 11.x

AkshayAdhav made their first commit to this issue’s fork.

guptahemant made their first commit to this issue’s fork.

pragati_kanade’s picture

Status: Needs work » Needs review
smustgrave’s picture

Status: Needs review » Needs work

MRs need to be cleaned up. Both seem to have failures., but should only be 1

gauravvvv’s picture

Status: Needs work » Needs review
Issue tags: -Needs reroll

Fixed linting errors and updated logical properties. please review

smustgrave’s picture

Status: Needs review » Needs work

Have multiple MRs, patches up which is it? Can those be cleaned up please.

gauravvvv’s picture

Gauravvvv changed the visibility of the branch 3303546-refactor-claros-dialog to hidden.

Gauravvvv changed the visibility of the branch 11.x to hidden.

Gauravvvv changed the visibility of the branch 10.1.x to hidden.

Gauravvvv changed the visibility of the branch 3303546-refactor-claro-dialog-D11 to hidden.

Gauravvvv changed the visibility of the branch 3303546-11.0.x to hidden.

gauravvvv’s picture

Status: Needs work » Needs review

I have hidden all redundant Merge Requests and patches. Merge Request !5874 is now ready for review.

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Thanks, refactoring seems good in the MR that's up.

bramdriesen’s picture

Status: Reviewed & tested by the community » Needs work

sourabhjain made their first commit to this issue’s fork.

sourabhjain’s picture

Status: Needs work » Needs review
bramdriesen’s picture

Tests 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.

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Thanks for fixing that @BramBriesen.

nod_’s picture

Status: Reviewed & tested by the community » Needs work

Seems a forced-color image has been removed, can someone check in forced color mode? thx.

Mithun S made their first commit to this issue’s fork.

mithun s’s picture

Status: Needs work » Needs review

Validated 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.

smustgrave’s picture

Status: Needs review » Needs work

MR appears to have failures.

stanzin made their first commit to this issue’s fork.

stanzin’s picture

I am requesting a REVIEW for a new MR. Thanks )

stanzin’s picture

Status: Needs work » Needs review

finnsky changed the visibility of the branch 3303546-claro-dialog-refactor-d11 to hidden.

finnsky’s picture

Thank 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.

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new377.3 KB
new365.15 KB

I used view dialog for example and things appear to be unchanged

Before

before

After

after

quietone’s picture

I 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.

  • nod_ committed 8c1d5599 on 10.4.x
    Issue #3303546 by gauravvvv, stanzin, aditya4478, santosh_verma,...

  • nod_ committed 431532d6 on 10.5.x
    Issue #3303546 by gauravvvv, stanzin, aditya4478, santosh_verma,...

  • nod_ committed fbad2d37 on 11.1.x
    Issue #3303546 by gauravvvv, stanzin, aditya4478, santosh_verma,...

  • nod_ committed b801b77d on 11.x
    Issue #3303546 by gauravvvv, stanzin, aditya4478, santosh_verma,...
nod_’s picture

Version: 11.x-dev » 10.4.x-dev
Status: Reviewed & tested by the community » Fixed

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!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.