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

chore: Improve time to load org UI #2044

Merged
merged 8 commits into from
Aug 26, 2024
Merged

Conversation

SuaYoo
Copy link
Member

@SuaYoo SuaYoo commented Aug 21, 2024

Resolves #2015

Changes

Improves time to first load an org with the following:

  • Users user info from login response to set org slug and route user on log in
  • Stores user info in session storage so that it's available on reload
  • Stores app settings in local storage until user logs out
  • Loads critical org components synchronously

Manual testing

Log in as superadmin and regular user. App should feel like it loads slightly faster/more responsive.

Follow-ups

We could probably store app settings for longer in local storage. Maybe based on the app version number, or a longer expiry date.

@SuaYoo SuaYoo marked this pull request as draft August 21, 2024 22:31
@SuaYoo SuaYoo marked this pull request as ready for review August 21, 2024 22:32
@SuaYoo SuaYoo force-pushed the frontend-improve-org-load-time branch from 8803af8 to 69a9805 Compare August 21, 2024 23:15
Copy link
Member

@Shrinks99 Shrinks99 left a comment

Choose a reason for hiding this comment

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

Tested, seems to work!

Eslint has one warning, still haven't figured out why I get these when other people don't... Maybe worth checking?

/Users/henry/Documents/GitHub/webrecorder/browsertrix/frontend/src/index.ts
  812:50  warning  Unsafe argument of type `any` assigned to a parameter of type `APIUser`  @typescript-eslint/no-unsafe-argument

@SuaYoo SuaYoo merged commit 2a057ed into main Aug 26, 2024
2 checks passed
@SuaYoo SuaYoo deleted the frontend-improve-org-load-time branch August 26, 2024 17:45
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.

chore: Use user info from login response
2 participants