Split deferred_user_data into two API endpoints.#3975
Merged
bjester merged 4 commits intolearningequality:unstablefrom Mar 15, 2023
Merged
Split deferred_user_data into two API endpoints.#3975bjester merged 4 commits intolearningequality:unstablefrom
deferred_user_data into two API endpoints.#3975bjester merged 4 commits intolearningequality:unstablefrom
Conversation
Contributor
Author
|
Hi @bjester, can you review the PR? |
Member
|
@akash5100 If this is ready for review, please mark it as "ready for review". Keeping the PR in draft signals that you are still working on the PR. |
… API token and user storage data
akash5100
commented
Mar 12, 2023
contentcuration/contentcuration/frontend/settings/vuex/index.js
Outdated
Show resolved
Hide resolved
bjester
requested changes
Mar 15, 2023
Member
bjester
left a comment
There was a problem hiding this comment.
Thanks @akash5100! It's nearly ready to merge. I left a few comments for things that need changed.
contentcuration/contentcuration/frontend/settings/pages/SettingsIndex.vue
Outdated
Show resolved
Hide resolved
contentcuration/contentcuration/frontend/settings/vuex/index.js
Outdated
Show resolved
Hide resolved
bjester
approved these changes
Mar 15, 2023
Member
bjester
left a comment
There was a problem hiding this comment.
Manual testing looks good! Thanks @akash5100 and @vkWeb for helping out.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Description of the change(s) you made
This pull request addresses the performance issue by splitting the deferred user settings function into two separate functions.
settingsDeferredUserApiToken()function retrieves the API token, andsettingsDeferredUserSpaceByKind()retrieves space used by kind with throttling to avoid excessive requests.The
fetchDeferredUserData()function has been updated to retrieve both API token and space used by kind separately and then commit the result to the session usingPromise.all.Manual verification steps performed
usersettingspage and notice 2 API endpoints getting called.Screenshots (if applicable)
Before:
After:
Does this introduce any tech-debt items?
Reviewer guidance
How can a reviewer test these changes?
Are there any risky areas that deserve extra testing?
References
Comments
Contributor's Checklist
PR process:
CHANGELOGlabel been added to this PR. Note: items with this label will be added to the CHANGELOG at a later timedocslabel has been added if this introduces a change that needs to be updated in the user docs?requirements.txtfiles also included in this PRStudio-specifc:
notranslateclass been added to elements that shouldn't be translated by Google Chrome's automatic translation feature (e.g. icons, user-generated text)pages,components, andlayoutsdirectories as described in the docsTesting:
Reviewer's Checklist
This section is for reviewers to fill out.
yarnandpip)