Problem/Motivation

When the comments are large, the comment boxes form long columns in narrow screens.
The space utilization and Alignment of comments in narrow screens needs review.

Admin URL: node/%

Smooshed

Proposed resolution

Not Smooshed

Remaining tasks

Verify that @Cottser's review was addressed.

User interface changes

See #55 for screenshots in LTR and RTL on several viewports.

CommentFileSizeAuthor
#81 1902862--after--patch--pic.png34.89 KBvikashsoni
#81 1902862--before--aptch--pic.png66.96 KBvikashsoni
#68 alignment_of_comments-1902862-68.patch54.79 KBbrahmjeet789
#65 comments-new.png163.4 KByoroy
#65 comments.png154.28 KByoroy
#62 comments-testing-contribution.png36.45 KBjoginderpc
#55 mobile-potrait-rtl.png54.31 KBsurbhiG
#55 mobile-potrait.png59.38 KBsurbhiG
#55 mobile-landscape-rtl.png60.4 KBsurbhiG
#55 desktop-rtl.png80.42 KBsurbhiG
#55 desktop.png82.06 KBsurbhiG
#55 ipad-potrait-rtl.png83.19 KBsurbhiG
#55 ipad-potrait.png83.98 KBsurbhiG
#55 ipad-landscape-rtl.png85.36 KBsurbhiG
#55 ipad-landscape.png85.82 KBsurbhiG
#55 mobile-landscape.png61.53 KBsurbhiG
#53 alignment_of_comments-1902862-53.patch1.41 KByogeshmpawar
#50 alignment_of_comments-1902862-50.patch1.97 KBbandanasharma
#49 after-patch.png222.57 KBbandanasharma
#49 before-patch.png218.22 KBbandanasharma
#48 alignment_of_comments-1902862-48.patch1.41 KByogeshmpawar
#46 alignment_of_comments-1902862-46.patch1.91 KBbandanasharma
#43 alignment_of_comments-1902862-41.patch1.95 KBbandanasharma
#41 align-interdiff.txt1.94 KBbandanasharma
#41 alignment_of_comments-1902862-41.patch1.94 KBbandanasharma
#38 Screen Shot 2016-09-20 at 12.48.36 PM.png21.82 KBwebchick
#34 test_768.png137.95 KBChernous_dn
#34 test_480.png77.92 KBChernous_dn
#34 test_375.png65.59 KBChernous_dn
#34 test_320.png60.58 KBChernous_dn
#32 interdiff.txt2.05 KBbandanasharma
#32 alignment_of_comments-1902862-32.patch2.05 KBbandanasharma
#24 ltr_980.png68.99 KBchetan2111
#24 ltr_768.png66.34 KBchetan2111
#24 ltr-480.png60.17 KBchetan2111
#24 ltr-320.png35.32 KBchetan2111
#18 rtl_comment_480.png50.01 KBkostyashupenko
#18 ltr_comment_320.png32.75 KBkostyashupenko
#18 rtl_comment_320.png33.19 KBkostyashupenko
#18 ltr_comment_480.png44.07 KBkostyashupenko
#18 interdiff.txt873 byteskostyashupenko
#18 alignment_of_comments-1902862-18.patch1.41 KBkostyashupenko
#14 narrow-comments-layout.jpeg84.12 KByoroy
#12 alignment_of_comments-1902862-12.patch940 byteskostyashupenko
#12 comment-styles.png51.69 KBkostyashupenko
#6 narrow screen comment alignment.png67.15 KBDeeLay
#6 drupal-comment-alignment-on-narrow-screens-1902862-6.patch556 bytesDeeLay
#2 comments.png53.7 KBhansrossel
Alignment of Comments in small screen.PNG29.17 KBShyamala
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

rcaracaus’s picture

Removing the left arrow and clearing the comments to force the submitted information below the comment seems like a logical solution?

hansrossel’s picture

Issue tags: +Bartik
FileSize
53.7 KB

Cannot fix this right now because something has changed in the comment wrapper template that puts the comment text outside the comment box.

oresh’s picture

Yes, also noticed that. I couldnt find an issue for the comments changes, if you find please provide a link.
I also have a problem with posting comment - it doesnt work until i remove display none from comment body.
Are there any changes in comments designs?

DeeLay’s picture

This is the issue for the comment body appearing outside the bubble:
http://drupal.org/node/1965650

BrightBold’s picture

Status: Active » Postponed

Seems like this needs to be postponed until #1965650: Comment rendering broken: comment body rendered outside of the bubble is resolved.

DeeLay’s picture

Created a patch based on the suggestion from rcaracaus in #1, however I don't think it looks quite right, might need to still have the arrow there but pointing up. I'll have a look to see if it is possible to do that with css transform

DeeLay’s picture

Issue summary: View changes

is not an admin page so should not be part of the meta issue

yoroy’s picture

Version: 8.0.x-dev » 8.2.x-dev
Component: comment.module » Bartik theme
Issue summary: View changes

This is still the case. Would be nice to see a design where the name, date and permalink would show above with the pointy bit of the comment moved to the top of the comment.

kostyashupenko’s picture

Issue tags: +Needs design
andypost’s picture

Related issues: +#2010202: Deprecate comment_uri()
kostyashupenko’s picture

Assigned: Unassigned » kostyashupenko
kostyashupenko’s picture

Assigned: kostyashupenko » Unassigned
kostyashupenko’s picture

What about this design? What do you think? No global changes actually, but anyway, maybe you want to see here another changes as well?

comment-styles.png

Patch here (to reproduce it)

kostyashupenko’s picture

Status: Active » Needs review
yoroy’s picture

FileSize
84.12 KB

Yes, like that. Thank you @kostyashupenko. Looking at it I wonder if we could put author, date and permalink on a single line for this layout. Saves some space and puts the arrow right under the author name.

kostyashupenko’s picture

Assigned: Unassigned » kostyashupenko

@yoroy, yep, sure. Working on it

kostyashupenko’s picture

@yoroy, btw. You mean that arrow should be centered under username? I mean if you have toolongusername and arrow should be exactly centered? Or to allign this arrow under username "admin"

yoroy’s picture

No, there's no need to center that, current position looks fine to me.

kostyashupenko’s picture

@yoroy, i've added styles for 1 line and added also styles for rtl. Look on screens

LTR and RTL for 480px:
ltr_comment_480.png
rtl_comment_480.png

LTR and RTL for 320px:
ltr_comment_320.png
rtl_comment_320.png

kostyashupenko’s picture

Assigned: kostyashupenko » Unassigned
emma.maria’s picture

yoroy’s picture

Issue tags: +sprint
yoroy’s picture

Issue tags: +DevDaysMilan

Maybe somebody could do the manual testing at devdays Milan? would be nice to get this in.

Gábor Hojtsy’s picture

Issue tags: -sprint

This has not been worked on for the past month, so untagging from sprint.

chetan2111’s picture

Issue summary: View changes
FileSize
35.32 KB
60.17 KB
66.34 KB
68.99 KB

Hi,

Tested the comment section alignment and spacing and it is working as expected the changes are correct on above mention sizes but the issue exist on above 480 size devices like ipad.

kostyashupenko’s picture

So.... ?

andypost’s picture

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

I think that ready

xjm’s picture

Assigned: Unassigned » star-szr
xjm’s picture

xjm’s picture

Issue tags: +beta deadline

As a design improvement this is probably beta deadline.

star-szr’s picture

Assigned: star-szr » Unassigned
Status: Reviewed & tested by the community » Needs work

Either I missed it or there aren't before/after screenshots, those would be very helpful here :)

Thanks everyone who's worked on this so far. From the screenshots I'm seeing it looks promising, I think some code details need to be addressed though.

  1. +++ b/core/themes/bartik/css/components/comments.css
    @@ -158,3 +158,54 @@
    +@media all and (max-width: 480px) {
    

    Bartik already has a max-width 460px/min-width 461px breakpoint used in a few places, any reason to not use that breakpoint here? If it's not too large there's also an existing max-width 559px/min-width 560px breakpoint used in a few places.

  2. +++ b/core/themes/bartik/css/components/comments.css
    @@ -158,3 +158,54 @@
    +    border-left: 20px solid transparent;
    +    border-right-color: transparent;
    ...
    +    border-left: 20px solid transparent;
    +    border-right: 20px solid transparent;
    

    I think these need LTR comments (see below for reference link) and there seems to be some inconsistency/redundancy here. Why does RTL redeclare the exact same border-left value?

  3. +++ b/core/themes/bartik/css/components/comments.css
    @@ -158,3 +158,54 @@
    +    top: -20px;
    ...
    +    top: -20px;
    

    Why do both the LTR and RTL selectors declare a value for top? Shouldn't the LTR suffice?

  4. +++ b/core/themes/bartik/css/components/comments.css
    @@ -158,3 +158,54 @@
    +    right: auto;
    +    left: 5px;
    ...
    +    margin-right: 5px;
    

    I believe these need /* LTR */ comments per https://www.drupal.org/node/1887862#rtl.

  5. +++ b/core/themes/bartik/css/components/comments.css
    @@ -158,3 +158,54 @@
    +  .comment__content::before {
    ...
    +  .comment__content:after {
    

    One is ::before, the other is :after. I can't find a standard on this for Drupal in/around https://www.drupal.org/node/1887862 but most of core uses a single colon. We should at the very least be consistent within the code we are adding.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.0-beta1 was released on August 3, 2016, which means new developments and disruptive changes should now be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

bandanasharma’s picture

Added patch and interdiff file. I have made changes according to #30 points.

bandanasharma’s picture

Status: Needs work » Needs review
Chernous_dn’s picture

Status: Needs review » Reviewed & tested by the community
FileSize
60.58 KB
65.59 KB
77.92 KB
137.95 KB

Hi @bandanasharma test different resolutions, looks good. Attach screenshots.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 32: alignment_of_comments-1902862-32.patch, failed testing.

Chernous_dn’s picture

Status: Needs work » Needs review
Chernous_dn’s picture

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

Assigned: Unassigned » star-szr
Issue summary: View changes
FileSize
21.82 KB

Assigning to @Cottser to verify that his feedback has been addressed. For example, I didn't see any changed lines in the interdiff around that 480px line.

Otherwise though, looks like a great patch and a lovely improvement! Thanks for all the detailed screenshots, @Chernous_dn!

Also, since I have it up anyway, here's a "before" screenshot. Adding to the issue summary.

webchick’s picture

Meh. That screenshot was pretty crappy. Basically. "before" the "admin / permalink" stuff is to the left, which reduces the available width of narrow screens by about 30%. "After," that stuff moves to the top on narrow screens (but keeps the current design in wide screens), so you have more screen real estate for comment content.

star-szr’s picture

Assigned: star-szr » Unassigned
Status: Reviewed & tested by the community » Needs work

Sorry for the delayed review (and thanks @webchick for taking a look!). This is looking much better, just a few things left.

  1. +++ b/core/themes/bartik/css/components/comments.css
    @@ -21,7 +21,6 @@
    -
    
    @@ -49,7 +48,6 @@
    -
    
    @@ -66,7 +64,6 @@
    -
    
    @@ -135,7 +132,6 @@
    -
    

    These blank lines should be left in.

  2. +++ b/core/themes/bartik/css/components/comments.css
    @@ -158,3 +154,51 @@
    +@media all and (max-width: 480px) {
    

    It would still be nice IMO to change this to one of the breakpoints I suggested in #30.1. I think having fewer overall breakpoints results in a more predictable and consistent frontend and this particular case probably doesn't merit its own breakpoint.

  3. +++ b/core/themes/bartik/css/components/comments.css
    @@ -158,3 +154,51 @@
    +    border-right-color: transparent; /* LTR */
    ...
    +    right: auto; /* LTR */
    

    Nice, overall the LTR/RTL stuff is looking more consistent.

    I could be wrong, but I don't think these lines are needed in the LTR case. The initial value of right is auto (https://developer.mozilla.org/en-US/docs/Web/CSS/right) and if there is no border-right, specifying a border color isn't necessary.

bandanasharma’s picture

Status: Needs work » Needs review
FileSize
1.94 KB
1.94 KB

I have make changes according to #40 comments and added the patch.

Status: Needs review » Needs work

The last submitted patch, 41: alignment_of_comments-1902862-41.patch, failed testing.

bandanasharma’s picture

Reroll the patch again.

bandanasharma’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 43: alignment_of_comments-1902862-41.patch, failed testing.

bandanasharma’s picture

Status: Needs work » Needs review
FileSize
1.91 KB

Status: Needs review » Needs work

The last submitted patch, 46: alignment_of_comments-1902862-46.patch, failed testing.

yogeshmpawar’s picture

Status: Needs work » Needs review
FileSize
1.41 KB

Rerolled the patch against 8.3.x because #46 failed to apply .

bandanasharma’s picture

Status: Needs review » Needs work
FileSize
218.22 KB
222.57 KB

#48 patch is apply success fully, after applying patch in the comment.css file add same css within this @media all and (max-width: 460px). We have only need to replace the breakpoint and remove comment from the file. I have attached after and before screen shot.

bandanasharma’s picture

again added the patch with these changes.

bandanasharma’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 50: alignment_of_comments-1902862-50.patch, failed testing.

yogeshmpawar’s picture

Status: Needs work » Needs review
FileSize
1.41 KB

Rerolled the patch against 8.3.x because #50 failed to apply.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.0-alpha1 will be released the week of January 30, 2017, which means new developments and disruptive changes should now be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

surbhiG’s picture

Status: Needs review » Reviewed & tested by the community
FileSize
61.53 KB
85.82 KB
85.36 KB
83.98 KB
83.19 KB
82.06 KB
80.42 KB
60.4 KB
59.38 KB
54.31 KB

Review the latest patch #53 and this issue seems fixed now and refer the attached screenshot for the same. So moving it to RTBC.

xjm’s picture

Issue summary: View changes

Great work on the screenshots @surbhi90!

Updating the summary to link that comment, and also updating the file list to show the latest patch.

xjm’s picture

Assigned: Unassigned » star-szr
Issue tags: -beta deadline +Needs subsystem maintainer review

Since a good bit of CSS is needed for this fix, it would be good to either get a frontend framework manager's review or a Bartik subsystem maintainer review. I couldn't decide which to do, so I tagged it for subsystem maintainer review but also left it RTBC and tentatively assigned to Cottser in case he has a chance to review it. (If not we can unassign for a different CSS review.)

Nice work on this, everyone!

star-szr’s picture

Assigned: star-szr » Unassigned

Sorry for the very delayed response, I've been trying to get to this issue. I'm going to unassign but keep this issue on my list to review, to give others the opportunity to review or provide feedback.

xjm’s picture

Status: Reviewed & tested by the community » Needs review

Alright, let's see if we can get a Bartik or CSS maintainer review then. Thanks @Cottser!

emma.maria’s picture

Assigned: Unassigned » emma.maria

I'm taking a look at this at MidCamp and easing myself back into the issue again :-)

I can take a look at the CSS plus I'm going to do some manual testing on my phone to see how it feels.

Great work so far everyone :-)

yogeshmpawar’s picture

Any Update on this issue ?

joginderpc’s picture

@emma.maria what about the test status you had done or not? Please update this issue so far it will move to next core installation.

As i had tested it manually the arrows are working fine on mobile. Screen shot attached bellow.

SS

joginderpc’s picture

joginderpc’s picture

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

FileSize
154.28 KB
163.4 KB

Still happy with this design.

One question about the "new" marker: is it semantically ok that this is *not* inside the footer element that contains the username, date, permalink? Honest question, I have no opinion :)

jibran’s picture

lauriii’s picture

Status: Reviewed & tested by the community » Needs work

I'm sorry, I have one more point about the code which is quite a minor problem but should be still addressed. This will also give @emma.maria some more time if she wants to follow-up on #60 :)

+++ b/core/themes/bartik/css/components/comments.css
@@ -155,3 +155,52 @@
+  article.comment {
+    display: block;
+  }

Is there a particular reason why article element has been used on the selector? Also it would be great for clarity if this would be placed as a first selector for comments.

brahmjeet789’s picture

@laurii patch 53 is working fine for me and i reduce the above space from the comments for smaller screen. regarding why use article as display: block beacuse comments are in article tag .

brahmjeet789’s picture

Status: Needs work » Needs review

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.0-alpha1 will be released the week of July 31, 2017, which means new developments and disruptive changes should now be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.0-alpha1 will be released the week of January 17, 2018, which means new developments and disruptive changes should now be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

brahmjeet789’s picture

Any update on this issue.

Version: 8.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Manjit.Singh’s picture

@Laurii: I haven't see any trouble to access comments on narrow screen.
Or do we have any plans to change the designs ?

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

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

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

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.

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.

djsagar’s picture

Status: Needs review » Needs work

Please work for 9.2.x-dev.

Thanks!

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.

vikashsoni’s picture

Patch #18 applied successfully and looks good for me
After patch layout is looking good
Thanks for the patch
for ref sharing screenshot...

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.

pameeela’s picture

Title: Alignment of comments in narrow screens » Layout of comments in narrow screens
Project: Drupal core » Bartik
Version: 10.1.x-dev » 1.0.2
Component: Bartik theme » Look and Feel
Issue tags: -frontend, -CSS, -Needs subsystem maintainer review

Moving to contrib since Bartik was removed from core in D10.