-
Notifications
You must be signed in to change notification settings - Fork 3
Component: Comment #1370
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Component: Comment #1370
Conversation
🦋 Changeset detectedLatest commit: 92142e9 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
@calebeby I'm having trouble resolving some TypeScript errors related to some imports in a dummy data generator. If I follow what TypeScript tells me to do, I get eslint errors, if I follow what eslint tells me to do, I get TypeScript errors. Help would be appreciated! |
|
@calebeby Thank you! |
|
Unfortunately I found a regression, moving this back to draft state until I'm able to address. Edit: This has been addressed. |
|
This is looking great, @tylersticka! Quick question…should there be a bit of extra breathing room at the bottom of the reply? It feels uncomfortably close to the bottom edge and makes me think there is more to see/scroll. Of course, this design is out of context and this may not matter when within the full page layout. Figured I'd ask about it. 🙂 |
| <h{{_heading_depth}} class="c-comment__heading"> | ||
| {{comment.author.name}} | ||
| <span class="u-hidden-visually"> | ||
| {% if comment.is_child %}replied{% else %}said{% endif %}: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I very much enjoyed this audible experience, thank you! ❤️
Paul-Hebert
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks (and sounds) great!
I left a few nits and questions inline. I think we may want to switch from using a title to visually hidden text for comment links? Everything else is non-blocking though.
| grid-template-areas: | ||
| 'object header' | ||
| 'thread-line content' | ||
| 'thread-line footer'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh this is clever. 👍 CSS Grid is awesome
src/components/comment/comment.scss
Outdated
| // We generally want comment contents to align to the start/top, but the | ||
| // the heading looks better center-aligned with the avatar. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit
| // We generally want comment contents to align to the start/top, but the | |
| // the heading looks better center-aligned with the avatar. | |
| // We generally want comment contents to align to the start/top, but | |
| // the heading looks better center-aligned with the avatar. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Paul-Hebert I've addressed this feedback, but I removed a different "the" because there was plenty of room below the 80 character threshold for that line.
| src: comment.avatar, | ||
| size: 'full' | ||
| } only %} | ||
| </div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we confident there will always be avatars when using this pattern? (e.g. will we use Wordpress's fallbacks or something else if there's no avatar?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, and if the avatar is omitted, you'll just see a placeholder circle with the current pattern, so it's pretty fault-tolerant.
src/components/comment/comment.twig
Outdated
| <div class="c-comment__meta-detail"> | ||
| <a class="c-comment__meta-link" | ||
| href="{{comment.link}}" | ||
| title="Permalink to {{comment.author.name}}’s {{comment.date|date('M j')}} {% if comment.is_child %}reply{% else %}comment{% endif %}"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My understanding is that some screen readers have issues with the title attribute: https://www.tpgi.com/using-the-html-title-attribute
I wonder if it would be better to include some visually hidden text for assistive technologies?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried this in VoiceOver and the title text wasn't announced so I just heard a link with a date. It seems like this title info would be useful context for assistive technologies.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @Paul-Hebert! I saw the title attribute usage and was trying to find a reference article but you already found one. I wasn't 100% sure if using title might be cause for concern but I had stored somewhere in the back of my mind that I should be cautious.
FWIW, I did hear the info in the title attribute using VO + Safari + keyboard as my input (which I was surprised by) but the fact we heard varying, inconsistent experiences is reason enough to use visually hidden text instead. 😉
Thanks again, @tylersticka, for the thoughtful UX design! ❤️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, interesting! I wonder why we heard different things 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Paul-Hebert @gerardo-rodriguez I believe I've addressed this comment by moving the text into visually hidden span elements. One nice side effect of this is that I can now re-use the existing time element for that portion of the fallback text.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| via <a class="c-comment__meta-link" href="{{source.url}}">{{source.name}}</a> | ||
| </div> | ||
| {% endif %} | ||
| {% if demo_control %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: could we add a comment explaining this var name? It confused me until I went back to the docs page
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Paul-Hebert Good idea, I've added a TODO comment with more context.
@gerardo-rodriguez We use a Storybook add-on called Would greatly appreciate a separate issue to address! |
| <h{{_section_heading_depth}} class="u-hidden-visually"> | ||
| Replies | ||
| </h{{_section_heading_depth}}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clever! I totally missed this the first time I turned VoiceOver on.
For a moment, I had a slight concern that seeing multiple "Replies" headings might be confusing within the context of the VO rotor but since the rotor lists them in order, I think there is enough contextual information that it makes sense. 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gerardo-rodriguez I've made a slight adjustment based on this observation, adding the original comment author's name to the "Replies" heading. I think this makes the headings more distinct and the relationship a bit more clear between heading levels now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like a great improvement 👍
Paul-Hebert
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! 🚢
| const random = require('lodash/random'); | ||
| const sample = require('lodash/sample'); | ||
| const uniqueId = require('lodash/uniqueId'); | ||
| import Jabber from 'jabber'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @tylersticka , thanks for using Jabber, I have added ts support in v.1.5.2.
regards
Anil
|
Hi @tylersticka , thanks for using Jabber, I have added ts support in v.1.5.2. |




Overview
Adds a not-quite-complete version of a
c-commentcomponent. Remaining to-dos are specified in the "Status" section of the Storybook docs page.I made a few changes from the designs:
Screenshots
Testing
Deploy preview
Remember, you can view a page on its own by opening a story in "Canvas" view and clicking the top right icon that looks like an iOS "share" icon (arrow pointing upward from rectangle). This may streamline VoiceOver testing by focusing on the specific story!
/CC @AriannaChau