Closed (fixed)
Project:
Drupal.org customizations
Version:
7.x-3.x-dev
Component:
User interface
Priority:
Normal
Category:
Bug report
Assigned:
Issue tags:
Reporter:
Created:
23 Sep 2013 at 15:14 UTC
Updated:
10 Jun 2014 at 22:50 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
jthorson commentedTitle versus Permalink are two different styles ... but it makes sense that we shouldn't output the "comment-title" element if the title itself is empty.
Comment #2
mgiffordJust removing empty
<h3 class="comment-title"></h3>is fine too.Comment #3
tvn commentedMoving to Project issue for now, maybe Bluecheese is a better place though.
Comment #4
drummNo patch is here to review.
Comment #5
mgiffordI don't know where to find the relevant code. I grepped around but didn't find it.
Comment #6
drummThis actually should probably be fixed in our comment.tpl.php, which is similar to core's. We have a permalink, but no title set.
Please do follow up on this in core D8 too, http://drupalcode.org/project/drupal.git/blob/refs/heads/8.x:/core/modul... looks like it would do the same thing when a permalink, but no title, is set.
Comment #7
mgiffordIn that case, based on modules/comment/comment.tpl.php
Maybe we should just use:
I will follow-up --> Including patches #2170251: Comment headings can spit out empty heading tags
Comment #8
mgiffordPatched and tested on http://search_api-drupal.redesign.devdrupal.org/node/2164937
Comment #9
mparker17Related to #2166615: [regression] comment numbers are not wrapped into headings
Comment #10
mgiffordI forgot that the
<h3>needs to be wrapped around the permalink. Thanks for the reminder Matt!Comment #11
mgiffordWith better pronunciation for screen reader users.
Comment #12
mparker17I've tested this in a screenreader, and it works.
When I use the headings rotor on Voiceover (on Mavericks) to show me all the headings on the page, I see "Comment #1", "Comment #2" for each comment on the page.
Marking as RTBC.
Comment #13
drummCommitted the Project Issue chunk and deploying.
Comment #14
drummThe Bluecheese patch changes the size of the headings. They should stay the same.
And I realized that the project_issue patch includes new non-translatable text. I'll leave it in for now, but please follow up with a patch that adds a call to
t().Comment #15
mgiffordI checked that the new HTML
is still styled by the same CSS:
I don't understand what isn't the same size. Just let me know and I'll write it up.
I applied the bluecheese patch only to http://search_api-drupal.redesign.devdrupal.org/node/2159813
Great to hear that t() is being added. I think I was thinking Bluecheese rather than the project issue which of course would need to be multilingual.
Comment #16
mgiffordThis patch is just the addition of i18n around the "Comment #". I thought the context with the span may be useful so didn't just do a simple t('Comment').
Comment #17
mparker17@mgifford, I think @drumm means that the computed font-size on the dev site is 18px instead of 15px. This change happened because the h3 increased the font-size 1.231em before the changes to the font-size were made elsewhere.
The use of the h3 tag also added about 9px of margin below the comment number.
I'll see what I can do about fixing this.
Comment #18
mparker17Okay, I've fixed the font-size problem. Attaching patch and before+after screenshots.
Links are:
Reviews welcome.
Comment #19
mparker17It's worth noting that the horizontal scrollbar in the "after" screenshot is caused by another issue's addition of social media buttons to the footer, and those changes are not included in the patch attached to this issue.
Comment #20
mgiffordThis looks good to me. This patch addresses the sass files (which is great). Also useful to see this change in the CSS in sites/all/themes/bluecheese/css/styles.css
I don't know which environment to test this in.
@drumm would you want this tested somewhere else before marking it RTBC?
Comment #21
mparker17> I don't know which environment to test this in.
You can see my changes at http://search_api-drupal.redesign.devdrupal.org/
Comment #22
mgiffordAnd they look good there.
Comment #23
mparker17RTBC?
Comment #24
mgiffordI think so.
Comment #25
drummLooks like the project_issue part is almost there. This can move back to bluecheese when that's done.
$threadneeds to move into thet()call, and be sanitized via an@placeholder. It may only be a number, but it was being sanitized before. And translators might want to rearrange the entire string, without the number stuck at the end.Comment #26
mparker17Whoops... I'll fix that.
Comment #27
mgiffordComment #28
mgiffordSorry, Matt. I saw your not after I'd written the patch.
Comment #29
mparker17Looks like that patch addresses @drumm's concerns, so marking as RTBC.
***
The staging server is currently throwing "Undefined index" errors from lines earlier in project_issue.module, but I don't believe they are related to the changes in this patch.
Comment #30
mgiffordThat error is mine.. I should just comment out the code.. Will do that later today..
I've made enough little changes to it I'm getting to the stage where I want to do.
bzr reset --hard
I just don't know if that exists or what that would do to others working on the code....
Comment #31
drummCommitted the project_issue portion.
We try to keep PHP customizations in the theme minimal. This portion of our theme currently matches core's
comment.tpl.php:This seems like a good change for core, so the issue for it should start there. We can patch bluecheese to keep up as that issue progresses.
The h3 wrapper can instead be added by a preprocess function,
drupalorg_preprocess_comment():That function (rather than say something in drupalorg_project) already acts on issue comments, it is good to keep that code all in one place. I don't think this makes sense in project_issue; that module doesn't need to dictate whether sites running it have comment subjects or not.
Comment #32
mgiffordThanks for committing the project_issue portion.
Good to keep the theme customizations to a minimum.
Yes. i started that issue on D8 back at the beginning of January. It can be hard sometimes to get traction on various Core issues. Resources are scarce as you know.
So you'd prefer to put it all into the preprocess function with the H3's, and then simply do something like
<?php print $permalink ?>Agreed about keeping the code together where possible. I've just poked around as you know and it's easy to get lost.
EDIT: That should be
<?php print $permalink_title; ?>Comment #33
mgiffordBoth drupalorg_project_preprocess_node() & drupalorg_project_preprocess_comment_wrapper() are mucking with the comments in drupalorg_project.module. But in the latter. I think that this would be the best place to put a $permalink_title:
t('Add new comment') . ' | ' . l(t('Update this issue'), $update_link);
Comment #34
drummWill be good to get this out of the way ahead of #936304: [META] Style issue comments.
Comment #35
drummhttps://drumm-drupal.redesign.devdrupal.org/node/2240063 is an example of the change for this.
Comment #36
mgiffordCan you just get rid of this empty heading here:
<h3 class="comment-title"></h3>Otherwise it looks ok:
Comment #37
drummThe empty headings are a core bug, #2170251: Comment headings can spit out empty heading tags.
Comment #38
mgiffordYes, but we're not sure how to replicate this problem in D8 #2170251-20: Comment headings can spit out empty heading tags
Plus, it's a pretty trivial fix in the template. It could just be removing the heading in bluecheese.
In /tpl/comment.tpl.php we can just delete this line, right:
<h3<?php print $title_attributes; ?>><?php print $title ?></h3>With all the changes with Twig, I really don't know that we need to wait for this to be backported from D8 to D7 in order to fix this accessibility problem that is affecting folks on drupal.org right now (and for the last 9 months).
Comment #40
drummThis is now on staging sites, like https://staging.devdrupal.org/node/2224917, for testing.
Comment #41
mgiffordLooks good.
The empty headings is still a problem and really don't think it's something that will take the year or so that it may take to get through to a D7 Core release.
Comment #42
drummNow deployed.
Just removing the line would remove subjects where we do use them - in forum comments and I think everywhere else except issues. We actually aren't overriding comment.tpl.php now, so we rely on what core gives us.