-
Notifications
You must be signed in to change notification settings - Fork 12
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
Fix load on enter #332
base: develop
Are you sure you want to change the base?
Fix load on enter #332
Conversation
…ws show up faster in dashboard)
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
I am calling setSearchResultsLoading() inside the useEffect that has searchResultsLoading as a dependency. Is this bad practice? |
I don't really like the solution. It works but it introduces an unnecessary state I feel like combining it with results.state is probable better but idk how to fully. |
Another problem: On search from landing page to dashboard, it calls DashboardEmpty and then DashboardError before the searchResultsTable Skeletons If I modify:
|
Can revert but lmk what you think of these changes to use Opinion: I don't feel the spinner in the search bar is all that necessary when the whole page changes to a loading state. Current issue (possibly unsolvable): There's also an issue when reloading/opening the dashboard (but not when navigating to it from the homepage) where the |
nvm the spinners grown on me
solved via a new MUI feature the topMenu does still jump around because CSS seems to be rendering it as mobile first and it doesn't update until JS is run. there might be a css solution |
solved! turns out using an actual media query instead of useMediaQuery fixes this. Probably since CSS is faster than JS |
|
Everything else works perfectly. Searches appear faster because there is less lag in between and code-wise it's very simple |
I think #298 caused both of these issues as they are present on that PR, dev, and prod. |
Overview
After https://github.com/UTDNebula/utd-trends/pull/298/files, since searching is initiated quicker, user feels some lag while waiting for search results
What Changed
Set the loading state quicker, and add a loading icon in the search button