Skip to content

Commit b6cf32e

Browse files
committed
update media
1 parent de6fe92 commit b6cf32e

File tree

5 files changed

+40
-1
lines changed

5 files changed

+40
-1
lines changed
Binary file not shown.
Binary file not shown.
Lines changed: 33 additions & 0 deletions
Loading

packages/dev/docs/pages/assets/rtl-timefield.svg

Lines changed: 2 additions & 1 deletion
Loading

packages/dev/docs/pages/blog/rtl-date-time.mdx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import {BlogPostLayout, Video, Track, Image} from '@react-spectrum/docs';
1111
export default BlogPostLayout;
1212

1313
import RTLTimefield from '../assets/rtl-timefield.svg';
14+
import RTLActualPlaceholder from '../assets/rtl-actual-placeholder.svg';
1415
import localeVideoURL from 'url:../assets/datefield-locales.mp4';
1516
import placeholderVideoURL from 'url:../assets/datefield-placeholder.mp4';
1617
import keyboardVideoURL from 'url:../assets/rtl-keyboard.mp4';
@@ -50,6 +51,10 @@ We found the culprit to be two things. First, we were applying `display: flex` o
5051

5152
While it seemed like a relatively simple fix, we later discovered through testing that this only corrected the format when segments contained actual values. If they had placeholder values, the order was still incorrect, causing some undesirable behaviors. It seemed that the Unicode Bidirectional Algorithm was interpreting placeholder values differently from actual values. As a result, when a segment was cleared back to its placeholder, it would shift back to the incorrect order. Furthermore, when a user entered a value, the segment would shift back to its correct order. This posed an interesting challenge: how do we ensure consistent formatting regardless of whether a segment contained a placeholder or a user-entered value — all without hard coding segment order for each locale?
5253

54+
Below is an example of how the dates were being formatted based on user-entered or placeholder values along with a video to demonstrate the shifting behavior:
55+
56+
<RTLActualPlaceholder />
57+
5358
<Video src={placeholderVideoURL} loop autoPlay muted />
5459

5560

0 commit comments

Comments
 (0)