-
Notifications
You must be signed in to change notification settings - Fork 166
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
Add history navigation to cache tab #1394
Conversation
#503 Bundle Size — 1.26MiB (+0.29%).Warning Bundle contains 12 duplicate packages – View duplicate packages Bundle metrics
|
Current #503 |
Baseline #499 |
|
---|---|---|
Initial JS | 1.23MiB (+0.3% ) |
1.22MiB |
Initial CSS | 0B |
0B |
Cache Invalidation | 91.15% |
0% |
Chunks | 5 |
5 |
Assets | 12 |
12 |
Modules | 944 (+0.43% ) |
940 |
Duplicate Modules | 45 |
45 |
Duplicate Code | 3.87% (-0.26% ) |
3.88% |
Packages | 160 |
160 |
Duplicate Packages | 9 |
9 |
Bundle size by type 1 change
1 regression
Current #503 |
Baseline #499 |
|
---|---|---|
JS | 1.23MiB (+0.3% ) |
1.22MiB |
IMG | 35.85KiB |
35.85KiB |
HTML | 810B |
810B |
Other | 778B |
778B |
Bundle analysis report Branch jerel/cache-history Project dashboard
{ | ||
variants: { | ||
variant: { | ||
error: [ |
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.
For now we only need the error
variant, so I've only implemented this one. We can add others as we need them.
@@ -39,9 +46,11 @@ function filterCache(cache: Cache, searchTerm: string) { | |||
); | |||
} | |||
|
|||
const history = new History("ROOT_QUERY"); |
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.
Instantiating this outside of the component allows us to keep the history when changing tabs, otherwise this resets anytime the Cache
component unmounts.
setCacheId={setCacheId} | ||
searchTerm={searchTerm} | ||
/> | ||
<List> |
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.
This component was fairly small and "EntityList" wasn't a super great name for this anyways, so I went ahead and inlined the implementation here and removed the old component.
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.
Great feature that will make navigating the cache much nicer! 🚀
return ( | ||
<Root> | ||
<Root delayDuration={delayDuration}> |
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.
Nice UX detail 💯
Adds a forward/back button with history to the cache tab. This should make it easier to navigate back and forth when digging into more complex objects that have lots of nested normalized data.
Previously getting back to where you were would require you to start back at either the root query or have to manually search the cache for the entry you came from.