Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: follow-up for rtl date/time format #7685

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

yihuiliao
Copy link
Member

Closes

✅ Pull Request Checklist:

  • Included link to corresponding React Spectrum GitHub Issue.
  • Added/updated unit tests and storybook for this change (for new code or code which already has tests).
  • Filled out test instructions.
  • Updated documentation (if it already exists for this component).
  • Looked at the Accessibility Practices for this feature - Aria Practices

📝 Test Instructions:

🧢 Your Project:

@@ -155,6 +155,10 @@ If the date field does not have a visible label, an `aria-label` or `aria-labell

Note that most of this anatomy is shared with [TimeField](TimeField.html), so you can reuse many components between them if you have both.

### Internationalization
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rob suggested that it would be a good idea to leave some kind of information regarding the CSS changes needed to ensure the date/time format properly in RTL locales. I decided to add it like this but let me know if you have other opinions where it should go or contents that it should include.

@rspbot
Copy link

rspbot commented Jan 30, 2025

@adobe adobe deleted a comment from rspbot Jan 30, 2025
@yihuiliao yihuiliao marked this pull request as ready for review January 30, 2025 01:00
snowystinger
snowystinger previously approved these changes Jan 30, 2025
@@ -31,7 +31,7 @@ export function useFormatHelpText(props: Pick<SpectrumDatePickerBase<any>, 'desc
return (
formatter.formatToParts(new Date()).map((s, i) => {
if (s.type === 'literal') {
return <span key={i}>{s.value}</span>;
return <span key={i}>{` ${s.value} `}</span>;
Copy link
Member Author

@yihuiliao yihuiliao Jan 31, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

noticed in chromatic when i ran it on main. just need to add some extra spacing since that's what we had before

@rspbot
Copy link

rspbot commented Jan 31, 2025

@adobe adobe deleted a comment from rspbot Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants