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

Fix web datepicker text field illegal input crash #1368

Merged
merged 3 commits into from
May 23, 2024

Conversation

alexzhirkevich
Copy link

  • Update kotlinx.datetime to 0.6.0
  • Migrate locale-invariant web formatting/parsing to kotlinx.datetime
  • Catch parsing exceptions

Fixes JetBrains/compose-multiplatform#4856

Testing

KotlinxDatetimeCalendarModelTest.illegalDateParsingDoesNotThrowException

This should be tested by QA

Release Notes

Fixes - Web

  • Fixed crash when date picker text field receives illegal input

@MatkovIvan MatkovIvan requested a review from eymar May 23, 2024 09:24
@alexzhirkevich
Copy link
Author

Do you known why iOS CI runs here instead of web?

@eymar
Copy link
Collaborator

eymar commented May 23, 2024

Do you known why iOS CI runs here instead of web?

it seems that iOS tests run for all changes, regardless of the where the change was added.
web tests should run eventually too (they run on teamcity).

@alexzhirkevich
Copy link
Author

it seems that iOS tests run for all changes, regardless of the where the change was added.

Expensive macos runners aren't happy about that 😆

@eymar
Copy link
Collaborator

eymar commented May 23, 2024

anyway, in this case skikoTest was changed and the library version was updated, so it would make sense for iOS tests to run. And ideally to pass... But, CI doesn't want to generate the test report :D

Copy link
Collaborator

@eymar eymar left a comment

Choose a reason for hiding this comment

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

The tests passed locally on all platforms.

Thank you for this contribution :)

@eymar eymar merged commit 151b8e3 into JetBrains:jb-main May 23, 2024
1 of 2 checks passed
@alexzhirkevich alexzhirkevich deleted the web-safe-date-parsing branch May 24, 2024 12:30
MatkovIvan pushed a commit that referenced this pull request May 29, 2024
- Update kotlinx.datetime to
[0.6.0](https://github.com/Kotlin/kotlinx-datetime/releases/tag/v0.6.0)
- Migrate locale-invariant web formatting/parsing to kotlinx.datetime
- Catch parsing exceptions

<!-- Optional -->
Fixes JetBrains/compose-multiplatform#4856

## Testing

`KotlinxDatetimeCalendarModelTest.illegalDateParsingDoesNotThrowException`

<!-- Optional -->
This should be tested by QA

## Release Notes

### Fixes - Web
- Fixed crash when date picker text field receives illegal input
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants