sul-dlss-deprecated / universalviewer

The Universal Viewer is a community-developed open source project on a mission to help you share your content with the world
http://universalviewer.io
Other
0 stars 1 forks source link

Attribution box should disappear after user interaction with viewer #4

Open ggeisler opened 7 years ago

ggeisler commented 7 years ago

Although the attribution box is not a modal (it doesn't prevent interaction with the rest of the viewer) it does require an action to dismiss. And depending on how much is going on in the viewer, it seems fairly likely the user will want to dismiss it in many cases to make room for viewing the object of interest.

Although automatically dismissing it raises the possibility that the user will not have noticed it before it is automatically dismissed, it seems like this is an acceptable tradeoff for not forcing the user to manually dismiss it whenever using the viewer. Especially if we repeat the attribution text in the Information box/section.

Ideally, then, the attribution box should be shown when loading the viewer (as it does now) but when the user mouse clicks in the viewer, or navigates by keyboard to a viewer element, the attribution box should be closed for the user.

tomcrane commented 7 years ago

I agree with the behaviour, but think it should be configurable for publishers who feel strongly about http://iiif.io/api/presentation/2.1/#attribution -

Text that must be shown when the resource it is associated with is displayed or used.

I think you can disable attribution completely, for the scenario where you're embedding the UV on your catalogue page and feel that the containing page does the job of attribution just fine.

edsilv commented 7 years ago

So we could add an extra attributionManualDismissEnabled boolean config option? It could be true by default. If false, it hides the close button and the panel disappears on interaction? This would satisfy those who want to ensure that the attribution has been acknowledged.

There's an attributionEnabled option for seadragonCenterPanel. However, this would mean it doesn't appear when embedded in an iframe on external sites.

The UV is aware of whether it's in an iframe however. We could potentially add another config option called attributionOnlyVisibleInIFrame. So if enabled, it would only appear when embedded.

ggeisler commented 6 years ago

@tomcrane's concern that my original suggestion for the behavior should be configurable for implementors who do want the attribution to be shown makes sense to me.

And @edsilv's suggestion for how that configuration might be done also sounds good to me.