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

[web] Fix install button #880

Merged
merged 2 commits into from
Nov 21, 2023
Merged

[web] Fix install button #880

merged 2 commits into from
Nov 21, 2023

Conversation

dgdavid
Copy link
Contributor

@dgdavid dgdavid commented Nov 21, 2023

Problem

At the time of removing the core-js dependency, we didn't realize that core/InstallButton.jsx component was making use of Promise.any and it stopped working as expected when asking by client.issues.any().

It's weird since the static Promise.any method is actually supported for all major browsers, but it is not working in the similar way as it was being polyfilled (just a rush conclusion from my side, I didn't investigate it deeply but just deliver a quick fix)

Solution

To use, at least by now, just plain (and a bit ugly) JavaScript code for determining if there are pending issues when the user hits the installation button.

Testing

  • Unit tests adapted to be less mocked.
  • Behavior tested locally too.

After removing the core-js dependency, `issues.any()` does not work
anymore. Thus, more plain JavaScript code has to be used to know if
there are any kind of issues.
@coveralls
Copy link

coveralls commented Nov 21, 2023

Coverage Status

coverage: 75.543% (+0.005%) from 75.538%
when pulling 9df6436 on fix-install-button
into c86c61d on master.

@dgdavid dgdavid merged commit 51a955d into master Nov 21, 2023
1 check passed
@dgdavid dgdavid deleted the fix-install-button branch November 21, 2023 15:32
@imobachgs imobachgs mentioned this pull request Dec 2, 2023
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