[PER-10392] Update folder with children endpoint#903
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #903 +/- ##
==========================================
+ Coverage 47.91% 48.15% +0.23%
==========================================
Files 350 350
Lines 11321 11317 -4
Branches 1894 1890 -4
==========================================
+ Hits 5425 5450 +25
+ Misses 5707 5675 -32
- Partials 189 192 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
d3b69c3 to
0829f95
Compare
cecilia-donnelly
left a comment
There was a problem hiding this comment.
It looks like there are some inconsistencies between the endpoints (notably the capitalization of the thumbnail properties) that need to be addressed in the shim/translation that @slifty wrote earlier. Casting the records to any feels risky. Maybe let's chat about the tradeoffs?
src/app/core/components/profile-edit/profile-edit.component.spec.ts
Outdated
Show resolved
Hide resolved
60662bc to
e398726
Compare
cecilia-donnelly
left a comment
There was a problem hiding this comment.
This is working, thank you!
| thumbURL200: stelaRecord.thumbUrl200, | ||
| thumbURL500: stelaRecord.thumbUrl500, | ||
| thumbURL1000: stelaRecord.thumbUrl1000, | ||
| thumbURL2000: stelaRecord.thumbUrl2000, |
There was a problem hiding this comment.
Got it, so this is the new mapping.
There was a problem hiding this comment.
Got it, so this is the new mapping.
Yes, it was easier to do this mapping to RecordVO than try to map all URL to camelcase Url.
cecilia-donnelly
left a comment
There was a problem hiding this comment.
Sorry, meant to approve just now. :)
Thank you! |
omnignorant
left a comment
There was a problem hiding this comment.
This seems to be working! The only minor glitch I observed was that after setting the profile pic and leaving the profile editor, when I returned to it the pic was missing and I had to add it again. It definitely worked the second time and persisted through refreshes.
…dpoint The endpoint getLeanItems is from the old api and is quite slow, so we will be using the endpoint from the new api /folder/<folderId>/children instead. The only place it is used is the data service, so the observable will be transforming into a promise, which was what the fetchLeanItems method needed anyways.
… edit The profile edit component is used for fillind the profile information and the folder children endpoint provides the data for that. Because the old one had some different property names, thumbnailURL needs mapping and the archiveNbr is actually archiveNumber in the new endpoint. Because of the archive number mismatch, the banner does not update at the moment. Issue: PER-10392 Stop using folder/getLeanItems
The thumbnail properties in the StelaRecord use camelcase for url and in the RecordVO it's all caps lock. In order to be consistent all over the app, all thumbnail properties will use caps lock for URL. Ex: thumbnailURL200 Issue: PER-10392
The updateRootColumns endpoint uses the archiveNbr property to generate the image for the banner. The record object has both the archiveNbr and the archiveNumber, both having the same value. So we will be using the archiveNbr for consistency, because it is the correct property from RecordVO. Issue: PER-10392
e398726 to
5aec324
Compare
Solves isssue: https://permanent.atlassian.net/browse/PER-10392
STEPS TO TEST:
Private workspace
EXPECTED: All files are loading correctly and can be previewed
Record preview
EXPECTED: The file preview appears
EXPECTED: All files should preview correctly.
Change profile information for archive
EXPECTED: All filled data will remain in the form(especially the image and the banner)
EXPECTED: All the data filled at steps 3,4 and 5 is still there(especially the image and the banner)
EXPECTED: All the data filled at steps 3,4 and 5 is still there(especially the image and the banner)