fix(TextLoop): prevent separator duplication causing overlap (#1062) - #1065
Open
MauryaQbit wants to merge 1 commit into
Open
fix(TextLoop): prevent separator duplication causing overlap (#1062)#1065MauryaQbit wants to merge 1 commit into
MauryaQbit wants to merge 1 commit into
Conversation
…path Default text contained the separator glyph, producing two separators per repetition (REACT [star] BITS [star]) which breaks textLength/lengthAdjust fitting in Firefox so a separator can land on top of a letter. - Change default text from 'React [star] Bits' to 'React Bits' - Sanitize unit construction to strip separator occurrences and collapse whitespace, guaranteeing exactly one separator per repetition - Apply to all 4 variants (JS-CSS, JS-TW, TS-CSS, TS-TW) plus demo and usage example Fixes DavidHDev#1062
Author
|
@rorz can you review this pr |
Contributor
|
Confused as to why I am being mentioned here. This PR / issue has nothing to do with me. |
Owner
|
@rorz probably a mistake, feel free to disregard it |
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.
Fixes #1062
Bug
TextLoop default props used text='React [star] Bits' with separator='[star]'. After uppercase the repeated unit became 'REACT [star] BITS[NBSP][star][NBSP]', i.e. two separators per repetition. The duplicated glyph breaks the textLength / lengthAdjust fit on the SVG path in stricter browsers (Firefox, wave shape), so a [star] can land on top of a letter (usually R of REACT).
Fix
Review notes
Tests