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

UI: Refactor to use async/await syntax #11740

Open
agilgur5 opened this issue Sep 4, 2023 · 1 comment
Open

UI: Refactor to use async/await syntax #11740

agilgur5 opened this issue Sep 4, 2023 · 1 comment
Labels
area/ui solution/suggested A solution to the bug has been suggested. Someone needs to implement it. type/feature Feature request type/tech-debt

Comments

@agilgur5
Copy link
Contributor

agilgur5 commented Sep 4, 2023

Summary

Instead of using promises with many callbacks and chains, refactor to use the newer and cleaner async/await syntax where possible.

As mentioned in #11711

Use Cases

All UI logic that uses asynchronous promise chains


Message from the maintainers:

Love this enhancement proposal? Give it a 👍. We prioritise the proposals with the most 👍.

@agilgur5 agilgur5 added type/feature Feature request area/ui labels Sep 4, 2023
@agilgur5
Copy link
Contributor Author

agilgur5 commented Sep 4, 2023

A quick search on all appearances of .then in the UI showed mostly correct async code. There was one case that was parallelized and async with a render, but not sure if that was intentional or not (as it could potentially work fine that way). Some large chains though.

But the case of #11711 actually doesn't have a .then and a request could just end in a .get or .list etc, so that search above is a bit naive, but likely gets the majority of cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ui solution/suggested A solution to the bug has been suggested. Someone needs to implement it. type/feature Feature request type/tech-debt
Projects
Status: No status
Development

No branches or pull requests

1 participant