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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: avoid await async libphonenumber-js-utils import #350

Closed
wants to merge 1 commit into from

Conversation

mcataford
Copy link
Collaborator

Description

馃毀 WIP

This PR makes the async import of libphonenumber-js-utils (from initRequests) a blocking import, resolving the problem from #347 (and any RTL-related issue that has the async import not be ready in time for the test). The asynchronous import really seems to be causing trouble with test runners. Clients are probably safe because so many things are happening in the browser that the user can't see the delay between the async import start and resolution.

Since the component is inert until the validation logic is ready, which happens when the import is done, it might make sense to have this toggle a loading state of some kind.

This is still an experiment

Todo

  • Evaluate impact on usability
  • Implement loading state based on whether the import is ready or not.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have used ESLint & Prettier to follow the code style of this project.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@mcataford mcataford added this to In progress in June 2020 Jun 17, 2020
@mcataford mcataford closed this May 7, 2023
@mcataford mcataford deleted the resolve-async-import branch May 7, 2023 19:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
June 2020
In progress
Development

Successfully merging this pull request may close these issues.

None yet

1 participant