fix(MWPW-190279): locale-aware line-break rules for DE, BR, RO, JP in prompt-bar#748
Open
fix(MWPW-190279): locale-aware line-break rules for DE, BR, RO, JP in prompt-bar#748
Conversation
|
Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
Commits
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes MWPW-190279 — line breaking issues visible in the prompt-based Unity block on localized pages (de-DE, pt-BR, ro-RO, ja-JP).
Although the affected pages have since been migrated to the new upload marquee experience, the underlying block had no locale-aware line-breaking rules. This fix makes the block robust for future use across both
hero-marqueeandupload-marqueecontexts.Root Cause
The
.inp-wrap .inp-fieldtextarea and heading/body text elements in unity-enabled marquee blocks had nooverflow-wrap,word-break, or locale-aware line-breaking rules. Languages like German and Romanian produce long compound words that overflow fixed-width containers without these guards. Japanese requires CJK-specific line-breaking rules (word-break: keep-all,line-break: strict) that differ from the Latin-script approach.Changes
File:
unitylibs/core/widgets/prompt-bar/prompt-bar.cssBase rule (all locales):
overflow-wrap: break-word,word-break: break-word, andhyphens: autoto heading and body text elements inside.hero-marquee.unity-enabledand.upload-marquee.unity-enabledinteractive areasoverflow-wrap: break-wordandword-break: break-wordto.inp-wrap .inp-field(the prompt textarea)Japanese override (
[lang="ja-JP"]):word-break: keep-allandline-break: strictto follow JIS line-breaking rulesoverflow-wrap: anywhere(instead ofbreak-word) to handle edge cases like Latin strings or URLs typed into a JA contexthyphens: auto(not applicable to CJK).inp-fieldprompt inputThis follows the existing
[lang="ja-JP"]locale override pattern already present in this file.Testing
Jira
MWPW-190279