Skip to content

redesign btn - #412

Open
juruwolfe wants to merge 7 commits into
mainfrom
translationBtn-redesign
Open

redesign btn#412
juruwolfe wants to merge 7 commits into
mainfrom
translationBtn-redesign

Conversation

@juruwolfe

Copy link
Copy Markdown
Contributor

What's in this pull request

Redesigned the translation button to look more like a link (which it is, in practice) and generally make it more subtle/bring it down in the hierarchy. Curious if @allyjlevine has thoughts, I just thought the one on cuba was a bit intense to be the default for all stories.

Before

image

After

image

@changeset-bot

changeset-bot Bot commented Apr 15, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: bc80838

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@reuters-graphics/graphics-components Patch

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

@pkg-pr-new

pkg-pr-new Bot commented Apr 15, 2026

Copy link
Copy Markdown

Open in StackBlitz

pnpm add https://pkg.pr.new/@reuters-graphics/graphics-components@412

commit: bc80838

@MinamiFunakoshiTR

Copy link
Copy Markdown
Contributor

what if we made the underline a tad darker, like this?

Screenshot 2026-04-16 at 8 55 36 AM

@MinamiFunakoshiTR

Copy link
Copy Markdown
Contributor

fyi @juruwolfe, I pushed a slight tweak to the documentation on this PR. I got rid of the note on adding the language button conditionally if translated embeds don't exist, and added a code block for it instead.

@MinamiFunakoshiTR MinamiFunakoshiTR left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'd make the underline a little darker but otherwise everything looks good

@juruwolfe

Copy link
Copy Markdown
Contributor Author

I'd make the underline a little darker but otherwise everything looks good

Yeah, I just wanted there to be more of a shift on hover, but maybe that's silly. @allyjlevine is going to take a look on Monday, so let's wait until then to merge

@allyjlevine

Copy link
Copy Markdown

To Julia's point about hierarchy, I think we can actually keep this button sentence-case instead of uppercase. We could keep it on same level as the byline/published date by keeping it sentence-case and using var(--theme-colour-text-secondary)

For the colors, could we change to text-primary and text-secondary to keep in our design system? Right now I think they are just random-ish hex values

What is the proposed margin for around the button? I'm curious how it will look by default when slotted between the headline and story text

Could we make the text-decoration-style on hover dotted to match the hover state of the byline links?

Proposed changes look like this

Screenshot 2026-04-22 at 1 58 06 PM

#translate-button:hover {
background-color: #889d9b;
color: #ebf7f7;
color: #333333;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggesting we use our design system variables. This would be var(--theme-colour-text-primary)

letter-spacing: 0.06rem;
font-size: var(--theme-font-size-xs);
background-color: #d3e1e1;
color: rgb(91 101 101);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

To keep with design system variables and match the byline, we can use var(--theme-colour-text-secondary)

@@ -76,22 +76,20 @@
text-transform: uppercase;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
text-transform: uppercase;

@@ -76,22 +76,20 @@
text-transform: uppercase;
letter-spacing: 0.06rem;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
letter-spacing: 0.06rem;

color 0.25s ease;
transition: color 0.25s ease;
text-decoration: underline;
text-decoration-color: #afafaf;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
text-decoration-color: #afafaf;
text-decoration-color: var(--tr-light-grey);

background-color: #889d9b;
color: #ebf7f7;
color: #333333;
text-decoration: underline;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
text-decoration: underline;
text-decoration: underline;
text-decoration-style: dotted;
text-decoration-thickness: 1px;

@MinamiFunakoshiTR

Copy link
Copy Markdown
Contributor

the changes look good to me! if julia is OK with them, @allyjlevine can go ahead and apply them

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.

3 participants