Adds right-to-left script option.#281
Open
WicCaesar wants to merge 2 commits intoDenverCoder1:mainfrom
Open
Conversation
Implements right-to-left script (rtl) functionality to Typing SVG, meaning the animation will start from the right if true. Useful for languages such as Arabic, Hebrew, Urdu, or simply for style.
Implements right-to-left script (rtl) functionality to Typing SVG, meaning the animation will start from the right if true. Useful for languages such as Arabic, Hebrew, Urdu, or simply for style. Testers wanted.
DenverCoder1
requested changes
Jan 28, 2024
| [](https://github.com/UlisesAlexanderAM "UlisesAlexanderAM on GitHub") | ||
| [](https://github.com/SpookyJelly "SpookyJelly on GitHub") | ||
| [](https://github.com/cfcife "cfcife on GitHub") | ||
| [](https://github.com/majidtdeni666 "majidtdeni666 on GitHub") |
Owner
There was a problem hiding this comment.
Adding/removing examples is off topic for this PR and preferably a separate branch/PR should be opened for unrelated changes
| | `background` | Background color of the text (default: `00000000`) | string | Hex code without # (eg. `FEFF4C`) | | ||
| | `center` | `true` to center text or `false` for left aligned (default: `false`) | boolean | `true` or `false` | | ||
| | `vCenter` | `true` to center vertically or `false`(default) to align above the center | boolean | `true` or `false` | | ||
| | `rtl` | `true` to use right-to-left script (Arabic, Hebrew…) (default: `false`) | boolean | `true` or `false` | |
Owner
There was a problem hiding this comment.
What if instead of having a parameter, it could determine the direction to display the text based on the directionality of the first unidirectional character (eg. if it starts with an English letter it's LTR, if it starts with Arabic it's RTL, standard punctuation is ignored)? Alternatively, it could be determined based on a count comparison of RTL vs LTR characters. By making it automatic, it could simplify configuration and the demo site.
Feel free to let me know what you think.
This comment has been minimized.
This comment has been minimized.
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
Implements right-to-left script (rtl) functionality to Typing SVG, meaning the animation will start from the right if true. Default is still false.
Useful for languages such as Arabic, Hebrew, Urdu, or simply for style. Testers wanted.
Type of change
How has this been tested?
composer test.