Closed (fixed)
Project:
Drupal core
Version:
11.x-dev
Component:
Claro theme
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
9 May 2023 at 06:49 UTC
Updated:
25 Jul 2023 at 20:09 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #3
utkarsh_33 commentedPFA the screenshot with the css changes applied.
Comment #4
utkarsh_33 commentedComment #5
santosh_verma commentedworking on this
Comment #6
smustgrave commentedSo if claro is enabled as the default theme the preview page doesn't function at all.
If olivero is then the buttons are aligned fine.
So not seeing this issue, think it could use additional steps.
Comment #8
gauravvvv commentedAdded related issue "Olivero: Modal dialog buttons not aligned (for example, in the ""Leave preview"" dialog)"
Do we support using Claro as a default theme.
Comment #9
santosh_verma commented@smustgrave, Yes If we set the Claro theme as the default, it appears to be causing an issue as described. However, when using the Olivero theme, everything seems to be working fine.
Tested Drupal Version: 10.1.x-dev
The steps to reproduce is the same as mention above
1) Go to edit node
2) Click on Preview button at the bottom.
3) Click on logo or website title on Navbar.
I reviewed the Mr #3959,
patch applied successfully and solved the issue
before

after

but there a little more space to improve the code like
1. we can write more logical and nested css for block
2. we can remove float: none as there is no use of this.
Comment #11
utkarsh_33 commentedI think the approach proposed by @Ben seems to be more efficient than it's counter CSS workaround implemented in 3359012-claro-modal-dialog.It recalculates the width of the ui-dialog box based on the combined width of the buttons and then assign the width to the ui-dialog box so that the buttons fit inline with each other.I have attached the screenshots for further refferences.
Comment #13
utkarsh_33 commentedClosing the other MR and Marking it as RTBC as everything seems to work as intended.I have also attached the screen shots for the same in #11.
Comment #14
lauriiiAdded comment on the MR.
Comment #17
hooroomooComment #18
smustgrave commentedConfirmed the bug is fixed still.
Think it's good to get these things fixed but can't imagine people using claro for previewing. The preview page has many issues in claro.
Comment #19
bnjmnmI'm not sure about 42 additional lines of code for what @smustgrave points out in #18 is a pretty unlikely edge case. This may be the result of something I was trying out in an MR earlier but I think I may have been overcomplicating it. There have been scenarios where the dialog width calculation is confused by the moving of the submit buttons, but it doesn't seem to be a problem here.
I did a quick test of adding a single additional line of CSS and it seemed to work, but perhaps I missed something earlier in the thread eliminated that as a solution? Or maybe I just poisoned the well with convoluted JS?
Comment #20
hooroomooRemoved the JS, and added display: flex.
Comment #21
smustgrave commentedVerified the bug is still fixed doing same tests as before.
Comment #22
lauriiiRemoving the margin creates a regression to some other dialog forms:

Comment #23
hooroomooOnly adding display: flex causes the Leave preview text on the button to break into two lines. I applied the CSS from comment #9 and it looks good on the preview and other modal dialogs i looked at.
Comment #24
hooroomooComment #25
preeti.chawla commented@Utkarsh_33 I applied the CSS from comment #9 and it working or looks fine on the preview and other modal dialogs. We can move to RTBC
please refer Screenshot
Comment #26
preeti.chawla commentedComment #27
smustgrave commentedTested the view dialog mentioned in #22 and don't see any regression
Comment #30
lauriiiCommitted aa42e23 and pushed to 11.x. Thanks!