-
Notifications
You must be signed in to change notification settings - Fork 427
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
fix: prevent text overflow in Japanese #548
Conversation
70eace4
to
48ae36e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The style.css is the compiled "dist" file. These changes should go in the sass partial.
When it comes to the fix:
- Have we gotten any feedback from localization that
text-wrap: nowrap;
is ok with other locales as well? I don't see why it wouldn't be but maybe worth checking - What happens when the text is larger than the container? Will it stretch and break the layout?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We shouldn't edit the style.css
directly, as mentioned in the readme: https://github.com/zendesk/copenhagen_theme#stylesheet-and-javascript. In fact it is automatically hidden as a generated file.
We need to edit the source .scss file instead:
copenhagen_theme/styles/_request.scss
Line 135 in 6f47597
dt, dd { |
Do we also need to change the padding of the dd
element?
48ae36e
to
124eac8
Compare
Thank you, have discarded the changes, amended the correct file and run yarn to re-generate the files
Good question, I had checked quite a few languages https://pandora-v2.zende.sk/resources/accounts/184478 - and just realised the overflow wrap breaks for Greek 🤦 |
2d6af3a
to
47e8ded
Compare
Would |
47e8ded
to
e3fa82b
Compare
No, I did try but it had no effect. Have changed this to slighly reduce the container padding for the text by 5px while increasing the container 3%, so the text now looks good on most viewpoints - should I put this to Guntis for approval? Or would you recommend a different approach?
@Fredx87 I ended up changing the container instead to allow a little more text space due to Greek looking not good with overflow wrap for the text ![]() ![]() |
Looks ok in the screenshots you added but with the full layout I think it looks a bit broken without much space between the containers: ![]() I'm not a designer so we can still try to run this approach by Guntis but since it's not consistent with the other sidebars it would be nice to find another solution.
Did you try it along with the
When I use it by itself I do see a a difference in the rendering. Note the 3rd field no longer breaks at the same place: If we can confirm with a Japanese speaker that the second image reads correctly, then IMO that would be the correct fix. |
e3fa82b
to
7c47eac
Compare
I had expected the rule to not allow it to break at all even with nowrap disabled, hence finding it wasn't affecting the text - I didn't realise the difference
Confirmed with Yuko (native Japanese speaker) that its indeed fine to break at that point |
- In Japanese, allowing the text to wrap randomly changes the meaning of the word. Have confirmed with a Japanese speaker that using strict to allow the line to break still retains the correct meaning. - Used npm run build to make sure the asset minification isnt lost
7c47eac
to
1c568c7
Compare
🎉 This PR is included in version 4.2.5 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Description
In Japanese, having the single character broken into another line, provides another word meaning. We want to make sure the text is only broken at points that still preserve the message meaning of "Last activity"
Screenshots
Before
After
Checklist