Closed (fixed)
Project:
Olivero
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
5 Mar 2020 at 17:51 UTC
Updated:
23 Apr 2020 at 11:49 UTC
Jump to comment: Most recent, Most recent file




| Comment | File | Size | Author |
|---|---|---|---|
| #35 | Снимок экрана 2020-04-07 в 19.00.17.png | 22.16 KB | kostyashupenko |
| #34 | 3118086-33-comments-interdiff.patch | 5.88 KB | mherchel |
| #34 | 3118086-33-comments.patch | 35.42 KB | mherchel |
| #32 | interdiff_23-32.txt | 21.34 KB | kostyashupenko |
| #32 | 3118086-32.patch | 35.86 KB | kostyashupenko |
Comments
Comment #2
jerseycheeseHi, I'm taking this on. Aiming to have something reviewable by end of this weekend (3/29).
Comment #3
mherchelFYI, we just merged #3117242: Theme/style the Form elements (unsure if you were blocked)
Comment #4
jerseycheeseUpdate here, still working on things. Free time hasn't been as abundant as I thought, but there's a good bit done here on my end!
I'll get as much "MVP" stuff wrapped up tonight, then propose some followups.
Comment #5
jerseycheeseOK, this patch is ready for a review. I pretty much just created an Article, and started making comments to test/theme this.
Some notes/questions:
Some things I didn't touch or had trouble with, maybe they are followups (if we want to get this merged in ASAP)?
Comment #6
jerseycheeseRe-rolled the patch to fix a few things I saw after the fact. And attaching a screenshot of what I'm seeing locally (for reference).
Comment #7
jerseycheeseComment #8
kostyashupenkoThanks for your work @jerseycheese, I'm gonna have a look into your patch!
Comment #9
kostyashupenkoMmmm.. i didnt have free time to check this task today, maybe tomorrow)
Comment #10
mherchelThis is starting to come together!
Some visual critiques:
Comment #11
mherchelThis is super nitpicky, but you'll want to put your display properties first (see https://www.drupal.org/docs/develop/standards/css/css-formatting-guideli...). Note that we really haven't been following coding standards very good yet, but this'll save us some cleanup in the future.
Let's create a separate library called "comments" and use {{ attach_library() }} to load the library when the comment template is loaded. This will make a smaller CSS bundle.
Debug code
Comment #12
mherchelOverall, this is starting to come together!
Note I'll come in at some point and adjust those negative margins so they conform to the grid exactly... but they're super close now.
Thanks for all the work @jerseycheese!
Comment #13
kostyashupenkoComment #14
kostyashupenkoReroll was done.
I didnt work on that issue too much, since not enough free time today for that on my side, but what was done:
1. Cleanup of generated css. It was about:
2. Added
user_picturetofield--comment.html.twig(without styles, only implemented fromfunction olivero_preprocess_field__comment(&$variables) { }For now that's all
Btw don't forget to check comments in IE11.
Comment #15
kostyashupenkoComment #16
kostyashupenkoFully ready for review.
1. Vertical bar added
2. "Hide replies" button added
3. Post comment button added
4. Added default gray circle if no avatar uplodaded
5. Fixed mobile styles
Comment #17
kostyashupenkoI also think we have to create a follow-up issue for Drupal 9 about creation of the new image style (square, scale & crop, maybe around 100x100 pixels or so) and new user view display with attached new image style for "Standard" profile.
Comment #18
mherchelThis is starting to look really good!
Some code comments below, plus some visual issues coming up:
Need to use single quotes per Drupal coding standards.
The addEventListener method passes the event object, rather than the target of the event., so it'll need to be `e` and then button would be `e.currentTarget`
Comment #19
mherchelComment #20
mherchelI'm attaching an updated patch that starts to handle all of the indentation, and also fixes the JS errors.
That being said, the vertical line still doesn't always show properly. Still needs a bit of work.
Comment #21
mherchelcurrent status:

Comment #22
kostyashupenkoComment #23
kostyashupenko@mherchel Hello! Thanks for your feedbacks, your help and fixes. Can you please provide interdiff next time? Since it's hard to understand what was changed :)
I tried to fix all possible cases i found, then i tried to test comments as much as i could and it looks good on my side now. A couple important points:
- these lines are currently sensitive to js and styles based on js. If js is disabled in browser - you will not see these side lines.
- 3rd level comments and deeper are "linked" to the 2nd level comments visually. Check my screens.
- mobile styles were adapted.
Also let's not lint js in comments here. We need a task to add
eslint.jsandeslintrc.passing.jsonfiles in theme ! Since we have yarn scripts to lint, but it doesn't work currently (i meanyarn lint:js-passingoryarn lint:jscommands are not working properly.1.



2.
3.
Comment #24
mherchelWow! This is looking so good :) I'll be able to look at it in-depth today (going to start now, but not sure I have enough time this am)
Comment #25
kostyashupenkoI'm also thinking - maybe it's better to keep replies hidden by default?
Comment #26
mherchelLet's leave them expanded for now, and float the idea. It'd be an easy enough change to make later.
Comment #27
mherchelFirst pass is looking pretty good. Only requested changes are some naming. I'll take a closer look at things later today, also.
This name is kind of confusing. How bout showHideBtn?
Change the CSS classname too please :)
I'm fairly confident that the text presented to the accessibility tree shouldn't be modified on click. Need to double check with accessibility folks to be sure.
Comment #28
mherchelTested in IE11, and everything is looking good.. there's some grid issues with the article content type, but that's external to this issue.
User image needs to be aligned to the input text:

Comment #29
mherchelLet's indent the second level comments at mobile. We'll have to indent the third level comments even more... but I'm okay with that.

Comment #30
mherchelI love the treatment when there is no user image ❤️
Comment #31
mherchelSome accessibility comments from https://drupal.slack.com/archives/C2ANFUGGG/p1586184306065500:
Comment #32
kostyashupenkoAll reported feedbacks should be fixed now.
About buttons - i went with youtube way. Now we have 2 different buttons, one of them is hidden until 2nd one will be clicked:
Comment #33
mherchelSwapping in and out the buttons won't work because 1) there's no indication that's going to happen (which can confuse people), and 2) Focus state between the buttons isn't managed.
If we can't change the text, then we should just use a +/- indicators.
I'm attaching an updated patch (and interdiff!). I'm ready to commit this if it's good. Note I also plan on changing the order of the CSS properties, but didn't put them in the patch for clarity.
According to https://www.drupal.org/docs/develop/standards/css/css-formatting-guideli...
position,float,clear,top,right,bottom,left,direction, andz-index.display,[(max|min)-]height,[(max|min)-]width,margin,padding,borderand their various longhand forms (margin-top, etc.) Plusbox-sizing.Comment #34
mherchelForgot to attach patches!
Comment #35
kostyashupenkoHello, thanks for your interdiff :)
Honestly i don't like at all how it looks now.. text is overthinked from my point of view. Too much visual information just for a small button. But i'm not accessibility expert for this case, so i maybe wrong and it is normal situation to have lots of text here.

You told
So it's not a problem to add indication for both buttons. And is it really problem about focus states? (Idk really)
Also maybe we can redesign this button?
Anyway i think it can be merged and follow-up task created.
Also i dont think you have to take care about css order, we need to fix yarn lint commands before
Comment #36
mherchelCommitted!
Comment #37
andrewmacpherson commentedI looked at the JS which was committed - it looks slick, and doesn't over-use ARIA. Refreshingly simple, compared to some other disclosure buttons I've seen. I like the way that the value of
aria-expandedis determined by the actualclassListitself, so the styling class and state semantics are always aligned.Re. #32-33 - managing 2 buttons would certainly have added extra complexity, with managing focus as one button disappears. Sticking to one button was the right call.
Regarding the name of the button. The problems with changing the button name (show-replies <-> hide-replies) are:
The first problem is described by Leonie Watson in this demonstration webinar:
Source: How A Screen Reader User Accesses The Web: A Smashing Video. There isn't a transcript sadly, but this came from the 54m23s mark.
Here's an interesting article (and recent research) from Sarah Higley: Playing with State. Key points:
aria-pressed, rather thanaria-expanded, but the principle is the same.aria-expandedandaria-pressedstates are communicated reliably in every browser/screen-reader combination I can think of.Overall, I think that "Show/hide replies" is too long for the button name. I'd go for "Show replies" followed by the open/closed state.
(I sometimes think it helps to think of the name of the control as a question, rather than an action. So here it would be something like "Show replies? [Yes/No]". I don't mean it should literally have a question mark; that's just how I think about it.)
Another way to phrase it might be "View replies [+/-]", or even just "replies [+/-]".
Regarding the visual symbol which shows the state. We already have the plus-minus in the narrow-screen sub-menus. But the wide-screen menus use a drop-arrow. It might be worth revisiting this, to decide on one or the other for consistency. The difference is that one involves swapping a symbol, the other involves rotation. When using plus-minus you have the visual symbol being the opposite of the state . A triangle/arrow does it with direction change instead of a symbol change (e.g. points right when closed, points down when open). I think that's why the triangle is more common nowadays.
Adding the accessibility tag for posterity. I might do a round up of these in a blog article once we're stable.
Comment #38
andrewmacpherson commented