Displays author name on merge
Closes #9811
Displaying the author’s name next to the OL...A identifier making it easier to distinguish between works by different authors.
Technical
utils.js
Added get_author_name function to fetch the name of the author associated with the id and append to the record.
AuthorRoleTable.vue Added p tag to display authors name, as well as class to formate with CSS.
MergeTable.vue
Created enhancedRecords to include author name and added to template in order to display. Added CSS to display name next to ID.
*** I've not added enhancedRecords to the merge function in this file as I couldn't verify if this would impact what is saved when merging works. Can someone please clarify?***
Testing
- Run command
npm run serve --component=MergeUI. - Open merge view (http://localhost:8080/static/components/?records=OL1233242W,OL12312W)
- Verify merge view now displays the author names next to the ids
- Verify merging works as expected.
*** I was not able to find any JS tests for the files associated with this ticket. If needed, I can create if directed to the correct directory.***
Screenshot
Stakeholders
@cdrini
*** I've not added enhancedRecords to the merge function in this file as I couldn't verify if this would impact what is saved when merging works. Can someone please clarify?***
Yes that's exactly correct! We don't want to use enhanced_records during merging since then it'll try to save the author names in a weird place :P
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 17.12%. Comparing base (
ce16a79) to head (48a7178). Report is 484 commits behind head on master.
Additional details and impacted files
@@ Coverage Diff @@
## master #9920 +/- ##
==========================================
+ Coverage 16.06% 17.12% +1.06%
==========================================
Files 90 89 -1
Lines 4769 4752 -17
Branches 832 831 -1
==========================================
+ Hits 766 814 +48
+ Misses 3480 3428 -52
+ Partials 523 510 -13
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
https://testing.openlibrary.org/works/merge?records=OL6151392W,OL31613496W
@cdrini - I'm not able to access this unfortunately.
@cdrini - I think I've covered everything except the error - I'm not able to access the link you've included. Can you please take a look when you've got a minute?
Hi @DanielleInkster apologies for the delay, I was on holiday last week! IA/OL are currently offline, but I'll be able to test this once they're back up (see https://github.com/internetarchive/openlibrary/issues/9947#issuecomment-2406101534 ).