Skip to content

Simplify examples page #1489

Merged
demiankatz merged 17 commits into
UniversalViewer:devfrom
Saira-A:examplespage
Jul 14, 2025
Merged

Simplify examples page #1489
demiankatz merged 17 commits into
UniversalViewer:devfrom
Saira-A:examplespage

Conversation

@Saira-A

@Saira-A Saira-A commented Jul 4, 2025

Copy link
Copy Markdown
Contributor

Work in progress PR to make the examples page easier to use. #1455

Changes so far:

  • Created sub-tabs within IIIF tab
  • Changed rotation textbox to a slider
  • Added explanatory text to the config and target settings

To be done:

  • Add explanatory text to the annotations tab (need to figure out how to use it)
  • Move IIIF/YouTube tabs above the viewer
  • Modify the appearance of the sub-tabs to make them look less like buttons

Any thoughts or feedback would be appreciated :)

@vercel

vercel Bot commented Jul 4, 2025

Copy link
Copy Markdown

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 11, 2025 4:18pm

@demiankatz demiankatz left a comment

Copy link
Copy Markdown
Contributor

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 off to a great start. A couple of organizational suggestions, though:

1.) I think the "target" control should move back into the "general" tab, since it applies to multiple extensions. (It works in OSD, for example -- it captures the current pan and zoom settings; you can see it changing as you navigate the viewer).

2.) Maybe we should create an "OpenSeadragon" tab for the rotation control, since I think that only applies to OSD, and I can imagine we might introduce other OSD-specific controls in future.

@LanieOkorodudu

LanieOkorodudu commented Jul 7, 2025

Copy link
Copy Markdown
Contributor

@Saira-A and @demiankatz, I know this is still in draft, just an observation. In the OpenSeadragon tab, it's great that you can set the rotation by specifying the desired degrees. Would it be possible to add a Reset Rotation button next to Set Rotation? That way, users could easily return the image to its original orientation with a single click.

I did notice that currently, the only way to reset the rotation is by manually adjusting the slider back to 0 or, if that's not possible, refreshing the page to restore the original view.

Just a suggestion, happy to hear what others think as well.

@demiankatz

Copy link
Copy Markdown
Contributor

@LanieOkorodudu, your suggestion makes sense to me, as long as it's not overly complicated to implement (and I don't imagine that it would be).

@erinburnand

Copy link
Copy Markdown

Agree a reset button would be a nice user friendly touch

Add collapsible headings and reset rotation button
@Saira-A

Saira-A commented Jul 8, 2025

Copy link
Copy Markdown
Contributor Author

Thanks everyone. I’ve put the text under collapsible headings in the config tab now so let me know what you think of that.

I didn’t add the reset rotation button previously because there’s a pre-existing issue where the viewer ignores being reset to 0 and doesn’t re-render. For now I’ve added the button but it resets it to 0.5 degrees which is hopefully better than nothing while I look into it

@erinburnand

Copy link
Copy Markdown

Looks good @Saira-A!

@demiankatz

Copy link
Copy Markdown
Contributor

Thanks everyone. I’ve put the text under collapsible headings in the config tab now so let me know what you think of that.

I didn’t add the reset rotation button previously because there’s a pre-existing issue where the viewer ignores being reset to 0 and doesn’t re-render. For now I’ve added the button but it resets it to 0.5 degrees which is hopefully better than nothing while I look into it

Seems like setting rotation in general has some weird side effects -- clicking the submit button repeatedly without changing the value does odd things.

I also wonder if setting the rotation to 360 would effectively get you back to 0, if you're looking for a different temporary workaround.

In any case, if this is taking too much time, I'm definitely in favor of merging the control reorganization first, and then dealing with the rotation issues separately, since they're obviously not directly related.

@demiankatz demiankatz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@Saira-A, I took a closer look at this today and noticed there were a few areas where indentation was slightly out of alignment. Hopefully the comments below will help straighten it out.

Also see below for a possible interim suggestion about the reset button.

Comment thread src/index.html Outdated
Comment thread src/index.html Outdated
Comment thread src/index.html
Comment thread src/index.html Outdated
</div>
</div>
<div class="collapsible-section">
<button class="collapsible-heading collapsible-icon caret-down"><strong>Custom configuration</strong></button>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm not sure it's clear that this button displays help. Would it be better to keep a "Custom configuration" heading, and have a button next to it labeled "More information" or something like that? (For accessibility, we would probably need to aria-label such a button with a longer description like "More information about custom configuration").

Saira-A and others added 5 commits July 9, 2025 12:36
Co-authored-by: Demian Katz <demian.katz@villanova.edu>
Co-authored-by: Demian Katz <demian.katz@villanova.edu>
Co-authored-by: Demian Katz <demian.katz@villanova.edu>
@Saira-A

Saira-A commented Jul 9, 2025

Copy link
Copy Markdown
Contributor Author

Thanks @demiankatz! I changed the rotation button to 0 - 360 with the reset setting it to 360 as that seems like the best temporary solution. I'll experiment with other ways to show the explanatory text later

@demiankatz

Copy link
Copy Markdown
Contributor

Thanks @demiankatz! I changed the rotation button to 0 - 360 with the reset setting it to 360 as that seems like the best temporary solution. I'll experiment with other ways to show the explanatory text later

Great compromise for now -- thanks!

demiankatz
demiankatz previously approved these changes Jul 9, 2025

@demiankatz demiankatz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks, @Saira-A, I like the new "More information" controls a lot better!

@demiankatz

Copy link
Copy Markdown
Contributor

(I realize this PR is still in draft mode with some uncompleted TODOs... happy to leave it there so we can make further progress, OR to merge as-is and follow up with separate PRs, depending on everyone's preferences).

@Saira-A

Saira-A commented Jul 9, 2025

Copy link
Copy Markdown
Contributor Author

I'm changing it again based on feedback from Erin and Lanie so let's leave it as a draft for now (sorry, I requested review too hastily!)

I think the annotations tab could also do with some explanatory text but I don't really know how to use it myself; would you be able to write something up @demiankatz?

@demiankatz

Copy link
Copy Markdown
Contributor

@Saira-A, I unfortunately don't know anything about annotations either. It's possible that @edsilv is the only person who knows what this does or how it works.

@Saira-A

Saira-A commented Jul 9, 2025

Copy link
Copy Markdown
Contributor Author

Updated with another option for displaying the explanatory text - I'll try and move the IIIF/YouTube tabs to the top before we merge it as well

@demiankatz

Copy link
Copy Markdown
Contributor

Updated with another option for displaying the explanatory text - I'll try and move the IIIF/YouTube tabs to the top before we merge it as well

Definitely more compact! As long as it passes accessibility checks (and I see it has an aria-label, so I assume it will), I have no objections to this.

@Saira-A

Saira-A commented Jul 11, 2025

Copy link
Copy Markdown
Contributor Author

Updated with the IIIF and YouTube tabs moved to the top and the stacked tabs looking more like tabs and less like buttons. That just leaves adding explanatory text to the annotations tab which we can't do at present

@demiankatz

Copy link
Copy Markdown
Contributor

Thanks, @Saira-A, I think this is looking quite good. Just one thought: would it be helpful to outline the tabs? I think it looks fine in the lower area, but at the top, with only two values, the greyed-out YouTube tab catches my attention more than the active IIIF tab, and it feels confusing. I think an outline to make it clearer that these are tabs might straighten it out. Not a big deal, though, and happy to hear other opinions!

@Saira-A

Saira-A commented Jul 11, 2025

Copy link
Copy Markdown
Contributor Author

Thanks @demiankatz - made some changes but it may still be too subtle, happy for anyone else to finish it off while I'm away though!

@demiankatz demiankatz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks, @Saira-A, looks good enough to my eye! I think this is sufficient progress to take this out of draft mode and merge it, but we'll see if others still have more feedback.

@erinburnand

Copy link
Copy Markdown

I agree @demiankatz, looks good to me

@demiankatz demiankatz marked this pull request as ready for review July 14, 2025 13:02
@demiankatz demiankatz merged commit 4f98b0e into UniversalViewer:dev Jul 14, 2025
4 checks passed
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