Skip to content

Conversation

ra-anders
Copy link
Contributor

This PR adds two new panels to UV. One called "TextRightPanel" that shows transcribed texts from ALTO files (if present in the manifest), and one called "SearchLeftPanel" to search in transcribed texts (IIIF Content Search). This is the implementation we use at The Swedish National Archives (https://sok.riksarkivet.se/).

image

Known limitations:

  • Only works with ALTO files at the moment
  • The new search panel doesn't work well with zoomToSearchResultEnabled set to true.
  • If you decide to use the new search panel, disable the search in the footer.

To enable the new panels you add the following options to the settings file:
"searchLeftPanelEnabled": true
"textRightPanelEnabled": true

Copy link

vercel bot commented Jul 2, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
universalviewer ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 3, 2025 8:27am

@demiankatz
Copy link
Contributor

Thanks for sharing, @ra-anders! It looks like there are some type issues that are preventing this from compiling through GitHub Actions, which in turn is preventing the interactive preview from rendering. Please let us know if you need help resolving these issues!

@ra-anders
Copy link
Contributor Author

Thanks for sharing, @ra-anders! It looks like there are some type issues that are preventing this from compiling through GitHub Actions, which in turn is preventing the interactive preview from rendering. Please let us know if you need help resolving these issues!

Hi @demiankatz!
Sorry about that, should be fixed now.

@demiankatz
Copy link
Contributor

Thanks, @ra-anders! Could you share a couple of manifest URLs that are good for testing purposes? Now that we have a working example build, a manifest would help us begin testing it.

@ra-anders
Copy link
Contributor Author

ra-anders commented Jul 3, 2025

Thanks, @ra-anders! Could you share a couple of manifest URLs that are good for testing purposes? Now that we have a working example build, a manifest would help us begin testing it.

Hi!
Here's an example manifest: https://lbiiif.riksarkivet.se/arkis!A0067545/manifest (do a search for Stockholm), should work ok with the Wellcome library as well I think, just need to add this to "Custom Configuration":

{
  "options": {
   "searchLeftPanelEnabled": true,
   "textRightPanelEnabled": true
   }
}

@LanieOkorodudu
Copy link
Collaborator

Thank @ra-anders, and the rest of your team for sharing this work -- and for providing the manifest example as well.
You're right, it does work well with the default example. I’m doing a side-by-side comparison between the dev branch and this repo, and I’ve noticed that the font size appears slightly larger in both the left panel (Content-Thumbnail, and Index) and the right panel (More Info). I’m not opposed to the larger font size, it actually improves visibility! Just curious, is that part of the work done here as well?

@ra-anders
Copy link
Contributor Author

Ah! You're right @LanieOkorodudu, I forgot we have increased the font size in our UV. We got complaints saying the font was too small, so we made it bigger. I can remove that from the PR.

@LanieOkorodudu
Copy link
Collaborator

Ah! You're right @LanieOkorodudu, I forgot we have increased the font size in our UV. We got complaints saying the font was too small, so we made it bigger. I can remove that from the PR.

Ah, okay, please don’t remove anything for now. It’s just something I noticed. It would be great to get feedback from the rest of the team as well.

@LanieOkorodudu
Copy link
Collaborator

@demiankatz, I had a thought and wanted to get your input. Since we're in the config sprint, do you think it would make sense to introduce two new config options, searchLeftPanelEnabled and textRightPanelEnabled, into both the config documentation and the config builder, with their default values set to false for now, since we’re still in the process of reviewing and testing?

It might be helpful to have them in the builder just in case we want to showcase them or use them during any upcoming usability testing.

I’m not entirely sure about the full scope if we were to implement them now, so this would simply lay the groundwork without introducing immediate changes. Would love to hear your thoughts, do you think it's a good idea, or better to hold off for now? Thank you.

@demiankatz
Copy link
Contributor

demiankatz commented Jul 4, 2025

@LanieOkorodudu, I would suggest updating the documentation and adding the settings as part of this PR -- that way, the relevant documentation travels along with the associated code changes, and we don't confuse anyone by adding things to the other branches prematurely. (I think this is another strong argument for keeping the documentation in the code instead of the wiki, since it allows us to document forthcoming features along with the code that adds them, without creating confusion in the published docs).

@LanieOkorodudu
Copy link
Collaborator

@LanieOkorodudu, I would suggest updating the documentation and adding the settings as part of this PR -- that way, the relevant documentation travels along with the associated code changes, and we don't confuse anyone by adding things to the other branches prematurely. (I think this is another strong argument for keeping the documentation in the code instead of the wiki, since it allows us to document forthcoming features along with the code that adds them, without creating confusion in the published docs).

Yeah, that totally makes sense. Thanks for explaining it so clearly!

@jamesmisson jamesmisson self-requested a review September 4, 2025 13:40
@jamesmisson
Copy link
Contributor

Hi all, the BL team is ready to add code that addresses some bugs and enables Content Search 2 annotations/Presentation 3 manifests. I've already added some above, but as there will be further substantial additions, we should consider organizing the work outside of a PR to keep track.

I suggest we make a new branch on the community UV repo and merge this PR into that branch as a starting point. I can then add my suggestion above as a PR, and Saira and I can continue to open PRs against that branch. As @ra-anders has provided the foundational work here, it seems appropriate that the branch is created and owned by SNA, to give credit where it's due.

Does that sound like a good way forward? If there are preferable ways of working then I am open to them!

@ra-anders
Copy link
Contributor Author

I think this sounds like a great plan @jamesmisson. I'll email you and we can discuss it further.

@jamesmisson
Copy link
Contributor

This PR has now been moved to a separate branch, where we'll continue work on it, so I'll close this.

https://github.com/UniversalViewer/universalviewer/tree/annotations

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants