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

Documents list disappears when refresh browser. #120

Open
mihilt opened this issue May 5, 2023 · 1 comment
Open

Documents list disappears when refresh browser. #120

mihilt opened this issue May 5, 2023 · 1 comment
Labels
bug 🐞 Something isn't working help wanted 🦮 Extra attention is needed

Comments

@mihilt
Copy link
Contributor

mihilt commented May 5, 2023

Description:
As time went by, I began to realize that this PR(#114) causes ‘documents’ managed by redux to be lost when refreshing browser.

error.mp4

This is because, when browser is refreshed, state of the history object has persistence, but redux cannot maintain its redux store.

Not only refreshing browser, but user also can request ~/projects/:projectName/documents/:documentKey directly without clicking, so without fetching data inside useEffect was a problematic approach.

Maybe the attempt to solve issue with using ‘state’ of react-router was also bad approach from the beginning.

Why:

@mihilt
Copy link
Contributor Author

mihilt commented May 5, 2023

As #33, it seems to be better way to handle pagination through query string. However, as I checked, the isForward property seems to be enforced to fetch documents list on the server.

I'm not sure, maybe I didn't understand it perfectly, but to get the document list from Yorkie, I checked that it needs through 'ListDocuments' call in admin package from Yorkie.

However, for this purpose, to get list of documents for specific area, the values 'previousID' and 'isForward' should be needed, and since it is such a structure, there seems to be no way to get list with only 'page' information.

@hackerwins hackerwins added bug 🐞 Something isn't working help wanted 🦮 Extra attention is needed labels Oct 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐞 Something isn't working help wanted 🦮 Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants