-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
feat(perf): Fill out frontend-other tab #29545
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
Conversation
This fills out the frontend-other tab as well as fixing a couple issues with local storage between tabs (using a provider to add additional context about the current view to the key, the name isn't great though).
| name: 'CurrentPerformanceViewContext', | ||
| }); | ||
|
|
||
| export {CurrentPerformanceViewProvider}; |
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.
The current performance view context is a bit of a weird name, suggestions welcome.
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.
How about just PerformanceDisplayProvider?
size-limit report
|
| name: 'CurrentPerformanceViewContext', | ||
| }); | ||
|
|
||
| export {CurrentPerformanceViewProvider}; |
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.
How about just PerformanceDisplayProvider?
| const key = getContainerKey(index, performanceType, height); | ||
| const localObject = JSON.parse( | ||
| localStorage.getItem(getContainerLocalStorageObjectKey) || '{}' | ||
| ); | ||
| const value = localObject?.[key]; |
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.
Should this be refactored into some utility function to handle the parsing instead of directly using the localStorage API now that you're storing an object?
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.
Yeah that's a good call.
…dd-frontend-other
Summary
This fills out the frontend-other tab as well as fixing a couple issues with local storage between tabs (using a provider to add additional context about the current view to the key).