You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add an Item lens for web-details to display as "biblioteksspecifika detaljer" on instance pages:
.
Displayed per holder instead of per prop as previously. Ok?
Mapped as itemInformation to align with filter "Bestånd", even though "Bestånd" also includes itemShelf properties not displayed here. Too confusing?
I also went out on a limb and vibe coded a function to cleanup the decorated data. The aim was to get rid of empty nodes mainly caused by hasComponent (that might have stuff we want to display but usually not):
Basically we have no way of knowing if a branch in displayDecorated ends up as a dead end:
hasComponent should be handled in some way. Render it the same way as editions in the holdings panel? i.e. grouped with a vertical bar. flatten when 1 component?
should show the props inside hasComponent, not hasComponent:
I think marc:hasTextualHoldingsBasicBibliographicUnit (Oformaterad beståndsuppgift - Huvudpublikation) should only be shown in the holding panel? Not in details.
I think marc:hasTextualHoldingsBasicBibliographicUnit (Oformaterad beståndsuppgift - Huvudpublikation) should only be shown in the holding panel? Not in details.
ok, fixed in 32aeb69 hasNote is in both shelf (panel) and in details. Maybe same thing there, only in panel?
removing hasNote would also fix the hasComponent issue in your example. Don't know if there are others...
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
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.
Description
Solves
Add an
Itemlens forweb-detailsto display as "biblioteksspecifika detaljer" on instance pages:itemInformationto align with filter "Bestånd", even though "Bestånd" also includesitemShelfproperties not displayed here. Too confusing?I also went out on a limb and vibe coded a function to cleanup the decorated data. The aim was to get rid of empty nodes mainly caused by
hasComponent(that might have stuff we want to display but usually not):Basically we have no way of knowing if a branch in
displayDecoratedends up as a dead end:It we squash it like 👇 we can decisively skip the entire section
Cleaning is now done as the last step of
lensAndFormatand seems to be working fine.However:
Summary of changes
item-web-detailslens, format and pass as resourceitemInformation<details>section inResourcecomponent/cleanupDecorated.tsshelfData->itemShelf(= Placering)itemNoteData->itemNote(= Beståndsuppgift)immediateAcquisitionfrom shelf to information.