Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extending the thumbnail label to reveal more text #758 #950

Open
wants to merge 32 commits into
base: dev
Choose a base branch
from

Conversation

Saira-A
Copy link

@Saira-A Saira-A commented Jan 5, 2024

Issue #758
Screenshot 2024-01-19 at 01 00 01
Screenshot 2024-01-19 at 01 00 23

Copy link

codesandbox bot commented Jan 5, 2024

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

Copy link

vercel bot commented Jan 5, 2024

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 Feb 26, 2024 4:34pm

Copy link

codesandbox-ci bot commented Jan 5, 2024

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@edsilv
Copy link
Member

edsilv commented Jan 17, 2024

it looks like the label span isn't filling the whole width of its containing element? Might make things easier to read.
usually settings with checkboxes associated are located in the settings dialogue (cog icon, top right)

Copy link
Contributor

@demiankatz demiankatz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @Saira-A. I don't claim to have done a particularly thorough review, but a few small suggestions below.

We should talk about code reviews and PR handling at the next Community Call, to see what strategy we can come up with to keep things moving while @edsilv is busy elsewhere. I unfortunately don't have a lot of time to keep on top of UV things, but I'll at least try to help a little when I can. :-)

__tests__/test.js Outdated Show resolved Hide resolved
@demiankatz
Copy link
Contributor

@Saira-A, I also think some more work may be needed to support this functionality in extensions other than OpenSeadragon. At least, when I tested this with a multi-PDF manifest, the labels did not expand. You can see this here:

https://universalviewer-git-fork-saira-a-758-mnemoscene.vercel.app/#?xywh=-1210%2C-424%2C10923%2C8463&iiifManifestId=https%3A%2F%2Fdigital.library.villanova.edu%2FItem%2Fvudl%3A294631%2FManifest

@Saira-A
Copy link
Author

Saira-A commented Jan 24, 2024

@Saira-A, I also think some more work may be needed to support this functionality in extensions other than OpenSeadragon. At least, when I tested this with a multi-PDF manifest, the labels did not expand. You can see this here:

https://universalviewer-git-fork-saira-a-758-mnemoscene.vercel.app/#?xywh=-1210%2C-424%2C10923%2C8463&iiifManifestId=https%3A%2F%2Fdigital.library.villanova.edu%2FItem%2Fvudl%3A294631%2FManifest

I've done it so that when thumbnails are one up, they're extended by default as there's more space for them anyway so now the checkbox only affects two-up view

Copy link
Contributor

@demiankatz demiankatz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See below for a few more thoughts and minor nitpicks.

Beyond that, though, there seems to be a bigger issue. I definitely like what you've done with 1-up labels, but it seems that 2-up mode has somehow gotten broken in the process. When I look at the original test case, it comes up in 1-up mode and I don't see a way to switch it to 2-up.

Here's a link for convenience:

https://universalviewer-git-fork-saira-a-758-mnemoscene.vercel.app/#?xywh=-1538%2C0%2C11578%2C7617&iiifManifestId=https%3A%2F%2Fcollections.st-andrews.ac.uk%2F762295%2Fmanifest

package.json Outdated Show resolved Hide resolved
@Saira-A
Copy link
Author

Saira-A commented Jan 24, 2024

See below for a few more thoughts and minor nitpicks.

Beyond that, though, there seems to be a bigger issue. I definitely like what you've done with 1-up labels, but it seems that 2-up mode has somehow gotten broken in the process. When I look at the original test case, it comes up in 1-up mode and I don't see a way to switch it to 2-up.

Here's a link for convenience:

https://universalviewer-git-fork-saira-a-758-mnemoscene.vercel.app/#?xywh=-1538%2C0%2C11578%2C7617&iiifManifestId=https%3A%2F%2Fcollections.st-andrews.ac.uk%2F762295%2Fmanifest

I think this happened prior to my commit? I went back to the docs branch and it has the same issue, and there's no icons to switch between one and two up, yet other manifests look fine

Copy link
Contributor

@demiankatz demiankatz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @Saira-A, this is looking very good. I just had a few remaining comments, all but one of which are focused on trivial whitespace issues. (Did you run some kind of automated code formatting tool? If so, I wonder if some of our formatting confused it in a couple of places). I don't insist on all these changes if you prefer not to make any of them -- we don't really have a formal style guide that I'm aware of -- but I mainly left comments intended to reduce unnecessary diffs in the PR. :-)

The only comment of substance has to do with the default setting of the checkbox.

Thanks again for all the work on this!

This reverts commit a71c7f1.
Copy link
Contributor

@demiankatz demiankatz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed on today's steering group call, if you can make the change listed below in combination with reverting the latest change to the settings label (so it says "Truncate Thumbnail Labels" instead of "Show Full Thumbnail Labels"), then I think we'll have consistency between the settings name, the control label and the behavior, and we can avoid changing the default behavior. That should get this to a state where it can be merged!

Copy link
Contributor

@demiankatz demiankatz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @Saira-A, this is great. As far as I can tell, everything is now working as expected, matching the behavior we discussed at the last Steering Group meeting.

I pushed up a few minor commits to adjust whitespace issues that were introducing unnecessary diffs in this branch, just to improve the readability of the final commit.

I did notice one strange issue related to the Aleph extension, but I think that dealing with it is likely beyond the scope of this PR. I'll just leave this open a little longer in case anyone else can offer insights. Hopefully we can push the merge button on this at the next Community Call if not sooner.

I really appreciate your work on this, as I believe this solves an issue that has been annoying to us at Villanova as well. Please let me know if I can be of any further assistance with anything!

@@ -199,6 +199,7 @@
"clickToZoomEnabled": "Mouse Click To Zoom",
"pagingEnabled": "Two Page View",
"reducedMotion": "Reduce motion (disables animations)",
"truncateThumbnailLabels": "Truncate Thumbnail Labels",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any idea why this file includes raw text instead of placeholder strings like $truncateThumbnailLabels? Is this something that needs to be fixed in a follow-up PR? (I'm not sure who actually uses this extension at this point...)

@Saira-A Saira-A changed the base branch from main to dev April 9, 2024 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In testing
Development

Successfully merging this pull request may close these issues.

None yet

4 participants