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

Optimise usage of setLoading/setSubmitting functions #508

Merged
merged 1 commit into from
Oct 25, 2023

Conversation

lorumic
Copy link
Contributor

@lorumic lorumic commented Oct 25, 2023

Done

  • Optimised usage of setLoading(false) and setSubmitting(false) throughout the app, following these criteria:
    • In the general case or when there's only a notification with no navigation, setLoading/setSubmitting should be called inside the finally block.
    • When there's navigation, setLoading/setSubmitting should be called inside the catch block (not needed for the success block as we navigate).
  • Removed some duplicates (e.g. calls to setLoading in the success block when there was already a call in the finally block).

Files affected by #506 are intentionally excluded from the scope of this PR.

QA

  1. Run the LXD-UI:
    • On the demo server via the link posted by @webteam-app below. This is only available for PRs created by collaborators of the repo. Ask @lorumic or @edlerd for access.
    • With a local copy of this branch, run as described here.
  2. Perform the following QA steps:
    • Check that all the affected buttons look and behave as expected

@webteam-app
Copy link

Demo starting at https://lxd-ui-508.demos.haus

Copy link
Collaborator

@edlerd edlerd left a comment

Choose a reason for hiding this comment

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

LGTM

@lorumic lorumic merged commit ece5c7e into canonical:main Oct 25, 2023
5 checks passed
@lorumic lorumic deleted the optimise-loading-submitting branch October 25, 2023 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants