Skip to content

Login: Set the social links container to expand with the text #103650

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

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

dlind1
Copy link
Contributor

@dlind1 dlind1 commented May 22, 2025

Part of I18N-221

Proposed Changes

  • Set the social links container on login page to always fit the text content and not shrink below that.
Before After
wpcom-before wpcom-after
crowdsignal-before crowdsignal-after
jetpack-before jetpack-after
woo-before woo-after
blazepro-before blazepro-after
akismet-before akismet-after
a4a-before a4a-after
gravatar-before gravatar-after
wpjm-before wpjm-after
vip-before vip-after
p2-before p2-after

Why are these changes being made?

  • On many languages the translations for "Email me a login link" and "Log in via Jetpack app" are considerably longer than in English, which causes the texts to overflow the buttons.

Testing Instructions

On calypso.localhost use the following links to test in Turkish (you can check other languages by changing the locale slug in the URL):
WordPress.com
Crowdsignal
Jetpack Cloud
Woo - on Woo the container width is set to 327px, so a simple solution would be to source shorter translations for a single string in French, Italian and Brazilian Portuguese.
Blaze Pro
Akismet
A4A - Can't link due to GitHub OSS scan rules: go to the A4A site and click login. Edit the URL and change the host to calypso.localhost:3000 and the locale to tr.
Gravatar
WP Job Manager
VIP
P2

Pre-merge Checklist

  • Has the general commit checklist been followed? (PCYsg-hS-p2)
  • Have you written new tests for your changes?
  • Have you tested the feature in Simple (P9HQHe-k8-p2), Atomic (P9HQHe-jW-p2), and self-hosted Jetpack sites (PCYsg-g6b-p2)?
  • Have you checked for TypeScript, React or other console errors?
  • Have you used memoizing on expensive computations? More info in Memoizing with create-selector and Using memoizing selectors and Our Approach to Data
  • Have we added the "[Status] String Freeze" label as soon as any new strings were ready for translation (p4TIVU-5Jq-p2)?
    • For UI changes, have we tested the change in various languages (for example, ES, PT, FR, or DE)? The length of text and words vary significantly between languages.
  • For changes affecting Jetpack: Have we added the "[Status] Needs Privacy Updates" label if this pull request changes what data or activity we track or use (p4TIVU-aUh-p2)?

@matticbot
Copy link
Contributor

This PR does not affect the size of JS and CSS bundles shipped to the user's browser.

Generated by performance advisor bot at iscalypsofastyet.com.

@dlind1 dlind1 marked this pull request as ready for review May 22, 2025 22:34
@dlind1 dlind1 requested a review from adamwoodnz May 22, 2025 23:24
@matticbot matticbot added the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label May 22, 2025
Copy link
Contributor

@adamwoodnz adamwoodnz left a comment

Choose a reason for hiding this comment

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

Thanks for looking at this. Sorry but could you explain how to change locale in more detail? I tried adding ?locale=tr_TR to the URL but it's not working.

I notice that even without longer strings this change makes the right column wider than the left, which I don't think is desirable:

Screenshot 2025-05-23 at 12 07 07 PM

@jasmussen @crisbusquets requesting your input please 🙏

The layout of these buttons is tricky with the left aligned icon and center aligned text. Other approaches could be to either let the button text wrap, or use ellipsis to truncate really long strings if we want to keep the right column layout consistent.

@jasmussen
Copy link
Member

At a glance the solution feels okay to me, insofar as it avoids the awkward cropping of the existing translations, especially if paired with some min-widths.

The example in turkish is good because it's just really hard to compress that. If we believe taht "Email me a login link" and "Log in via Jetpack app" are as short as they can be in order to still be comprehensible labels, then those just get that long in turkish.

So outside of changing the buttons to possibly grow, the only other alternative is to increase the max-width of this main column, and wrap it to mobile sooner. Tricky.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants