-
Notifications
You must be signed in to change notification settings - Fork 237
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
WORLDSERVICE 408 - Implement Lite site text CTA under h1 on article page (Gahuza) #12494
Conversation
…to 444-lite-site-cta
Thanks @Isabella-Mitchell So we also have future work to refactor the call to action link (without chevron)? (Not sure we have any other components in this state) |
We've added display:inline-block to the link styles. This means the is not treated as inline, and so the touch target spacing is shown on Storybook on the link in isolation.. Agree it's something we could look more into during refactoring. We've added some more stories to help us see the component in context |
We'll put together a ticket for this |
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.
Would it be overkill to update the ArticlePage stories to include an example with liteSiteCTA enabled? This is probably better for being able to see the component in context. We could even consider removing this story, as we don't really need to see the article headline in isolation...
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.
Okies, that's my bad. I thought it would be helpful to have co-located stories for reviewing. But agree the best reviewing experience would be to see it on the Article Page. And then we don't need any new fixture data to do this.
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.
No worries, it was useful to have initially, I just thought it was best to view the component in context & it made sense on the Article 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.
Can we make a couple of changes to the stories?
Here's what I would like:
- A generic story (similar to the example) where I can select the service and the page furniture will automatically change (even though the article content will remain the same, we should still get translations for the selected service). This should be named
ArticlePageWithLiteSiteCTA
but allow service to be passed in as a prop. This should also have chromatic snapshots disabled - A story for chromatic (which could be the current
ArticlePageWithLiteSiteCTA
story with gahuza pre-selected, but renamed toTestArticlePageWithLiteSiteCTA
), which is actually hidden from view in Storybook - here's how we've done this elsewhere:simorgh/src/app/pages/HomePage/index.stories.tsx
Lines 92 to 99 in 87cffdf
// This story is for chromatic testing purposes only export const Test = { render: (_: StoryArgs, { variant }: StoryProps) => ( <Component service="kyrgyz" variant={variant} /> ), tags: ['!dev'], }; - Delete
ArticlePageWithLiteSiteCTARightToLeft
because this will be superseded by 1.
Happy to hop on a call to discuss.
Resolves JIRA WORLDSERVICE-408
Overall changes
Created a new component
CallToActionLinkWithChevron
within#components
This new component uses the existing
CallToActionLink
however incorporates<RightChevron>
and<LeftChevron>
(to support both LTR, and RTL languages)Created
ArticleHeadline
co-located withinsrc/app/pages/ArticlePage
. this component handels rendering heading on article pages and decides if a headline should include a LiteSiteCTA based on the toggles set in iSiteNotes
Refactoring
There are now a few CTAs within Simorgh that are logically and visually similar. A ticket will be made to address refactoring
insuring there isn’t multiple LiteSiteCTAs on an article page
Currently these changes affect every heading on an article page (this should be fine as there shouldn't be more than 1
h1
heading on an article page).if work is needed to only apply the CTA under the first heading(as there may be more headings on the page), then work in the
BFF
would need to be done. perhaps adding a custom block that apply'sCallToActionLink
only to the first heading in the data that gets sent off to SimorghTesting
Canonical Articles that should display the liteSiteCTA
Visit any article page on a service with the liteSiteCTA toggle enabled
http://localhost:7080/gahuza/articles/c5y51yxeg53o
Check if the liteSite CTA is visible under the Article heading
Click the CTA
The CTA should take you to the same article however the lite version
http://localhost:7080/gahuza/articles/c5y51yxeg53o.ltie
Canonical Articles that should not display the liteSiteCTA
http://localhost:7080/gahuza/articles/c5y51yxeg53o
The liteSite CTA should not be visible under the Article heading
The LiteSite
The LiteSite itself should not render the liteSiteCTA under any conditions

http://localhost:7080/gahuza/articles/c5y51yxeg53o
The liteSite CTA should not be visible under the Article heading
Helpful Links
Coding Standards
Repository use guidelines