-
Notifications
You must be signed in to change notification settings - Fork 6
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
x-live-blog-post component #474
Conversation
5041b6b
to
7d764b2
Compare
I have rebased this branch on |
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.
Name:
I wonder if based on the PR description (below) whether its name should be changed from x-content-block
to x-blog-post
?
x-content-block renders live blog posts with an updated design.
I expect FT.com and the App feature other page sections that could be described as a 'content block' but which could not use this component, so I wonder if renaming so as to finely define its scope.
Tests:
There do not seem to be any. Even if the component is currently only receiving props and spitting them out, it is still worth having the tests in place for the eventuality that it later becomes more complex. The x-privacy-manager
component was pretty thorough in this regard: https://github.com/Financial-Times/x-dash/pull/458/files.
Accessibility:
Has the component been tested for accessibility?
import { h } from '@financial-times/x-engine'; | ||
import styles from './ContentBlock.scss'; | ||
|
||
// this function extracts time in HH:mm format from a given date |
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.
Does o-date
or any other existing package do this? Seems like it must be a common use case for elsewhere on FT.com.
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.
Now using o-date
for rendering the exact date.
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.
Can the code that calculates the time ll.5-23 not use one of the o-date
methods listed under the JavaScript header?
It seems like what you are trying to achieve must be a common use case and I would be surprised if it was not achievable with one of these methods.
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 avoid using Origami Javascript in the x-dash component because of this comment here: #446 (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.
Ah, interesting.
@andygout For accessibility, I added more descriptive aria labels to the sharing buttons. Apart from that, I couldn't see any issues. Do you have anything else in mind? |
e7c9411
to
ebcdbdd
Compare
Re. accessibility, I think as long as you have tested it yourself with a screenreader and found that the component can be navigated in an understandable manner (maybe in the context of an app) then that should be okay. |
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.
Providing you have checked the component for accessibility using a screen reader and maybe also keyboard-only, I would say this is good to go.
Please be sure to follow the Release Guidelines, which requires that new components have been well checked.
8ecea26
to
c4e4a66
Compare
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.
Confirmed offline:
Yes, we have been testing it in
next-article
with the current live-blogs architecture. And, we will release it behind a flag initially.
i see this has been tested in |
I tested the component in The rest of the features work well in the app. |
So #494 and this PR will be included in the same release? |
In order to make getTimeString function more portable, I moved the logic of whether to display the time string into the main function.
Because the app is using 10.x, we want to support it at minimum.
Mainly for better testability
FT app is using native sharing, so we want to disable the share buttons when using this component in the app.
Share buttons will only show when `showShareButtons` flag is set explicitly.
1b66e2b
to
ff4af67
Compare
@andygout I tested the component including the latest changes on Do you think we can go ahead with the release today? |
x-live-blog-post component
x-live-blog-post
renders live blog posts with an updated design.Before:
After:
Related issue:
#446