Skip to content
This repository has been archived by the owner on Sep 1, 2021. It is now read-only.

render advertisementFeatures #300

Merged
merged 6 commits into from
May 1, 2020
Merged

render advertisementFeatures #300

merged 6 commits into from
May 1, 2020

Conversation

webb04
Copy link
Contributor

@webb04 webb04 commented Apr 28, 2020

Render AdvertisementFeatures. Also known as Guardian Labs.

  • Use textSans font
  • Use labs colours rather than pillar colours
  • Remove tags and follow options
  • Added lab stories

Screenshots

Screen Shot 2020-04-28 at 15 03 59

@webb04 webb04 requested a review from JamieB-gu April 28, 2020 14:10
Copy link
Contributor

@JamieB-gu JamieB-gu left a comment

Choose a reason for hiding this comment

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

Looks good, a few small comments.

@@ -76,6 +76,11 @@ const commentStyles = css`
padding-bottom: ${remSpace[1]};
`;

const advertisementFeatureStyles = css`
${styles}
${textSans}
Copy link
Contributor

Choose a reason for hiding this comment

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

Would it be preferable to use a design system font here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I had a problem here as I wanted to keep the headline the same size as other articles but that would require larger textSans sizes in the design system https://theguardian.design/2a1e5182b/p/930d69-typography/b/06df96

@SiAdcock

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Would be happy to try and add that to the design system if it's useful? I imagine Dotcom could have the same problem when adding glabs

Copy link
Contributor

Choose a reason for hiding this comment

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

Is the issue that you need a 34px version of Text Sans, and the largest currently available is 24px?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yep, I could go into source and find the rem value used for that but the current way would also do that.

Copy link
Contributor

Choose a reason for hiding this comment

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

I've opened this on Source.

`;
const styles = (design: Design): SerializedStyles => {
const advertisementFeature = design === Design.AdvertisementFeature
? textSans
Copy link
Contributor

Choose a reason for hiding this comment

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

Would it be preferable to use a design system font here? E.g. textSans.medium()?

const font = design === Design.AdvertisementFeature ? textSans.medium() : body.medium();

return css`
    ${font}
    overflow-wrap: break-word;
    margin: 0 0 ${remSpace[3]};
`;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

textSans.medium() is a lot smaller than headline.medium(). Even the largest textSans is smaller that headline.medium()

@@ -76,6 +76,11 @@ const media = css`
}
`;

const advertisementFeature = css`
${styles}
${textSans}
Copy link
Contributor

Choose a reason for hiding this comment

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

Would it be preferable to use a design system font here?

src/components/advertisementFeature/article.tsx Outdated Show resolved Hide resolved
@webb04
Copy link
Contributor Author

webb04 commented May 1, 2020

@JamieB-gu The larger textSans sizes have been merged into the design system so they should be available from the next release hopefully.

I've seen us use the older textSans in other places to AdvertisementFeatures so I've made a ticket to move them all over to using the design system fonts https://theguardian.atlassian.net/browse/AR-25.

Should this be merged beforehand?

@webb04 webb04 requested a review from JamieB-gu May 1, 2020 14:47
@webb04 webb04 merged commit fcd0818 into master May 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants