Improve horizontal alignment so that elements are aligned on a vertical line.

Currently the alignment is a bit mixed but should be nicely aligned.

Current
Current alignment

Possible alignement fix
Possible alignment fix

See also a related issue #3086710: Primary tabs visually not aligned on left with other element

CommentFileSizeAuthor
#65 AfterFixIssue.png96.06 KBdivya.sejekan
#65 BeforeFix.png94.36 KBdivya.sejekan
#59 3086780-nr-bot.txt150 bytesneeds-review-queue-bot
#55 issue3086780_2.png39.62 KBlaisbonafe
#55 issue3086780_1.png38.69 KBlaisbonafe
#47 3086780-47.patch9.44 KBgauravvvv
#47 interdiff-3086780-37_47.txt3.15 KBgauravvvv
#43 tabs_alignment_update.png25.04 KBsaschaeggi
#42 tabs_alignment.png53.78 KBsaschaeggi
#41 visual-feedback.png115.43 KBckrina
#39 After Patch 3086780 Responsiveness2.png290.88 KBchetanbharambe
#39 After Patch 3086780 Responsiveness.png230.47 KBchetanbharambe
#39 After Patch 3086780 Desktop.png321.83 KBchetanbharambe
#39 Before patch 3086780 Responsiveness.png224.7 KBchetanbharambe
#39 Before Patch 3086780 Desktop.png355.94 KBchetanbharambe
#37 3086780.37.patch9.47 KBsakthivel m
#33 After--patch--3.jpg127.67 KBranjith_kumar_k_u
#33 After--patch--2.jpg236.3 KBranjith_kumar_k_u
#33 After--patch--1.jpg243.92 KBranjith_kumar_k_u
#33 Before--patch--3.jpg104.35 KBranjith_kumar_k_u
#33 Before--patch--2.jpg241.26 KBranjith_kumar_k_u
#33 Before--patch--1.jpg230.44 KBranjith_kumar_k_u
#31 interdiff_28-31.txt905 byteskomalk
#31 3086780-31.patch8.4 KBkomalk
#30 interdiff_28-30.txt691 byteskomalk
#30 3086780-30.patch8.79 KBkomalk
#28 After(Desktop).png192.12 KBkomalk
#28 After.png115.67 KBkomalk
#28 before.png99.74 KBkomalk
#28 interdiff_27-28.txt259 byteskomalk
#28 3086780-28.patch7.83 KBkomalk
#27 3086780-27.patch7.46 KBkomalk
#25 Screen Shot 2020-07-08 at 11.03.12 AM.png140.14 KBkomalk
#23 selected_9240.png125.66 KBKondratievaS
#22 before-patch-comment.png157.76 KBkomalk
#22 after-patch-comment.png150.51 KBkomalk
#22 after-patch-content.png163.48 KBkomalk
#22 before-patch-content.png182.74 KBkomalk
#22 interdiff_11-22.txt1.71 KBkomalk
#22 3086780-22.patch7.4 KBkomalk
#20 Comments_tab.png95.08 KBdeepalij
#20 Bottom button alignment.png104.83 KBdeepalij
#17 Screenshot 2020-06-24 at 2.37.47 PM.png300.33 KBkiran.kadam911
#15 after_patch3.png300.02 KBkiran.kadam911
#15 after_patch2.png273.86 KBkiran.kadam911
#15 after_patch1.png264.73 KBkiran.kadam911
#15 after_patch_comment.png237.76 KBkiran.kadam911
#15 after_patch_content.png234.39 KBkiran.kadam911
#15 before_patch.png234.85 KBkiran.kadam911
#12 3086780-11.patch6.27 KBasmita26
#8 claro_theme_content_tab.png247.35 KBasmita26
#8 claro_theme_commments_tab.png204.83 KBasmita26
#8 3086780-8.patch2.54 KBasmita26
possible_alignment.png65.62 KBsaschaeggi
current_alignment.png43.71 KBsaschaeggi

Issue fork drupal-3086780

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

saschaeggi created an issue. See original summary.

saschaeggi’s picture

Title: Improve vertical alignment » Improve vertical axis alignment
Issue summary: View changes
lauriii’s picture

Title: Improve vertical axis alignment » Improve horizontal alignment so that elements are aligned on a vertical line
Issue summary: View changes
huzooka’s picture

Project: Claro » Drupal core
Version: 8.x-2.x-dev » 8.9.x-dev
Component: Needs design » Claro theme

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

asmita26’s picture

Assigned: Unassigned » asmita26
asmita26’s picture

@saschaeggi Are you talking about alignment of inner elements?

asmita26’s picture

Assigned: asmita26 » Unassigned
Status: Active » Needs review
StatusFileSize
new2.54 KB
new204.83 KB
new247.35 KB

Fixed horizontal alignment of inner elements. Please refer following screenshots as well.

hansa11’s picture

Assigned: Unassigned » hansa11
indrajithkb’s picture

Status: Needs review » Needs work

Hi @asmita26 please update the patch with pcss.css file.

asmita26’s picture

Assigned: hansa11 » asmita26
asmita26’s picture

StatusFileSize
new6.27 KB

Updated the patch with pcss.css files.

asmita26’s picture

Assigned: asmita26 » Unassigned
Status: Needs work » Needs review
kiran.kadam911’s picture

Assigned: Unassigned » kiran.kadam911
kiran.kadam911’s picture

Assigned: kiran.kadam911 » Unassigned
Issue summary: View changes
Status: Needs review » Reviewed & tested by the community
StatusFileSize
new234.85 KB
new234.39 KB
new237.76 KB
new264.73 KB
new273.86 KB
new300.02 KB

Patch #12 applies successfully and It's working as expected. Here I have attached some screenshots of tested pages.

Before:

After:

Thanks!

saschaeggi’s picture

Status: Reviewed & tested by the community » Needs work

Thanks all for your work! Now that I review this (also with the bigger padding then in the version I initially used) it would look way cleaner with aligning the following items to the left baseline:

  • Breadcrumb
  • Title
  • Local Actions

One thing I noticed in the screenshots is that in the table the "Title" is not aligned with the other items on the left. Maybe this is due to missing data. But this should be also aligned with the other items like the breadcrumb and Input fields.

The rest of the alignment is perfect now!

kiran.kadam911’s picture

Status: Needs work » Needs review
StatusFileSize
new300.33 KB

@saschaeggi SS after adding content and in table alignment of select box column is aligned with the other items.

If is there anything I missed please add.

Thanks!

deepalij’s picture

Assigned: Unassigned » deepalij
saschaeggi’s picture

@kiran.kadam911 perfect! didn't think of the checkbox at this point ;)

deepalij’s picture

Assigned: deepalij » Unassigned
Status: Needs review » Needs work
StatusFileSize
new104.83 KB
new95.08 KB

Verified and tested by applying patch #12. Patch applied successfully but the issue still exists.

Testing Result:
All the content is aligned to left except:
1. Bottom 'Apply to Selected Items' button on the 'Content' tab
2. Action dropdown and Apply button on the 'Comments' tab

See attached screenshots

asmita26’s picture

Assigned: Unassigned » asmita26
komalk’s picture

Status: Needs work » Needs review
StatusFileSize
new7.4 KB
new1.71 KB
new182.74 KB
new163.48 KB
new150.51 KB
new157.76 KB

#20
1. Bottom 'Apply to Selected Items' button on the 'Content' tab -Done
2. Action dropdown and Apply button on the 'Comments' tab -Done

Please review the patch #22 attached the screenshot for the reference.

KondratievaS’s picture

StatusFileSize
new125.66 KB

Tested patch from #22 and result is OK
But how we should align Show all columns link for mobile?

bug

KondratievaS’s picture

Status: Needs review » Needs work
komalk’s picture

StatusFileSize
new140.14 KB

But how we should align Show all columns link for mobile?

Tested the patch on mobile attached the screenshot for the reference and the result is OK.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

komalk’s picture

StatusFileSize
new7.46 KB

#23 failed to apply on 9.2.x
Re-rolled the patch.

komalk’s picture

Assigned: asmita26 » Unassigned
Status: Needs work » Needs review
StatusFileSize
new7.83 KB
new259 bytes
new99.74 KB
new115.67 KB
new192.12 KB

Fixed the issue mentioned in #23
https://www.drupal.org/project/drupal/issues/3086780#comment-13735031
Attached screenshot for the reference.

Status: Needs review » Needs work

The last submitted patch, 28: 3086780-28.patch, failed testing. View results

komalk’s picture

Status: Needs work » Needs review
StatusFileSize
new8.79 KB
new691 bytes

Worked on the failed test cases.

komalk’s picture

StatusFileSize
new8.4 KB
new905 bytes

Worked on the failed test cases.

The last submitted patch, 30: 3086780-30.patch, failed testing. View results

ranjith_kumar_k_u’s picture

StatusFileSize
new230.44 KB
new241.26 KB
new104.35 KB
new243.92 KB
new236.3 KB
new127.67 KB

The above patch works fine.
Before patch

before patch

before patch

before patch

After patch

after patch

after patch

after patch

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.

sakthivel m’s picture

#31 Patch failed

sakthivel m’s picture

Status: Needs review » Needs work
sakthivel m’s picture

Status: Needs work » Needs review
StatusFileSize
new9.47 KB

#37 Please review the patch

chetanbharambe’s picture

Assigned: Unassigned » chetanbharambe
chetanbharambe’s picture

Assigned: chetanbharambe » Unassigned
Status: Needs review » Reviewed & tested by the community
StatusFileSize
new355.94 KB
new224.7 KB
new321.83 KB
new230.47 KB
new290.88 KB

Verified and tested patch #37.
Patch applied successfully and looks good to me.

Testing Steps:
# Goto: Appearance -> Apply Claro theme
# Goto: admin/content
# Horizontal alignment elements not in the correct way

Expected Results:
# Improve horizontal alignment so that elements are aligned on a vertical line

Actual Results:
# Currently the alignment is a bit mixed and going outside

Please check the attached screenshots.
Can be a move to RTBC.

ckrina’s picture

Status: Reviewed & tested by the community » Needs work
  1. +++ b/core/themes/claro/css/base/variables.pcss.css
    @@ -65,6 +65,7 @@
    +  --space-xm: 2rem; /* 2 * 16px = 32px */
    

    We better do not introduce new variables that can be calculated just using calc() or we'll have troubles naming them in the future.

  2. +++ b/core/themes/claro/css/base/variables.pcss.css
    @@ -65,6 +65,7 @@
       --space-m: 1rem; /* 1 * 16px = 16px */
    
    +++ b/core/themes/claro/css/components/content-header.pcss.css
    @@ -7,6 +7,6 @@
    +  padding: var(--space-l) 0 0 var(--space-l);
    
    +++ b/core/themes/claro/css/components/tabs.pcss.css
    @@ -20,6 +20,10 @@
    +  margin-left: -2rem;
    

    This could be better defined with negative calc: margin-left: calc(var(--space-m) * -2);

  3. +++ b/core/themes/claro/css/components/tabs.pcss.css
    @@ -20,6 +20,10 @@
    +#block-claro-primary-local-tasks {
    

    We should avoid the usage of IDs. The class "block-local-tasks-block" is available to use here.

Design comments
Also, on a design perspective, this looks a bit awkward with the details and table standing out on the left. As @saschaeggi mentioned on #16 Here is a visual explanation of what I mean: on the left, the current changes, on the right what I think that would make more sense:

Anyway, thanks all for all this work! It is great seeing this moving forward :)

ckrina’s picture

StatusFileSize
new115.43 KB

I forgot to upload an screenshot of what I mean so it's easier to understand. Updating previous comment with it.

saschaeggi’s picture

StatusFileSize
new53.78 KB

I agree with @ckrina here. Already looks quite good, but table and details looks off. They should be aligned with other elements on the left.
Also another thing which still needs adjustment though: the tabs.

saschaeggi’s picture

StatusFileSize
new25.04 KB

Here is an updated screenshot:
Tabs alignment Update

volkswagenchick’s picture

Issue tags: +Design4Drupal 2021

Tagging for Design4Drupal 2021. Contributions are Friday, July 22
https://design4drupal.org/

volkswagenchick’s picture

Issue tags: -Design4Drupal 2021 +Design4Drupal2021

Correcting tag Design4Drupal2021

volkswagenchick’s picture

Issue tags: +DCCO2021

Tagging for DrupalCamp Colorado DCCO2021 which is Sunday August 8.
https://2021.drupalcampcolorado.org/contrib-day

This patch can be re-rolled into a Merge Request to make maintainer review easier, thanks!

gauravvvv’s picture

StatusFileSize
new3.15 KB
new9.44 KB

Re-rolled patch #37, Attached interdiff for same. Addressed #40, suggestions.

gauravvvv’s picture

Status: Needs work » Needs review

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

marcusvsouza’s picture

Assigned: Unassigned » marcusvsouza

marcusvsouza’s picture

Assigned: marcusvsouza » Unassigned

I changed the approach as asked in comment #46

laisbonafe’s picture

Issue summary: View changes
StatusFileSize
new38.69 KB
new39.62 KB

should these details be like this?

the menu box "Content" is not aligned with the rest, it is bigger than the others..

When dont have nothing is listed, the title make misaligned

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.

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.

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.

needs-review-queue-bot’s picture

Status: Needs review » Needs work
StatusFileSize
new150 bytes

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.

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

I have created a MR with updated changes, please review

divya.sejekan’s picture

Status: Needs review » Needs work
StatusFileSize
new94.36 KB
new96.06 KB

Tested using MR 7817 : 3086780-improve-alignment
The issue is not resolved
Tested on D11
(Patch is not applicable for drupal 10.2)

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.