Repository navigation
Remove User File Service Local Cache - #1486
Merged
Merged
Conversation
Updated Files: - user-file-service.ts - stub-user-file.service.ts - source-tables.service.ts - user-file-section.component.ts - user-file-upload.service.ts - user-project-section.component.ts - ngbd-modal-add-project-file.component.html - ngbd-modal-add-project-file.component.ts - user-project.service.ts
Contributor
Author
|
Previous Discussion The current workaround I have is the In the original UserFileService, it would indicate a user file changed upon a refresh / clear of the files. So I updated the UserFileSection to invoke Would this be a good way to handle the source table service updating files? |
Contributor
|
Discussion 2022.05.12: @zuozhiw will review this PR. |
zuozhiw
approved these changes
Jun 1, 2022
zuozhiw
left a comment
Contributor
There was a problem hiding this comment.
Looks good, I've made some minor changes
yangzhang75
pushed a commit
to yangzhang75/texera
that referenced
this pull request
Jun 22, 2026
* Remove UserFileService local cache + update dependent references Updated Files: - user-file-service.ts - stub-user-file.service.ts - source-tables.service.ts - user-file-section.component.ts - user-file-upload.service.ts - user-project-section.component.ts - ngbd-modal-add-project-file.component.html - ngbd-modal-add-project-file.component.ts - user-project.service.ts * Reformat files + make compatible with new frontend libraries * Reverted notificationService change, not relevant to current PRs * minor changes * minor * format * revert Co-authored-by: zuozhiw <[email protected]>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

Introduction
Reopened PR of #1476
This PR refactors the code in the
UserFileServiceto remove its local cache of DashboardUserFileEntries. It also updates all components depending on or using theUserFileService. The goal is to reduce usage of local caches within the user dashboard as well as simplify reuse of theUserFIleSectionComponentin theUserProjectSectionComponent.Solution
Previously the
UserFileServicemaintained a local cache of DashboardUserFileEntries and required components to invoke a function to continuously refresh this local cache. This also required components to continuously retrieve files from theUserFileServicein case the cache might have changed. As a solution, theUserFIleServiceno longer keeps a local cache of DashboardUserFileEntries and now has a public function to retrieve DashboardUserFileEntries from a backend endpoint.Detailed List of Changes Made
Changes were made only to the frontend.
user-file-service.tsstub-user-file.service.tssource-tables.service.tsuser-file-section.component.tsuser-file-upload.service.tsuser-project-section.component.tsngbd-modal-add-project-file.component.htmlngbd-modal-add-project-file.component.tsuser-project.service.tsFuture TODOs
UserFileServiceto modify / reuseUserFileSectioncomponent withinUserProjectSection