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

added drag and drop icon to metadata panel. Also there are some space fixes. #566

Merged
merged 3 commits into from
Aug 10, 2016

Conversation

aeschylus
Copy link
Contributor

@aeschylus aeschylus commented May 18, 2016

connected to #622

@@ -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

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.

@aeschylus
Copy link
Contributor Author

This is a PR for the purposes of design review. See the gifs below:
Uploading drag and drop sul-embed2.gif…
drag and drop sul-embed

@coveralls
Copy link

Coverage Status

Coverage remained the same at 98.371% when pulling ae0f0ecb18cc5500d50d1979d257f7868ccbf9d2 on add_iiif_drag_and_drop into 648cfaf on master.

@aeschylus
Copy link
Contributor Author

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.

@aeschylus
Copy link
Contributor Author

see also: #567

@aeschylus aeschylus changed the title added drag and drop icon to metadata panel. Also there are some white… [DESIGN REVIEW] added drag and drop icon to metadata panel. Also there are some white… May 18, 2016
@snydman
Copy link

snydman commented May 18, 2016

@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.

@ggeisler
Copy link
Contributor

  • Should there be an underline on any part of this? The text is not a link, correct?
  • Can the icon be a tiny bit smaller? It feels a little out of proportion to me (although it is a bit tricky to judge, having to watch the gif repeat over and over; the gif is nice for showing the interaction but a still image might make it easier to review this for design purposes).
  • I wonder if we can think of better wording for the action? It's a little odd because it is under a heading called "Available Online" but it's not really an availability link like the PURL link. Also, the instruction text doesn't tell the user what it is for (why are you telling me to drag the icon?), just how to do the action.

Maybe something like:

View image in a IIIF viewer (drag icon to another viewer)

Or maybe just:

View image in a IIIF viewer (drag icon)

?

@jvine
Copy link

jvine commented May 19, 2016

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?

@ggeisler
Copy link
Contributor

If there is a linkable reference page, maybe a variation of my previous suggestion:

Drag icon to view image in a IIIF viewer (more information)

Where "more information" is the link? (and is underlined as a link)

@snydman
Copy link

snydman commented May 19, 2016

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...

@aeschylus
Copy link
Contributor Author

aeschylus commented May 19, 2016

screen shot 2016-05-19 at 11 03 55

screen shot 2016-05-19 at 11 08 34

screen shot 2016-05-19 at 11 10 48

@aeschylus
Copy link
Contributor Author

@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.

@jvine
Copy link

jvine commented May 19, 2016

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?

@ggeisler
Copy link
Contributor

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:

Drag this icon to view image in a IIIF viewer

@jvine
Copy link

jvine commented May 19, 2016

Drag this icon to view image in a IIIF viewer

👍

I agree with the "IIIF viewer" part - I just don't like the "drag icon" to be far away from what it refers to.

@mejackreed
Copy link
Contributor

Maybe a cursor: move would help?

@aeschylus
Copy link
Contributor Author

I agree we should add some cursor styling, but I would cast a vote for the open grabby hand (cursor:grab), which also has a "dragging" ("grabbing") style.

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.

@snydman
Copy link

snydman commented May 23, 2016

@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.

@jvine
Copy link

jvine commented Jun 1, 2016

screen shot 2016-06-01 at 4 26 43 pm

  • IIIF feature and PURL are in separate dt/dd pairs
  • dt for PURL changes to "Citation URL"
  • dt for icon is "International Image Interoperability Framework"
  • icon is about 25px wide w 5px right margin
  • icon has "grab" cursor
  • instruction text is "Drag icon to open this image/set in a IIIF viewer."
    • generic text is okay, but if possible, it would be better to check to see if there is 1 image, or multiple images, and adjust the text accordingly.
    • Drag icon to open this image in a IIIF viewer.
    • Drag icon to open these images in a IIIF viewer.
  • text colour for instruction is dimgrey
  • link on "IIIF viewer" points to http://library.stanford.edu/projects/international-image-interoperability-framework

@peetucket peetucket changed the title [DESIGN REVIEW] added drag and drop icon to metadata panel. Also there are some white… [DESIGN REVIEW] added drag and drop icon to metadata panel. Also there are some white… Jul 27, 2016
@peetucket peetucket changed the title [DESIGN REVIEW] added drag and drop icon to metadata panel. Also there are some white… [DESIGN REVIEW] added drag and drop icon to metadata panel. Also there are some space fixes. Jul 27, 2016
@jkeck jkeck force-pushed the add_iiif_drag_and_drop branch from ae0f0ec to 25e83c8 Compare August 8, 2016 23:09

img {
width: 25px;
margin: 0 5px 0 0 !important;

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

@jkeck jkeck force-pushed the add_iiif_drag_and_drop branch from 25e83c8 to 4da8705 Compare August 8, 2016 23:11
cursor: -webkit-grab;

&:active {
cursor: -webkit-grabbing;

Choose a reason for hiding this comment

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

Avoid vendor prefixes.

@jkeck
Copy link
Contributor

jkeck commented Aug 8, 2016

New progress for review:

zw433vr9951 (single image)

zw433vr9951

fw090jw3474 (multiple images)

fw090jw3474

@coveralls
Copy link

coveralls commented Aug 8, 2016

Coverage Status

Coverage increased (+0.03%) to 98.521% when pulling 4da8705 on add_iiif_drag_and_drop into cb815fe on master.

@jmartin-sul
Copy link
Member

👍 from me, but i sort of paired on it with @jkeck yesterday, and so will refrain from being the one to merge

@jmartin-sul jmartin-sul changed the title [DESIGN REVIEW] added drag and drop icon to metadata panel. Also there are some space fixes. added drag and drop icon to metadata panel. Also there are some space fixes. Aug 9, 2016
@ggeisler
Copy link
Contributor

ggeisler commented Aug 9, 2016

👍

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'>
Copy link
Contributor

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?

Copy link
Contributor

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.

@ndushay
Copy link
Contributor

ndushay commented Aug 9, 2016

LGTM aside from a couple of line comments. I only eyeballed it.

@jmartin-sul jmartin-sul merged commit ce31233 into master Aug 10, 2016
@jmartin-sul jmartin-sul deleted the add_iiif_drag_and_drop branch August 10, 2016 00:15
@snydman
Copy link

snydman commented Aug 15, 2016

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.

@jkeck
Copy link
Contributor

jkeck commented Aug 15, 2016

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).

@jvine
Copy link

jvine commented Aug 15, 2016

@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.

@LynnMcRae
Copy link

@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.

@ggeisler
Copy link
Contributor

This sounds fine to me, too. I don't see a strong argument for suppressing it.

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.