-
Notifications
You must be signed in to change notification settings - Fork 180
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
Split deferred_user_data
into two API endpoints.
#3975
Conversation
Hi @bjester, can you review the PR? |
@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
contentcuration/contentcuration/frontend/settings/vuex/index.js
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Manual testing looks good! Thanks @akash5100 and @vkWeb for helping out.
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
user
settings
page 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:
CHANGELOG
label been added to this PR. Note: items with this label will be added to the CHANGELOG at a later timedocs
label has been added if this introduces a change that needs to be updated in the user docs?requirements.txt
files also included in this PRStudio-specifc:
notranslate
class been added to elements that shouldn't be translated by Google Chrome's automatic translation feature (e.g. icons, user-generated text)pages
,components
, andlayouts
directories as described in the docsTesting:
Reviewer's Checklist
This section is for reviewers to fill out.
yarn
andpip
)