Open caripizza opened 3 years ago
@babakbolour For this case, can we hardcode the direction of numbers with their respective symbols to be LTR (using the LTR mark character) or do they need special handling for RTL?
@raje9276 what does CLDR say?
one comment I have, if we are ONLY display the digits in western numbers, then I dont think the negative sign position matter as much. However if you are display the number using indic/native digits, then the negative sign position may matter.
@jcfranco you are correct to fix the issue when using the western number we need to add LTR marker.
Negative sign is a direction neutral string it comes first then followed by the Latin numbers which are LTR
As per CLDR it should same as English.
Note that this also applies to <calcite-input>
and not only <calcite-slider>
. We just noticed the same thing in the Editor
widget and the editing tooltips we display in the Maps SDK for JavaScript.
Another question from the Maps SDK for JavaScript about the <calcite-input>
.
Is it the expected RTL UX that while typing in a number, the blinking cursor is shown at the left - i.e. not where the new numbers are added? (see attached video)
https://github.com/Esri/calcite-design-system/assets/85623288/93266f47-7aa3-4ae3-92ad-1b22f776f84e
Also, that the decimals separator is shown for a moment on the left, and later "jumps" to the right?
@brittneytewks @gsoosalu as for the negative sign, it should display to the right if the number is Indic representation. if it is shown as Western digits, then the negative sign can be to the left. wert the cursor movement, if it can be fixed so the cursor follows the direction of numbers being added, then great. However this is not a must! We have seen many non-Esri softwares that also behaves like ours currently. so it can be considered as expected. @annierm18
Actual Behavior
When a calcite-slider sits on an rtl page, it displays negative values with hyphens after the tick-label and handle-label numbers. (Ex:
10-
)Negative values should have their minus sign before the number, regardless of dir on the page.
Also reported by the Maps SDK for JS team on 1/2/2024:
Expected Behavior
When a calcite-slider sits on an rtl page, it displays negative values with hyphens before the tick-label and handle-label numbers. (Ex:
-10
)from the Maps SDK team:
Reproduction Steps and Sample
Updated to
2.1.0
Codepen: https://codepen.io/im-the-developer/pen/KKEdEQXThis can be reproduced by
rtl
Previous reported Codepen - https://codepen.io/caripizza-the-animator/pen/powMWYZ
Sample:
dir="rtl"
attribute value)label-ticks
orlabel-handles
attributes so labels displayRelevant Info
This behavior occurs in RTL languages.
This behavior also occurs on FF/Edge Chromium/Safari browsers.