[PER-10447] Web app not refreshing consistently#921
[PER-10447] Web app not refreshing consistently#921aasandei-vsp wants to merge 2 commits intomainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #921 +/- ##
==========================================
+ Coverage 48.25% 48.49% +0.23%
==========================================
Files 350 350
Lines 11320 11328 +8
Branches 1892 1895 +3
==========================================
+ Hits 5463 5494 +31
+ Misses 5667 5642 -25
- Partials 190 192 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
slifty
left a comment
There was a problem hiding this comment.
The code looks great! Thank you for organizing this so that the two fixes were in separate commits, made it super easy to review.
I did have one place you might consider DRYing, but this was a small enough change that I don't need to do a full additional review / feel free to ignore the thought.
| this.keywords = this.currentRecord.TagVOs.filter( | ||
| (tag) => !tag.type.includes('type.tag.metadata'), | ||
| (tag) => | ||
| !tag.type.includes('type.tag.metadata') && |
There was a problem hiding this comment.
This pair of checks is repeated in two places and is complex enough to not necessarily be clear at a glance what it's doing. All this is to say, if it could be in a named function I think that would DRY it and make it more self-documenting.
E.g. tagExistsAndIsMetadata
When deleting a record or a folder, the current folder was not retrieved from the BE, so the list would have stale data. The deleted item would appear as disabled, but it should be removed from the list. Issue: PER-10447
When removing a keyword from the archive settings, the currently open file would not be updated and stale keywords would appear. The current record subscribes to tags changes and then compares the record keywords with the ones from the archive and makes sure it only shows the ones that are still present in the archive. Issue: PER-10447
d6a83b6 to
67c58f7
Compare
PER-10447
STEPS TO TEST
Delete record
EXPECTED: The deleted file will disappear from the list of records/folders.
Delete folder
EXPECTED: The deleted folder will disappear from the list of records/folders.
Delete keyword sidebar
EXPECTED: The deleted keyword will no longer appear in the sidepanel of the file
Delete keyword file viewer
EXPECTED: The deleted keyword will no longer appear in the keywords modal
EXPECTED: The deleted keyword will no longer appear on the side of the file viewer
!!!!OBSERVATION: The inconsistent reload in the app is not a generic problem, every case presented above had a very specific fix. In order to make the reload more consistent, we would need to go through the whole app and pick each inconsistent behavior one by one.