Skip to content

fix(home): Explore the data's sentence breaks a long word with a hyphen on a phone, not one letter alone - #945

Closed
sickerine wants to merge 1 commit into
mainfrom
fix/home-reading-hyphens
Closed

sickerine wants to merge 1 commit into
mainfrom
fix/home-reading-hyphens

Conversation

@sickerine

Copy link
Copy Markdown
Collaborator

Found by the daily QA of 27 November, checking #943.

Problem

#943 lets a word wider than its line break on a phone, so the home page's Explore the data sentence stays inside its card at large text. It breaks the word wherever the line runs out: on Sources QA, "29 publications" ended as "publication" and a line holding only "s" at 320px and 150%, and at 430px and 200%, in Chromium, Firefox and WebKit.

Change

Reading adds max-sm:hyphens-auto beside max-sm:break-words: a word too wide for its line breaks with a hyphen where its language allows, and still breaks anywhere when it can't. The page carries lang, so the browser knows the language. The admin's dialog titles already break this way (.modal-header-title in globals.css). Phones only; a word that fits never breaks.

Checks

The same rule applied to Sources QA's live home page with a constructed stylesheet, the By year sentence at 150%:

320 at 150% 430 at 200% 390 at 200% 360 at 200% 320 at 200%
main publication / s publication / s publicatio / ns publicati / ons publica / tions
this branch publica- / tions (Chromium and WebKit) hyphenated hyphenated hyphenated publica / tions

390 at 100% and 1440 at 200% are unchanged (no word breaks). npm run quality:fallow -- --base origin/main (pass), npm run check:ui-rules, eslint on the file.

…en on a phone, not one letter alone

#943's break-words broke "publications" wherever it ran out, leaving "s" alone on a line at 320 and 150% and at 430 and 200%. With hyphens-auto it breaks where English allows ("publica-tions").
@coderabbitai

coderabbitai Bot commented Nov 27, 2026

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 4132726f-f426-48b9-bfdf-8e06db6730e0
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-27T08:05:11.354214Z c1d3ee4 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@sickerine

Copy link
Copy Markdown
Collaborator Author

Closing: measured on Sources QA and OpenDevEd Test's home pages, hyphens-auto also splits words that fit their line at normal text on phones, in Chromium ("tutoring", "researchers", "communities" at 320 and 430) and WebKit ("analysts", "before", "record" at 320 and 390). That changes the normal-text layout, which the fix must not. The lone letter goes to the product owner as a decision instead.

@sickerine sickerine closed this Nov 27, 2026
@sickerine
sickerine deleted the fix/home-reading-hyphens branch November 27, 2026 08:18
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.

1 participant