-
Notifications
You must be signed in to change notification settings - Fork 31
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 stale data when clicking back button to stateless app #2565
Merged
Merged
Changes from 4 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
dc27625
disabling cache of formdata when in a stateless app
adamhaeger ffae3f3
Fixed tests, cleand up code and added comments
adamhaeger 26fee68
Merge branch 'main' into fix/2564-back-button-stale-data
adamhaeger 25586e7
Merge branch 'main' into fix/2564-back-button-stale-data
adamhaeger 52329da
Merge branch 'main' into fix/2564-back-button-stale-data
adamhaeger c3df7b1
temp disable screenshort to see if it fixes test
adamhaeger f01860a
updated percy cli and trying to navigate back in a different way in test
adamhaeger bb1b75d
Merge branch 'main' into fix/2564-back-button-stale-data
adamhaeger f47610b
Merge branch 'main' into fix/2564-back-button-stale-data
adamhaeger a751f92
removed test to debug
adamhaeger dafac6b
merge
adamhaeger 879cfc2
Merge branch 'main' into fix/2564-back-button-stale-data
adamhaeger 47e81d2
Added back test with timeout
adamhaeger dc00b35
Added back test with timeout
adamhaeger 6a130f2
test update
adamhaeger File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Skal ikke hindre merge, men bare noen tanker 😄
Kunne det vært nyttig å sette
staleTime
i stedet forgcTime
for at senere fetches skal hente med stale-while-revalidate?En annen tanke er også at
isStateless
-variabelen har noe å si hvor hva som returneres, og burde da kanskje være iqueryKey
-en? Typ[...queryKey, { isStateless }]
eller noe sånn at man har forskjellig queryKey for stateful og stateless.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.
Hvis vi har har stale-while-revalidate, vil vi ikke da vise gammel data til vi har fått ny data? Det vil vi ikke i det tilfellet denne buggen kommer fra ihvertfall siden de bruker denne dataen til å vise om man har startet på skjemaet eller ikke. Vi ville da vist siden med "start nytt skjema" først, og så "Fortsett på skjema" når dataen er lastet.
Litt usikker på hva vi vinner på å ha isStateless i queryKey? At vi trigger query når isStateless forandrer seg?
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.
Query keyen bør allerede være forskjellig når man er i stateless siden query keyen er basert på url-en den henter ifra. For stateful er det url til data-elementet, men for stateless er det en annen url som refererer til data-typen som brukes i stateless (siden det ikke finnes noe data element da)