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] Apps page loading indefinitely if no Markeplace data #18274

Merged
merged 5 commits into from
Jul 17, 2020
Merged

Conversation

gabriellsh
Copy link
Member

Proposed changes

Issue(s)

How to test or reproduce

Screenshots

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • Improvement (non-breaking change which improves a current function)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Hotfix (a major bugfix that has to be merged asap)
  • Documentation Update (if none of the other choices apply)

Checklist

  • I have read the CONTRIBUTING doc
  • I have signed the CLA
  • Lint and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works (if applicable)
  • I have added necessary documentation (if applicable)
  • Any dependent changes have been merged and published in downstream modules

Changelog

Further comments

Copy link
Member

@d-gubert d-gubert left a comment

Choose a reason for hiding this comment

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

I don't think this solves the underlying problem.

If the request to the Marketplace errors out, it will throw and the code will go to the catch clause, leaving the table in loading state.

But even if it didn't, the provider still waits for the Marketplace request to finish before it shows the installed apps. This makes the wait time longer to see data that is not that useful in the Apps page, for instance.

The best solution would be to decouple both requests, and prioritize the local apps list instead of the Marketplace one. In this way, the screen would quickly show results in the list while the Marketplace request (which takes longer to complete) finishes and complements the data being shown later.

This is even more beneficial to the Apps page, in which the Marketplace data for the apps is less relevant than the actual list of installed apps.

@d-gubert
Copy link
Member

As a further note, this hurts us @RocketChat/apps during our development of Apps-Engine features, because we usually install the local version of the Apps-Engine, causing an error in the Marketplace request. Thus, our installed apps list does not appear 😞

@gabriellsh gabriellsh requested a review from d-gubert July 15, 2020 22:32
@shiqimei
Copy link
Contributor

I made a PR before #16258 for the non-react version. The thought is to lazy-load category labels and renders apps list first. Besides rendering local apps first, lazy-loading category labels is needed for apps installed from the marketplace here too.

@rodrigok rodrigok added this to the 3.4.3 milestone Jul 17, 2020
@ggazzo ggazzo merged commit 12f5ce7 into develop Jul 17, 2020
@ggazzo ggazzo deleted the fix/appsPage branch July 17, 2020 03:40
@sampaiodiego sampaiodiego mentioned this pull request Jul 28, 2020
@sampaiodiego sampaiodiego removed this from the 3.4.3 milestone Jul 31, 2020
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.

None yet

7 participants