Skip to content
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

Read more button poc #12563

Open
wants to merge 43 commits into
base: latest
Choose a base branch
from
Open

Read more button poc #12563

wants to merge 43 commits into from

Conversation

LilyL0u
Copy link
Contributor

@LilyL0u LilyL0u commented Mar 24, 2025

Resolves JIRA:

Summary

A very high-level summary of easily-reproducible changes that can be understood by non-devs, and why these changes where made.

Code changes

  • A bullet point list of key code changes that have been made.

Developer Checklist

  • UX
    • UX Criteria met (visual UX & screenreader UX)
  • Accessibility
    • Accessibility Acceptance Criteria met
    • Accessibility swarm completed
    • Component Health updated
    • P1 accessibility bugs resolved
    • P2/P3 accessibility bugs planned (if not resolved)
  • Security
    • Security issues addressed
    • Threat Model updated
  • Documentation
    • Docs updated (runbook, READMEs)
  • Testing
    • Feature tested on relevant environments
  • Comms
    • Relevant parties notified of changes

Testing

  • Manual Testing required?
    • Local (Ready-For-Test, Local)
    • Test (Ready-For-Test, Test)
    • Preview (Ready-For-Test, Preview)
    • Live (Ready-For-Test, Live)
  • Manual Testing complete?
    • Local
    • Test
    • Preview
    • Live

Additional Testing Steps

  1. List the steps required to test this PR.

Useful Links

@@ -225,6 +225,14 @@
/>
);

export const ArticlePageWithReadMoreButtonVariation1 = () => (
<ComponentWithServiceContext data={articleData} service="pidgin" />

Check failure

Code scanning / CodeQL

Hard-coded credentials Critical

The hard-coded value "pidgin" is used as
authorization header
.
);

export const ArticlePageWithReadMoreButtonVariation2 = () => (
<ComponentWithServiceContext data={articleData} service="mundo" />

Check failure

Code scanning / CodeQL

Hard-coded credentials Critical

The hard-coded value "mundo" is used as
authorization header
.
@@ -11,7 +11,7 @@ export default {
display: 'block',
width: 'calc(100% - 2rem)',
padding: `${spacings.DOUBLE}rem 0`,
margin: `${spacings.QUADRUPLE}rem ${spacings.DOUBLE}rem -0.5rem ${spacings.DOUBLE}rem`,
margin: `${spacings.QUADRUPLE}rem ${spacings.DOUBLE}rem -1.5rem ${spacings.DOUBLE}rem`,
Copy link
Contributor Author

@LilyL0u LilyL0u Mar 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The bottom of the <main> container, which contains the button, has a padding of 24px. The <aside> underneath which contains the related content component has a top margin of 16px. The Related Content section has a margin top of 16px. To achieve the gap of 32px between the button and the related content component heading in the designs I have added a minus margin of 1.5rem.

Screenshot 2025-03-26 at 17 30 13

Is it always the related content heading first? Do all headings have this margin top?

Copy link

@greenc05 greenc05 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So far so good 😄

  • Great decision to add the button at the bottom of the article text - that way if No CSS then it doens’t interrupt the reading experience
  • Know this is still in progress, looks like a little less space above the button in the design for both variants?
  • Also may need something for forced colours…

marginLeft: '0',
verticalAlign: 'middle',
}}
aria-hidden="true"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add focusable false too please?

css={{
marginRight: '10px',
marginLeft: '0',
verticalAlign: 'middle',

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Think we need to try to get it to align with the center of the button text

width="16"
height={theme.fontSizes.pica.fontSize}
css={{
marginRight: '10px',

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2px might do it?

@@ -68,6 +68,7 @@ import Disclaimer from '../../components/Disclaimer';
import SecondaryColumn from './SecondaryColumn';
import styles from './ArticlePage.styles';
import { ComponentToRenderProps, TimeStampProps } from './types';
import ReadMoreButton from './ReadMoreButton';

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if we should call this "read more" how about 'show more' as that is what we are doing??

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually now below I see you have used the naming 'show' so maybe this is a better name?

border: 'none',

'&:hover, &:focus': {
textDecoration: 'underline 2px',

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use relative values please? Also not sure we usually specify the width when it's text underline (just when we use border)

color: '#141414',
textAlign: 'left',
border: 'none',
borderBottom: '1px solid #B0B2B4',

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Relative values please

margin: `${spacings.TRIPLE}rem ${spacings.DOUBLE}rem -0.5rem ${spacings.DOUBLE}rem`,
backgroundColor: '#F6F6F6',
color: '#141414',
textAlign: 'left',

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need rtl as well?

paddingBottom: `calc(${spacings.DOUBLE}rem + 0.5rem)`,

'&:hover, &:focus': {
textDecoration: 'underline 2px',

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use relative values please? Also not sure we usually specify the width when it's text underline (just when we use border)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants