Steps to get the leave preview box:

  1. Go to edit node
  2. Click on Preview button at the bottom.
  3. Click on logo or website title on Navbar.

Actual box:
Cancel button and Leave preview are not inline.
actual

Expected:
Cancel button and Leave preview should be inline.
expected

CommentFileSizeAuthor
#114 Screenshot 2023-03-14 at 9.40.27 AM.png128.39 KBandy-blum
#113 interdiff_104-113.txt1.3 KBpradipmodh13
#113 3149863-113.patch1.41 KBpradipmodh13
#112 interdiff_109-112.txt395 bytesakram khan
#112 3149863-112.patch1.41 KBakram khan
#109 interdiff_104-109.txt744 bytespradipmodh13
#109 3149863-109.patch1.42 KBpradipmodh13
#108 Screenshot 2023-02-23 at 12.29.52 PM.png97.13 KBandy-blum
#108 Screenshot 2023-02-23 at 12.26.36 PM.png73.28 KBandy-blum
#108 Screenshot 2023-02-23 at 12.26.24 PM.png71.09 KBandy-blum
#106 3149863-after-patch.png69.32 KBnayana_mvr
#106 3149863-before-patch.png74.43 KBnayana_mvr
#105 interdiff-103_104.txt5.28 KBgauravvvv
#105 3149863-104.patch1.38 KBgauravvvv
#104 3149863-nr-bot.txt1.87 KBneeds-review-queue-bot
#103 3149863-103.patch5.92 KB_utsavsharma
#103 interdiff_102-103.txt517 bytes_utsavsharma
#102 3149863-102.patch5.92 KBgauravvvv
#98 After-patch-applied-3149863.png1.24 MBHarish1688
#98 Before-patch-issue-3149863.png1.19 MBHarish1688
#95 interdiff_84_95.txt3.44 KBameymudras
#95 3149863-95.patch3.89 KBameymudras
#94 Screen Shot 2022-07-11 at 11.00.12 AM.png330.64 KBbnjmnm
#89 Screenshot 2022-02-23 at 12.34.59 PM.png2.44 MBSatyajit1990
#89 Screenshot 2022-02-23 at 12.15.20 PM.png74.97 KBSatyajit1990
#87 After.png68.62 KBSatyajit1990
#87 Before.png71.8 KBSatyajit1990
#84 interdiff_83-84.txt997 bytesranjith_kumar_k_u
#84 3149863-84.patch1.31 KBranjith_kumar_k_u
#83 3149863-83-mobile.png42.62 KBcindytwilliams
#83 3149863-83-spanish.png27.55 KBcindytwilliams
#83 3149863-83-english.png27.74 KBcindytwilliams
#83 3149863-83.patch1.37 KBcindytwilliams
#81 After--patch.png25.11 KBradheymkumar
#81 Before--patch.png24.43 KBradheymkumar
#80 After--patch--pic.png26.66 KBvikashsoni
#80 Before--patch--pic.png29.79 KBvikashsoni
#75 Patch NA 3149863.png393.02 KBchetanbharambe
#75 Before Patch 3149863 Up.png392.83 KBchetanbharambe
#74 interdiff-70-74.txt479 byteskishor_kolekar
#74 3149863-74.patch4.53 KBkishor_kolekar
#73 Patch unsuccessful 3149863.png412.99 KBchetanbharambe
#73 Before Patch 3149863.png344.99 KBchetanbharambe
#71 3149863.70.patch4.5 KBsakthivel m
#68 After_patch_3149863_56.png402.8 KBAgnesh Tank
#68 Before_patch_3149863_56.png472.52 KBAgnesh Tank
#67 afterpatch.png114.83 KBrinku jacob 13
#67 beforepatch.png113.97 KBrinku jacob 13
#61 Screenshot 2021-04-09 at 16.58.10.png36.02 KBgauravvvv
#61 Screenshot 2021-04-09 at 16.56.19.png36.04 KBgauravvvv
#56 interdiff_49_56.txt1.8 KBkostyashupenko
#56 3149863-56.patch4.46 KBkostyashupenko
#54 word-after-patch-mobile.png54.34 KBdjsagar
#54 word-after-patch-desktop.png150.54 KBdjsagar
#54 mobile-after-patch.png70.13 KBdjsagar
#54 desktop-after-patch.png124.54 KBdjsagar
#53 Before.png99.75 KBkomalk
#53 After.png97.98 KBkomalk
#50 After--patch--2.jpg67.36 KBranjith_kumar_k_u
#50 After--patch--1.jpg52.54 KBranjith_kumar_k_u
#50 Before--patch.jpg47.62 KBranjith_kumar_k_u
#49 interdiff_44-49.txt1.02 KBkomalk
#49 3149863-49.patch4.52 KBkomalk
#49 after.png97.36 KBkomalk
#44 3149863-44.patch4.47 KBhansa11
#41 after-patch-41-b.png106.5 KBhansa11
#41 after-patch-41-a.png71.12 KBhansa11
#41 3149863-41.patch4.47 KBhansa11
#39 test___Drupal.png35.4 KBmherchel
#38 3149863-38.patch4.32 KBhansa11
#38 after-patch-38-b.png102.53 KBhansa11
#38 after-patch-38-a.png90.91 KBhansa11
#38 before patch-38.png88.19 KBhansa11
#35 english.png160.65 KBsd9121
#35 multilingual.png103.02 KBsd9121
#32 before-patch-32.png173.08 KBhansa11
#32 after-patch-32.png166.95 KBhansa11
#32 3149863-32.patch3.88 KBhansa11
#26 Снимок экрана 2020-06-18 в 16.20.06.png28.01 KBkostyashupenko
#26 3149863-26.patch1.92 KBkostyashupenko
#23 3149863-23.patch1.92 KBkomalk
#22 interdiff_20-22.txt1.39 KBkomalk
#22 3149863-22.patch1.92 KBkomalk
#20 3149863-20.patch1.88 KBkomalk
#19 interdiff_16-19.txt5.66 KBkomalk
#19 3149863-19.patch1.89 KBkomalk
#16 before.png79.39 KBkomalk
#16 after.png78.87 KBkomalk
#16 interdiff_14-16.txt658 byteskomalk
#16 3149863-16.patch6.18 KBkomalk
#15 expected.png31.17 KBindrajithkb
#15 current-behaviour.png31.27 KBindrajithkb
#14 3149863-14.patch5.86 KBkomalk
#13 lint.png104.03 KBramya balasubramanian
#12 Screen Shot 2020-06-11 at 3.45.24 PM.png503.15 KBramya balasubramanian
#11 3149863-11.patch6.02 KBkomalk
#10 3149863-10.patch6.04 KBkomalk
#8 before-patch.png87.14 KBkomalk
#8 after-patch.png65.06 KBkomalk
#8 interdiff_3-8.txt6.96 KBkomalk
#8 3149863-8.patch6.06 KBkomalk
#3 3149863-3.patch1.88 KBkomalk
#3 before-patch.png87.14 KBkomalk
#3 after-patch.png64.92 KBkomalk
Screenshot 2020-06-08 at 4.58.38 PM.png65.68 KBhimanshu_sindhwani
Screenshot 2020-06-08 at 4.58.21 PM.png68.98 KBhimanshu_sindhwani

Comments

himanshu_sindhwani created an issue. See original summary.

komalk’s picture

Assigned: Unassigned » komalk
komalk’s picture

Assigned: komalk » Unassigned
Status: Active » Needs review
StatusFileSize
new64.92 KB
new87.14 KB
new1.88 KB

Override the classes in
/core/assets/vendor/jquery.ui/themes/base/dialog.css
Added new file dialog.css.
Here is the fixed review the patch attached before after patch screen shot for the reference.

mherchel’s picture

Status: Needs review » Needs work

Couple of issues by looking at the code:

1) The CSS needs to be only loaded when needed. You should do this by extending an existing library
2) Why the jQuery UI copyight?
3) Indentation is incorrect
4) this will affect every jQuery UI. Is this intentional? If so, we need to make sure there are no regressions.
5) Indentation is incorrect. You'll also want to conform to the nesting style that we're using throughout Olivero.

mherchel’s picture

Title: Leave preview box UX issue » jQuery UO "Leave preview" box buttons not on same line
Priority: Normal » Minor
Issue tags: -Usability
mherchel’s picture

Title: jQuery UO "Leave preview" box buttons not on same line » jQuery UI "Leave Preview" dialog buttons not aligned
komalk’s picture

Assigned: Unassigned » komalk
komalk’s picture

Assigned: komalk » Unassigned
Status: Needs work » Needs review
StatusFileSize
new6.06 KB
new6.96 KB
new65.06 KB
new87.14 KB

Did all the changes as mentioned in #4.
There are no regressions checked with other theme also working properly as expected.
Review the patch attached before after patch screen shot for the reference.

mherchel’s picture

What's the difference between the core CSS and the CSS in this patch? Why not extend the library instead of completely overriding the CSS?

komalk’s picture

StatusFileSize
new6.04 KB

Please review the patch.
Created a separate library and extended dialog using libraries-extend.

komalk’s picture

StatusFileSize
new6.02 KB

Please review the patch #11.
Created a separate library and extended dialog using libraries-extend.

ramya balasubramanian’s picture

StatusFileSize
new503.15 KB

Hi @komalkolekar,

Steps to test:
1) Download and install the Olivero themes inside the themes folder.
2) Enable and set as default and set 'Olivero' as the admin theme also.
3) Edit the node and click the Preview button.
4) Click the site title and check the dialog box.
5) There Preview and cancel button should be in an aligned position.


After patch:


After patch

Before patch:

Before patch

@komalkolekar,
Please try to fix the linting errors. Please have a look at the below screenshot.

ramya balasubramanian’s picture

StatusFileSize
new104.03 KB

Updated linting file.

Linting errors:

Linting

komalk’s picture

Issue summary: View changes
StatusFileSize
new5.86 KB

@Ramya Balasubramanian Thank you for the review.
Please review the patch #14 fixing linting issues as mentioned in #13.

indrajithkb’s picture

Status: Needs review » Needs work
StatusFileSize
new31.27 KB
new31.17 KB

Hi @komalkolekar patch looking good, but am experiencing one issue by default button text font-weight:700 but on hover,focus,active it's changing to font-weight:normal(overriding by core/assets/vendor/jquery.ui/themes/base/theme.css) which is not expected behaviour we need to keep the font-weight:700 for all states.

current behaviuor:

current

Expected:

expected

komalk’s picture

Status: Needs work » Needs review
StatusFileSize
new6.18 KB
new658 bytes
new78.87 KB
new79.39 KB

@Indrajith KB Thank you for the review.

by default button text font-weight:700 but on hover, focus, active it's changing to font-weight:normal(overriding by core/assets/vendor/jquery.ui/themes/base/theme.css) which is not expected behaviour we need to keep the font-weight:700 for all states.

#15 did the changes attached the screen short for the reference

indrajithkb’s picture

hi @komalkolekar please see the #9 comment and check both css. Right now you just copied all the styles from core css (we extending the library so no need to write the styles again). just add your styles which helps to fix the issue. please update the patch.

indrajithkb’s picture

Status: Needs review » Needs work
komalk’s picture

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

@Indrajith KB Thank you for the review did the changes mentioned in #17.

komalk’s picture

StatusFileSize
new1.88 KB

refer the patch #20

indrajithkb’s picture

HI @komalkolekar patch is looking good. Can you please try to follow the proper nesting style which we are using throughout Olivero (Comment #4 and 5th point from @mherchel). It will be more appreciable if you are updating accordingly.

komalk’s picture

StatusFileSize
new1.92 KB
new1.39 KB

@Indrajith KB Thank you for review update the patch with proper nesting style.

komalk’s picture

StatusFileSize
new1.92 KB

forget to run the css lint.
Review the patch #23.

indrajithkb’s picture

HI @komalkolekar great work thanks for the patch.
Issue has found fixed, not adding the screenshots again.

am adding as RTBC +1

We can wait for the review from @mherchel

steinmb’s picture

Version: 8.x-1.0-alpha2 » 8.x-1.x-dev
Priority: Minor » Normal

jQuery UI is on it's way out of core https://www.drupal.org/node/3067969 and gone in D9 and this theme is aiming for core inclution. Would not including code like this make it harder to get it approved and committed?

kostyashupenko’s picture

Status: Needs review » Needs work
Issue tags: +Needs issue summary update
StatusFileSize
new1.92 KB
new28.01 KB

Just a reroll, but honestly i don't like the way about to manage inline buttons from this patch at all. Styles provided are not universal for all languages:

For example FR language
dialog buttons

It can be any language actually and styles might be broken if language is not EN in terms of this patch.

I see 2 points how we can deal with it:
1. I'm not against if one button will be under another, i mean why it must be inline ?
2. In case if inline is really expected - then this task needs additional fixes or with data-dialog-options attribute with wider width property, or we can even rewrite width for all dialogs -> by default width is 300px

Or maybe we can totally rewrite dialog component from core with own design and custom styles ?

mherchel’s picture

This is a relatively minor issue that most people won't encounter. I don't want to add technical debt by doing a complicated fix.

@kostyashupenko is correct that this should work across language. and that having the buttons wrap isn't too bad.

Instead of the fix above, maybe we can reduce the width/height/font-size of the buttons so they fit? This would be a global fix to the jQueryUI dialogs within the theme.

matija5’s picture

I like what @kostyashupenko said, not being against if one button is under another. Comparing to small screens, this also happens with other buttons if I narrow screen to 300px wide and the buttons width is bigger than parent.

hansa11’s picture

Assigned: Unassigned » hansa11

I agree with the points that @Kostyashupenko has mentioned in #26, having a button under the other and not inline is not that bad and it should be a global fix to all the dialogs within the theme.

I'll take a look at this one OR @kostyashupenko since this is your suggestion, you can assign it to yourself
I'll probably start on it in the second half tomorrow, if you wish to pick this one up, please feel free to assign it to yourself :)

hansa11’s picture

Assigned: hansa11 » Unassigned
hansa11’s picture

Assigned: Unassigned » hansa11
hansa11’s picture

Status: Needs work » Needs review
StatusFileSize
new3.88 KB
new166.95 KB
new173.08 KB

Patch details:

1. Extended the core's library for dialog.
2. Fixed the buttons to be inline.
3. Added few more styles to give ui-dialog box the Olivero touch.

Please review.

Before Patch:

before patch 32

After Patch:

after patch

Thanks!

hansa11’s picture

Assigned: hansa11 » Unassigned
sd9121’s picture

Assigned: Unassigned » sd9121
sd9121’s picture

Assigned: sd9121 » Unassigned
Status: Needs review » Reviewed & tested by the community
StatusFileSize
new103.02 KB
new160.65 KB

Hi @hansa11

Great work on the dialog box, I like how you have matched it to the Olivero styles.

I have reviewed it and this applies well to me.

english

multilingual

mherchel’s picture

Project: Olivero » Drupal core
Version: 8.x-1.x-dev » 9.1.x-dev
Component: User interface » Olivero theme
Priority: Normal » Minor
Status: Reviewed & tested by the community » Needs work
hansa11’s picture

Assigned: Unassigned » hansa11

Looking into this.

hansa11’s picture

Assigned: hansa11 » Unassigned
Status: Needs work » Needs review
StatusFileSize
new88.19 KB
new90.91 KB
new102.53 KB
new4.32 KB

Before Patch:
before patch

After Patch:
after patch

Please review.

Thanks!

mherchel’s picture

Status: Needs review » Needs work
StatusFileSize
new35.4 KB

This is looking good (with one change). I really like the idea of extending core/drupal.dialog, as there are a number of jQueryUI issues that are caused by our larger form controls.

The only change is that we need to set flex-wrap: wrap on .ui-dialog-buttonset, so that the text will wrap if the button text is longer (which can happen when the text is translated - see #26)

hansa11’s picture

Assigned: Unassigned » hansa11
hansa11’s picture

Assigned: hansa11 » Unassigned
Status: Needs work » Needs review
StatusFileSize
new4.47 KB
new71.12 KB
new106.5 KB

image with english language

Long word in button

@mherchel: Thank you for the review :)

Added the wrap for long words, please review.

Thanks!

Status: Needs review » Needs work

The last submitted patch, 41: 3149863-41.patch, failed testing. View results

hansa11’s picture

Assigned: Unassigned » hansa11
hansa11’s picture

Status: Needs work » Needs review
StatusFileSize
new4.47 KB
hansa11’s picture

Assigned: hansa11 » Unassigned
mherchel’s picture

Status: Needs review » Reviewed & tested by the community

Looks great. Tested with long text (buttons wrap as expected), and verified CSS linting.

mherchel’s picture

lauriii’s picture

Version: 9.1.x-dev » 9.2.x-dev
Priority: Minor » Normal
Status: Reviewed & tested by the community » Needs work

Sorry for the delay on my review. I was taking time off for 2 weeks ☀️

This change looks like a great improvement! I think this is at least worth a normal priority so changing that.

+++ b/core/themes/olivero/css/components/dialog.pcss.css
@@ -0,0 +1,83 @@
+    word-break: break-word;

According to https://developer.mozilla.org/en-US/docs/Web/CSS/word-break#Values, word-break: break-word is deprecated. Wondering if we could leave this out from here and come up with a solution to this in #3177475: Olivero: Ensure long words break properly when zoomed in to provide proper reflow.

komalk’s picture

Status: Needs work » Needs review
StatusFileSize
new97.36 KB
new4.52 KB
new1.02 KB

Worked on #48.
Instead of word-break: break-wordusingoverflow-wrap: break-word; work as expected
Attached screenshot for reference.
Review the patch.

ranjith_kumar_k_u’s picture

StatusFileSize
new47.62 KB
new52.54 KB
new67.36 KB

The above patch works fine.
Before patch
before patch

After patch
after patch

after patch

ranjith_kumar_k_u’s picture

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

Status: Reviewed & tested by the community » Needs review
+++ b/core/themes/olivero/css/components/dialog.pcss.css
@@ -33,12 +33,13 @@
   & .ui-button {
+    display: inline-block;

Why do we need to change this to inline-block? Asking because I didn't find any relevant feedback and there's not explanation in #49.

komalk’s picture

StatusFileSize
new97.98 KB
new99.75 KB

1. word-wrap: break-word; - Not sufficient to get the desired output the word overflows out of the window.
2. To avoid the overflow - display: inline-block;
Attached the screenshot for reference one is without using display: inline-block; and one is with using.
Please correct me if I am wrong.

djsagar’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new124.54 KB
new70.13 KB
new150.54 KB
new54.34 KB

Hi,

#49 is resolving this bug for prove i shared attachment please review,

Thanks!

lauriii’s picture

Status: Reviewed & tested by the community » Needs work

According to the CI, the CSS source file is not synced with the compiled CSS file.

kostyashupenko’s picture

Status: Needs work » Needs review
StatusFileSize
new4.46 KB
new1.8 KB

Hello, the thing asked in previous comment is fixed - now both files synced. But can anyone please point me of why overflow-wrap: break-word; and display: inline-block; were used for .ui-button selector? On my side all works fine without these two properties. I did tests in Chrome/FF/Safari/IE11. Tests were done with short text and long text (like multiple lines for each button). Maybe i don't understand something, but i removed these two for now.

So this task needs re-tests

Status: Needs review » Needs work

The last submitted patch, 56: 3149863-56.patch, failed testing. View results

benjifisher’s picture

Please do not ask the testbot to try again until #3207086: [HEAD BROKEN] Consistent failure in MonthDatePluginTest is fixed.

alexpott’s picture

Status: Needs work » Reviewed & tested by the community
lauriii’s picture

Status: Reviewed & tested by the community » Needs review

Based on #59, this still needs a review.

gauravvvv’s picture

Patch #56, seems fine to me. Adding after-patch screenshot for reference.

Moving to RTBC +1.

gauravvvv’s picture

Status: Needs review » Reviewed & tested by the community

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.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 56: 3149863-56.patch, failed testing. View results

catch’s picture

Status: Needs work » Reviewed & tested by the community

Restoring status after HEAD was broken.

lauriii’s picture

Status: Reviewed & tested by the community » Needs review
Issue tags: +Needs subsystem maintainer review

Since this impacts positioning of buttons in all dialogs, I think it would be useful to get a review from the Olivero maintainers.

rinku jacob 13’s picture

StatusFileSize
new113.97 KB
new114.83 KB

i think the patch #56 is applicable for drupal 9.3.x-dev.
i tested the patch with drupal 9.3.x-dev. i got the solution correctly.Adding screenshot for the reference

Agnesh Tank’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new472.52 KB
new402.8 KB

Verified and tested patch#56 on Olivero 9.3.0-dev version with 9.3.x-dev

Patch applied successfully and result is Acceptable.

Testing Steps:

  1. Install Drupal 9.3.x-dev version.
  2. Go to Appearance -> Set Olivero theme as admin and default theme
  3. Edit the node and click the Preview button.
  4. Click the site title and check the dialog popup.
  5. Preview and cancel button should be in an aligned position.
  6. Now apply the patch and clear the cache.
  7. Verify the popup dialog box button alignment for Cancel & Preview

Testing Output:

After applying the patch the button alignment for the Cancel & preview button started showing properly in the popup dialog box

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 56: 3149863-56.patch, failed testing. View results

sakthivel m’s picture

Issue tags: +Needs reroll
sakthivel m’s picture

Status: Needs work » Needs review
StatusFileSize
new4.5 KB

#70 Please review the patch

mherchel’s picture

Title: jQuery UI "Leave Preview" dialog buttons not aligned » Olivero: jQuery UI "Leave Preview" dialog buttons not aligned
Priority: Normal » Minor

Haven't reviewed this yet, but I want to add a note that jQueryUI is being deprecated.

chetanbharambe’s picture

Status: Needs review » Needs work
StatusFileSize
new344.99 KB
new412.99 KB

Verified and tested patch #71.
The patch does not apply successfully.

Please refer attached screenshots.
Moving to Needs work.

kishor_kolekar’s picture

Status: Needs work » Needs review
StatusFileSize
new4.53 KB
new479 bytes

re-roll patch #71
please review the patch.

chetanbharambe’s picture

Status: Needs review » Needs work
StatusFileSize
new392.83 KB
new393.02 KB

Verified and tested patch #74.
The patch does not apply successfully.

Please refer attached screenshots.
Moving to Needs work.

xjm’s picture

Title: Olivero: jQuery UI "Leave Preview" dialog buttons not aligned » Olivero: Modal dialog "Leave Preview" dialog buttons not aligned
Priority: Minor » Normal

Normal priority bug under the normal issue priority definition:

Bugs for site visitors that do not interfere with site use, for example, visual layout issues.

(If it were actually only related to jQuery UI it could be demoted to minor, or it can be re-demoted if it turns out that the Dialog replacement, once added, does not have the same issue. But in this case it's about the modal.)

xjm’s picture

Title: Olivero: Modal dialog "Leave Preview" dialog buttons not aligned » Olivero: Modal dialog buttons not aligned (for example, in the "Leave preview" dialog)
kostyashupenko’s picture

Issue tags: -Needs reroll
bnjmnm’s picture

The current patches seem to add a good amount of CSS for something that seems like it can be addressed with only a few lines. All the additional CSS is of particular concern since it would impact all dialogs, not just the node preview one.

Two options come to mind:

  • The issue as reported could be addressed if the dialog was 30px wider. If you can find a way to set a min-width on just this dialog (not styling all dialogs, as the current patches do), that would take care of it. It seems reasonable to make the dialog default width a bit wider in Olivero since text and spacing is larger than its predecessor.
  • Something that would impact all dialogs, but may be nondisruptive enough to be approved by Olivero's designers is reducing button size in some way within dialog buttonpanes:

    For example, this single rule addresses the reported issue without altering the button appearance much.

    .ui-dialog-buttonpane .button {
    padding-left: 1.3rem;
    padding-right: 1.3rem;
    }

Also worth considering that the button lengths are going to be different depending on the language the site is in. Whatever solution works for Engligh should probably grant some additional spaces for potentially longer labels on non-English sites. (though also important to keep in mind that buttons apoearing on different lines is also not a major concern)

vikashsoni’s picture

StatusFileSize
new29.79 KB
new26.66 KB

Applied patch #74 working fine
After patch the button alignment is good and working fine for ref sharing screenshot

radheymkumar’s picture

StatusFileSize
new24.43 KB
new25.11 KB

patch #74 working fine sharing screenshot --

bnjmnm’s picture

Removing credit for #81, a second set of screenshots is not necessary immediately after ones were provided, and the colors are different from Olivero so it's not clear if Olivero is even the theme represented.

The next best steps are addressing #79 -- the current fix is very elaborate and difficut to truly review, it adds a bunch of CSS not specific to the reported issue. A small amount of CSS that targets this specific issue is preferable.

cindytwilliams’s picture

Issue summary: View changes
Status: Needs work » Needs review
StatusFileSize
new1.37 KB
new27.74 KB
new27.55 KB
new42.62 KB

Per bnjmnm's comments in #79 and #82, here is a patch that targets just this dialog in this theme, sets the min-width to 400px and aligns the buttons on the left.

English

This is 100px wider than the default, granting additional space for longer button labels in other languages.

Spanish

Mobile remains unchanged.

Mobile

ranjith_kumar_k_u’s picture

StatusFileSize
new1.31 KB
new997 bytes

Fixed CS issue.

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.

kristen pol’s picture

@cindytwilliams It's useful to provide an interdiff when updating a patch: https://www.drupal.org/docs/develop/git/using-git-to-contribute-to-drupa...

Checked and the patch applies cleanly to 9.3, 9.4, and 10. Needs testing for all versions so tagging.

Satyajit1990’s picture

Assigned: Unassigned » Satyajit1990
StatusFileSize
new71.8 KB
new68.62 KB

I have verified with the version 9.4 and It looks good to me.
Tested patch #84

Testing steps :

1. Install Drupal 9.4.x-dev version.
2. Go to Appearance -> Set Olivero theme as admin and default theme
3. Edit the node and click the Preview button.
4. Click the site title/logo and check the dialog popup.
5. Preview and cancel button should be in an aligned position.
6. Now apply the patch and clear the cache.
Verify the popup dialog box button alignment for Cancel & Preview

Testing Output:

After applying the patch the button alignment for the Cancel & preview button showing properly in the popup dialog box

kristen pol’s picture

Assigned: Satyajit1990 » Unassigned

@Satyajit1990 Thanks for testing. Would you test on versions 9.3 and 10 as well? The same patch applies cleanly to all versions. You can use simplytest.me for testing the other versions as, right now, DrupalPod only is defaulting the Drupal version so it's the same as what's on the issue (9.4 in this case). Thanks.

Satyajit1990’s picture

Hi Kristen,
Verified with the version 9.3 by using simplytest.me
And It works for me after applying patch #84

Screenshot for reference :

I am unable to verify with the version 10 as getting syntax error after applying the patch

kristen pol’s picture

Thanks for testing on Drupal 9.3.

1. Testing on Drupal 10 is still needed.

2. This needs code review from a frontend developer. The !important makes me wonder if this is a good approach.

kristen pol’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: -Needs manual testing

I have found out from @catch that, since the patch applies cleanly to 9.3, 9.4, and 10 and it was already tested on 9.4 then we don't have to test on 10.

At this point, it just needs a review from the Olivero team so I'll mark RTBC since:

1. Patch applies cleanly to 9.3, 9.4, and 10.

2. Patch appears to only address issue in the issue summary.

3. Title and issue summary are fairly clear (though it's not using the template).

4. Tests pass.

5. Manual testing passes on 9.4.

6. Not sure specific test could be added for this.

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.

larowlan’s picture

Still needs a +1 from @mherchel

+++ b/core/themes/olivero/css/components/ui-dialog.pcss.css
@@ -9,3 +12,12 @@
+    float: inherit !important;

It would be nice if we could use css layers.

Putting jquery UI css into a lower layer would avoid the need for !important here I assume

bnjmnm’s picture

Status: Reviewed & tested by the community » Needs work
StatusFileSize
new330.64 KB
  1. +++ b/core/themes/olivero/css/components/ui-dialog.css
    @@ -4,13 +4,25 @@
    +  html[data-once="node-preview"] .ui-dialog {
    

    The issue summary used the node preview dialog as an example of the issue, but the solution should not be targeted at just node preview dialogs. this is something that could happen with any dialog with multiple buttons in the pane where they occupy > 300px (the jQuery ui dialog default width)

  2. +++ b/core/themes/olivero/css/components/ui-dialog.css
    @@ -4,13 +4,25 @@
    +    min-width: 25rem;
    

    Providing a specific width so this specific dialog is wider doesn't address the underlying issue either. An explicit width assumes the buttons will not be any longer when translated into other languages. We need a solution where the modal width is dynamically calculated based on it's content as it initializes

  3. Notice that the dialog settings are to already set automatically determine width. This likely means that the width is calculated to the default of 300 before the buttonpane is even present

    This could be addressed by listening to the dialog:aftercreate event and setting the dialog minimum width to accommodate the combined width of the button pane buttons (+ their margins)
ameymudras’s picture

Status: Needs work » Needs review
StatusFileSize
new3.89 KB
new3.44 KB

Thanks @bnjmnm for the suggestion, Ive tried to use dialog:aftercreate event to calculate the min-width for the UI dialog. I have made some css changes too to get rid of specific min-width

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.

kristen pol’s picture

Issue tags: +Needs manual testing

Thanks for the update. Tagging for testing with new patch.

Harish1688’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new1.19 MB
new1.24 MB

@ameymudras,
Tested the bug with version 10.1 and tried the patch 3149863-95.patch that's working fine for me.
attached the screenshot, good for RTBC.

bnjmnm’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs issue summary update
  1. +++ b/core/themes/olivero/css/components/ui-dialog.pcss.css
    @@ -9,3 +12,13 @@
     }
    +
    

    The problem with the width calculation is that .ui-dialog-buttonset is set to float: right. Fortuately, fewer floats are a good thing.

    Give .ui-dialog-buttonset a float: none and a margin-left: auto (and reverse it for RTL)

    .ui-dialog-buttonset {
      display: flex;
      float: none;
      margin-left: auto; // this will need an RTL equivalent
    }
    

    Then make .ui-dialog-buttonpane display:flex as well. Doing this makes it so the margin-left: auto in .ui-dialog-buttonset positions it the same way float: right BUT! in a manner that results in a properly calculated dialog width.

    .ui-dialog-buttonpane {
      display: flex;
    }
    
  2. +++ b/core/themes/olivero/css/components/ui-dialog.pcss.css
    @@ -9,3 +12,13 @@
    +@media (--sm) {
    +  .ui-dialog-buttonset {
    +    display: flex;
    +  }
    +}
    

    Remove the media query here so it is always flex and the buttons stack when the viewport is narrower than their total width

  3. +++ b/core/themes/olivero/js/ui-dialog.es6.js
    @@ -0,0 +1,35 @@
    +  Drupal.behaviors.UiDialogUpdateSize = {
    +    attach() {
    +      $(window).on(
    +        'dialog:aftercreate',
    +        (event, dialog, $element, settings) => {
    +          const $buttonPane = $('.ui-dialog .ui-dialog-buttonpane');
    +          let minWidth =
    +            parseFloat($buttonPane.css('paddingRight')) +
    +            parseFloat($buttonPane.css('paddingLeft')) +
    +            20;
    +          $buttonPane.find('.ui-button').each(function () {
    +            minWidth +=
    +              $(this).outerWidth() +
    +              parseFloat($(this).css('marginRight')) +
    +              parseFloat($(this).css('marginLeft'));
    +          });
    +          $('.ui-dialog').css('min-width', minWidth);
    +        },
    +      );
    +    },
    +  };
    

    On mobile devices, this approach can result in a dialog wider than the viewport, which shouldn't happen. Fortunately, I think this JavaScript can be removed entirely. I think it's a clever solution, but it also looks like quite a bit of logic for a fairly small UI change which should be avoided when possible if only to have less code to maintain long term. Fortunately, I believe a CSS only solution is possible.

Also, the issue summary has things like screenshots of CSS lint and the simpletest home screen that should be cleaned up. Those don't belong in an issue summary as their absence would not result in any less understanding of the issue reported. The issue summary does not need to mirror the comments, it only needs to be updated with broad information regarding diagnosis and outcome.

ameymudras’s picture

Assigned: Unassigned » ameymudras
gauravvvv’s picture

Issue summary: View changes

Cleaned up Issue summary.

gauravvvv’s picture

Status: Needs work » Needs review
StatusFileSize
new5.92 KB

Tried to address comment #99 feedback. I have added patch for same. Please review

_utsavsharma’s picture

StatusFileSize
new517 bytes
new5.92 KB

Tried to fix CCF for #102.
Please review.

needs-review-queue-bot’s picture

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

The Needs Review Queue Bot tested this issue. It either no longer applies to Drupal core, or fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".

Apart from a re-roll or rebase, this issue may need more work to address feedback in the issue or MR comments. To progress an issue, incorporate this feedback as part of the process of updating the issue. This helps other contributors to know what is outstanding.

Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

gauravvvv’s picture

Status: Needs work » Needs review
StatusFileSize
new1.38 KB
new5.28 KB

Fixed CCF, attached interdiff for same.
Also we're not using any variables in the file, so I have removed the import of variable file as well.

nayana_mvr’s picture

StatusFileSize
new74.43 KB
new69.32 KB

Verified the patch #105 and tested it on Drupal version 10.1.x with Olivero theme. The patch works fine and I have added the before and after screenshots for reference.

smustgrave’s picture

#101 updated issue summary so removing that tag.

+1 For me as this does solve the issue at hand. Not moving as still need review from olivero maintainers.

andy-blum’s picture

Assigned: ameymudras » Unassigned
Status: Needs review » Needs work
StatusFileSize
new71.09 KB
new73.28 KB
new97.13 KB

This looks good, and I think would probably be fine, but the fact that we're targeting all ui-dialogs in Olivero is reason enough to make sure this is bulletproof. As much as the design looks better with the buttons in alignment, it's more important that we don't introduce regressions in the UI.

.ui-dialog {
  & .ui-button {

    &:last-child {
      margin-inline-end: 0;
    }
  }
}

This is targeting all buttons that are the last child in their wrapper, including the close button. This doesn't appear to change anything as that button doesn't have a margin, but since we're already digging into the buttonpane and buttonset wrappers later, we might as well limit the scope of this rule.

.ui-dialog {

  & .ui-dialog-buttonpane {
    padding-inline-start: 0.2em;
    padding-inline-end: 0.2em;

    & .ui-dialog-buttonset {
      display: flex;
      float: none;
    }
  }
}

Since we're setting the buttonset to display:flex;, I think we ought to consider a few things:

  1. If we add flex-wrap: wrap; to the buttonset element, that will allow buttons to wrap to the second line if they need it, before wrapping extremely long text and overflowing the button's boundaries.


  2. If we space the buttons in the buttonpane using the gap property, we don't have to worry about margins on any hypothetical 3rd buttons.

pradipmodh13’s picture

StatusFileSize
new1.42 KB
new744 bytes

Hello @andy-blum,

Added flex-wrap: wrap in ui-dialog-buttonset for global implementation.

Please review.

pradipmodh13’s picture

Status: Needs work » Needs review
andy-blum’s picture

Status: Needs review » Needs work

I know it's sandwiched between the images, but still needs point #2 from my earlier review:

If we space the buttons in the buttonpane using the gap property, we don't have to worry about margins on any hypothetical 3rd buttons.

akram khan’s picture

StatusFileSize
new1.41 KB
new395 bytes

added patch and fixed CCF #109

pradipmodh13’s picture

Status: Needs work » Needs review
StatusFileSize
new1.41 KB
new1.3 KB

Hello @andy-blum,

Added gap property for button layout to handle global implementation.

Please review.

andy-blum’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: -Needs subsystem maintainer review
StatusFileSize
new128.39 KB

This looks good to me. Thanks @pradipmodh13

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 113: 3149863-113.patch, failed testing. View results

smustgrave’s picture

Status: Needs work » Reviewed & tested by the community

Seems to be random failure.

  • lauriii committed 1d97f058 on 10.1.x
    Issue #3149863 by komalk, hansa11, Gauravvvv, kostyashupenko,...
lauriii’s picture

Status: Reviewed & tested by the community » Fixed

Committed 1d97f05 and pushed to 10.1.x. Thanks!

quietone’s picture

Issue tags: -Needs manual testing

It looks like manual testing was done in #144. I am removing the tag.

Status: Fixed » Closed (fixed)

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