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

Manually merged release-0.4.1 branch and 27-new-caching-solution. #46

Merged
merged 6 commits into from
Jul 3, 2024

Conversation

mpetojevic
Copy link
Contributor

27-react-query-caching contains all changes from 27-new-caching-solution. I had to manually merge my old branch with release-0.4.1 due to modifications in file selection for pushing, not present in the original 27-new-caching-solution branch, leading to many conflicts. In the 27-react-query-cachingchanges from release-0.4.1 and 27-new-caching-solution are integrated.

Ref: #27

@mpetojevic mpetojevic requested a review from florian-jaeger May 1, 2024 10:37
@florian-jaeger florian-jaeger requested a review from meffmadd May 6, 2024 12:07
package.json Outdated
@@ -73,7 +73,8 @@
"@mui/material": "^5.13.4",
"@mui/system": "^5.13.2",
"@mui/x-date-pickers": "^6.19.0",
"@tanstack/react-query": "^5.20.5",
"@tanstack/react-query": "^5.27.5",
"@tanstack/react-query-devtools": "^5.27.8",
Copy link
Member

@meffmadd meffmadd May 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

react-query-devtools sounds more like a dev dependency

id="alert-dialog-description"
sx={{ fontSize: 10, fontFamily: "'Roboto Mono', monospace" }}
>
{logs}
Copy link
Member

@meffmadd meffmadd May 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could be rewritten as {logs || "No logs available"} to omit the second Typography element

Copy link
Member

@meffmadd meffmadd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The implementation looks very clean!

2 points:

  • I don't think caching is configured correctly. The reason we wanted to switch to Tanstack Query is to have client-side caching. When I go to the coursemanage view, click on a lecture, go back, click on the same lecture again, etc., there are always requests made through the request service. I think the staleTime has to be set to be >0?
  • We can then remove the current HTTP browser-based caching by removing the @cache decorator from the tornado handler functions.

Copy link
Contributor

@florian-jaeger florian-jaeger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job! I experienced the redundant data fetching as well that @meffmadd pointed out.

… Omitted unnecessary Typography element in edit-submission.tsx.

#27
Added react Dev Tools to Dev dependencise for debugging purposes, will be deleted from components later.
To Do: FileLists send requests for each file that is shown, which shouldnt be the case -> to fix.
…check file remote status of each file in the directory.
@mpetojevic mpetojevic merged commit 80a270c into release-0.4.1 Jul 3, 2024
5 checks passed
@mpetojevic mpetojevic deleted the 27-react-query-cachnig branch July 4, 2024 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants