-
Notifications
You must be signed in to change notification settings - Fork 6
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
added drag and drop icon to metadata panel. Also there are some space fixes. #566
Conversation
@@ -8,8 +8,8 @@ def initialize(*args) | |||
|
|||
def body_html | |||
Nokogiri::HTML::Builder.new do |doc| | |||
doc.div(class: 'sul-embed-body sul-embed-image-x', 'data-sul-embed-theme' => asset_url('image_x.css').to_s) do | |||
doc.div(id: 'sul-embed-image-x', 'data-manifest-url' => manifest_json_url, 'data-world-restriction' => !@purl_object.world_unrestricted?) {} | |||
doc.div(class: 'sul-embed-body sul-embed-image-x', 'data-sul-embed-theme' => "#{asset_url('image_x.css')}") do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer to_s
over string interpolation.
Coverage remained the same at 98.371% when pulling ae0f0ecb18cc5500d50d1979d257f7868ccbf9d2 on add_iiif_drag_and_drop into 648cfaf on master. |
There are probably some more styling updates we want to make. The underline shouldn't appear underneath the icon itself, and we should perhaps adjust the whitespace and text alignment of the instructions with the icon. |
see also: #567 |
@mejackreed @jvine @ggeisler can you please review this and give feedback? I'd like the media team to get this in if possible during this wave of work on sul-embed. |
Maybe something like:
Or maybe just:
? |
Huh, I'm wondering where the "Available Online" header came from - I hadn't noticed it before, and it doesn't seem appropriate here at all. I think we were referring to the PURL as the "Citation URL", but that doesn't provide a good label for the IIIF logo. I don't think I mind the size of the logo - a larger mouse target for a drag operation doesn't seem inappropriate - though it's hard to tell with the small screenshot. I agree that the current text doesn't seem like it should be a link. But at one point we were talking about linking to an external page that explains about IIIF and viewers. Does such a page exist? And if so, should we link to it? |
If there is a linkable reference page, maybe a variation of my previous suggestion:
Where "more information" is the link? (and is underlined as a link) |
Alas there is not such an informational page to link to, unless we go to http://iiif.io, but that probably wouldn't be too helpful. I guess we should create a page... |
@ggeisler Good point about the underline. I'm not sure what I was thinking. The item is an anchor with an href in the markup, and that forces it to have an underline, but I never overrode it it seems. I agree it should be removed, and that the icon should be roughly the same size as the text, with the vertical alignment made less janky. I added some tweaks above. Let me know if any of those seem right and I will update the PR. |
Why is it an anchor with an href? The icon itself needs to be focusable, but the text doesn't. I prefer the original text with the action closest to the thing it's acting on: Drag icon to view... @ggeisler? And any other thoughts for the heading? Or is that out of scope of this PR? |
Thanks for the updates @aeschylus. I like the third version, but @jvine has done more work on this so I'd defer to her. I will say I much prefer the text in the third version rather than the original text, though. What percentage of users will even know what IIIF is? Telling them to drag the icon without explaining what the purpose of dragging it is seems odd to me. If we really want to start the text with the action, maybe something like:
|
👍 I agree with the "IIIF viewer" part - I just don't like the "drag icon" to be far away from what it refers to. |
Maybe a |
I agree we should add some cursor styling, but I would cast a vote for the open grabby hand ( https://developer.mozilla.org/en-US/docs/Web/CSS/cursor @jvine: Should we change the title/sectioning? I agree there should be some kind of informational link. The closest information page we have is zimeon's personal page on the topic, which contains a number of outdated links. There has been talk of updating this and making it a permanent part of iiif.io. |
@aeschylus @mejackreed we should produce a new version of a page and do pull request to iiif.io. But it should be different from zimeon's page and oriented towards informing users of what it is and how they can use it. Maybe with a little animated gif or something. We should NOT try to solve the "explaining IIIF" to the masses problem with this, but put something out there that is reasonable and helpful. If the IIIF eds and coco don't accept the page then we can add it to library.stanford.edu for now and change the link later. |
|
ae0f0ec
to
25e83c8
Compare
|
||
img { | ||
width: 25px; | ||
margin: 0 5px 0 0 !important; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
!important should not be used
25e83c8
to
4da8705
Compare
cursor: -webkit-grab; | ||
|
||
&:active { | ||
cursor: -webkit-grabbing; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid vendor prefixes.
👍 from me, but i sort of paired on it with @jkeck yesterday, and so will refrain from being the one to merge |
👍 |
end | ||
|
||
def to_html | ||
<<-HTML.strip_heredoc | ||
<div class='sul-embed-panel-container'> | ||
<div class='sul-embed-panel sul-embed-metadata-panel' style='display:none' aria-hidden='true'> | ||
<div class='sul-embed-panel-header'> | ||
<button class='sul-embed-close' data-sul-embed-toggle='sul-embed-download-panel'> | ||
<button class='sul-embed-close' data-sul-embed-toggle='sul-embed-metadata-panel'> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
was this an old typo that wasn't caught?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, copy/paste error I believe.
LGTM aside from a couple of line comments. I only eyeballed it. |
excited to see this. I do notice that the metadata panel does not appear in PURL versions of the embed. I believe the rationale for this was that it would be duplicative of metadata in the PURL page itself. I suppose this means we ought to add the IIIF logo to the PURL page for images, unless @LynnMcRae and others have a different idea. |
This has actually come up elsewhere as well. I believe PURL is now the only app that hides the metadata panel. Do we want to retain this behavior for PURL? (FWIW, we have a version of purl on sul-purl-dev that shows the metadata panel w/ IIIF icon). |
@ggeisler do you have any opinion about no longer suppressing the info icon, regardless of context? so that the IIIF drag-and-drop is always available. otherwise it needs to be added to specific apps. i'm okay with not suppressing it. |
@jkeck seems like SW and Purls are equals here...both show the metadata independently and no harm in SW that it shows some data also in the info panel. I'm fine with that behavior in Purl. It just emphasizes the portability of embed. |
This sounds fine to me, too. I don't see a strong argument for suppressing it. |
connected to #622