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

[Task] All-Archives view should avoid querying backend between re-rendering #552

Open
tthvo opened this issue Oct 14, 2022 · 0 comments
Open
Labels
chore Refactor, rename, cleanup, etc.

Comments

@tthvo
Copy link
Member

tthvo commented Oct 14, 2022

Right now, the parent AllArchivedRecordingsTable holds all states (i.e. counts, directories and its recordings) and query back-end on listened notifications, which trigger the entire table re-rendering.

The new view works differently in that notifications refresh the entire page. This is done because the querying to the backend actually happens in the parent component AllArchivedRecordingsTable which contains multiple nested ArchivedRecordingsTables <- these normally update state by themselves but the new view has a entirely different set of api calls that don't depend on jvmIds and such so I would have to create a new ArchivedRecordingsTable-like component to properly handle notifications instead of just refreshing the page, which I haven't done. It is entirely possible to do, but I'm not sure if this the current state is okay enough since tomorrow is the deadline.

One way to go around this issue (i.e. similar to AllTargetArchive) is that the parent AllArchive can query only the list of directories and counts. Then, pass in an optional DirectoryOptions props including the directory info to the ArchiveTable. Then, the archive can check if this option is available, and make the api calls to fetch recordings for that directory. I think we should do the same for uploads. But this seems to require some refactoring and maybe backend supports :D

Originally posted by @tthvo in #550 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Refactor, rename, cleanup, etc.
Projects
No open projects
Status: Stretch Goals
Status: Pushed to 2.4.0
Development

No branches or pull requests

1 participant