-
Notifications
You must be signed in to change notification settings - Fork 3
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
As a reader, I want to read notes in context as I'm reading an article so that I can refer to additional information without losing my place. #14
Comments
Currently implemented with standard markdown footnotes. There are two examples in the current Data Beyond Vision article draft. |
I noticed that the text version of the articles includes some junk at the end of the footnotes — I think this is the return to text link generated by the markdown tool. Maybe we can just configure markdown not to generate one, since I don't think we need it based on Gissoo's design. I spent a little time trying to remove it with a "replace" call in the template but it didn't work and I decided it made sense to hold off until we implement this. FWIW, I think this issue title is too vague |
agree issue title is too vague. wanted something that would imply contextual notes, footnotes, etc. without specifying the implementation, but it didn't come out clearly. |
Notes from my discussion / working session with @gissoo earlier this week when we looked at my work in progress implementation. In general:
Contextual notes should be full-width on mobile; on tablet they should be 320px wide. Desktop will increase a bit because font-size will be bigger (size/specifics TBD). Tablet and desktop will work similarly in terms of placement and behavior. Ideally, on tablet/desktop the contextual note should be placed so the arrow is directly under the reference. This will require javascript for placement, and we'll also need to mirror-image the arrow shape if the reference is close to the left margin. (Gissoo would prefer this if it's not too difficult; my suspicion is that if we're already calculating placement relative to the reference it isn't that much harder.) When I asked about transitions: on mobile, it would make sense to pull up from the bottom, but it doesn't make sense on the other screens. Gissoo thought maybe a fade could work, but not sure how much it adds. In terms of behavior: we discussed closing the contextual note after the ref is no longer visible, but then Gissoo suggested it could just go away on scroll - which seems logical (if you start scrolling you're probably done looking at the note), and also easier to implement. |
Initial contextual note implementation (CSS + JS positions, no transitions) #14
@thatbudakguy @rlskoeser is it intentional that the figma link here is going to the "information architecture" page on figma? |
@gissoo @gwijthoff initial implementation of contextual notes is ready for review. The visuals aren't fully to spec since those were still being worked on, but I wanted to share what I've got so far so that we can all try them out and see what needs to be refined. The functionality is implemented basically as @gissoo and I discussed, documented in a comment above (@gissoo including flipping the triangle for notes close to the left margin!), but I have not yet implemented any transitions. |
@gissoo it was going to the contextual notes in the component before, but maybe you removed that when you added the new version? |
It occurred to me I should document how I expect this to behave to guide review and feedback:
|
|
@gissoo what are you seeing/not seeing? On mobile the contextual notes should be positioned at the bottom per your design, but if you have a footnote open when you resize the browser it might not adjust (or it might even require a reload...). Did you see my comment above with a list of what I expect to be working? Thanks for clarifying the desktop size - my notes were provisional, and I'll implement based on your revisions when I return to this. I agree the show/hide is pretty rough right now. Do you still want fade for tablet/desktop and slide (?) from the bottom for mobile? Other questions that have occurred to me:
|
Trying this now – will make a separate comment with test results
@rlskoeser Thank you! Sorry I didn't catch the vert first line you had written there! Got it!
Yes, that sounds right!
I think so, I'm noticing the text is too much at the bottom when the note is short. I think the shape is correct
I think there needs to be some more spacing from the bottom of the container so the text is not way at the bottom, I'm proposing on Figma here
I can think of it two ways: 1. the max height will always be from the bottom of the superscript to the bottom of the screen on the device 2. there won't be any max height, meaning the user will scroll down to see the rest of the note, but that is problematic because the scroll makes the container disappear! Unless we can do scroll within a container, which would be amazing!
Woah!! Amazing!! :D This would be awesome! |
Thank you, @rlskoeser, below are the results I'm getting. Note: I'm still unable to test with firefox and chrome on my phone – but testing on my phone with Safari and on desktop with Firefox and Chrome and Safari (different window sizes)
This is working fine on the narrowest window on desktop on all browsers, however, it's not working correctly on my phone on Safari. Please see the attached screen recording. (Update: github is not supporting the attachment format, I'll see once you respond where I should place it)
This is working fine.
this is working perfectly! Thank you!!
This is also working fine.
This is working fine.
This is working fine too, just thinking if we could change the direction of the arrow to be upwards when the container is open? – It's not intuitive now. Is it possible? Should I revise design for this?
Yes!
text I wonder to help it be more visible, it would be nice to "highlight" the text (like an actual highlighter) when it's scrolled up to it, it's more intuitive than just scrolling to it. A couple of other issues I'm noticing:
|
You just taught me something new!!! But no, that wasn't why, still should work if the "Frame" is there and the object inside the frame is replaced, don't know what might have happened. |
Not sure if these thoughts been aired already, but I'll echo them just in case: On mobile, the gradient underline wraps around the word in a rectangle. (See Gissoo's screenshot above.) But on a laptop, it's just a straight underline. When a user clicks the down arrow to close out the note, the page auto-scrolls down so that the top of the window is aligned with the annotated line, which is distracting. Also: on mobile, when I open a contextual note and then scroll down on the page, the note closes out. But if I try to click that note again, it won't open. |
@gissoo I think some of these display issues are impacted that we haven't decided what the largest size screen is we want for mobile - I think you and @thatbudakguy had some discussion about it but I don't know if we settled on a width. Current implementation is using one of our breakpoints, so I think it switches out of mobile too soon. Weird about the box instead underline! Thanks for catching. @gissoo I can try a solid line, I just thought the gradient would be better because it's an arbitrary width that won't necessarily match up with any words. Could you suggest a width you'd like to see? @gissoo I want to include a color palette (which might be easiest as an image, but could also work at html/css) in one of our DBV essay footnotes; could you use that to come up with some guidelines? I agree it would be better if the image was the width of the note; this was just a convenient image to try to make sure it worked and start us thinking about it. @gissoo thoughts on the down arrow auto-scrolling? @thatbudakguy commented on this too. It seems to behave even more poorly on mobile. My thought is to override default behavior in javascript so it doesn't scroll any but just closes the note. @gwijthoff which browser for that mobile behavior where you can't click on the note again? (I can't duplicate on android chrome or FF). |
Ah, I see! Could we try this?: How about it would be 5px wide and 30% with a transparency of 40%, with no gradient? I tested it here, I think it helps to look at it here since these numbers may not be completely reliable. Or what about this? – 5px wide, with a 60% transparency with gradient? – This looks much better to me! I think the gradient makes a lot of sense and looks much better when the line is thicker.
Ah sorry I totally forgot about this specific use case! Yes, I'll add some guidelines!
I agree, let's do that. I think it's better if instead of an arrow we just have an "x". What do you think? Should I revise it? |
@rlskoeser correct, 414px is a new value. there's currently not a good way to share between the scss and javascript...i could see doing it using hugo's pipes where you can inject config variables into files, but when I tried that for scss it was unable to handle globbing/multiple scss files. I'm fine with just defining it in two separate places. |
Upgrading from 5 points to 8 based on the increased complexity of transitions and other behaviors. |
@rlskoeser thank you so much for working on this!! The underline and the transition are amazing!! You're the best =) There are three issues I'm seeing:
|
@gissoo thanks for testing!
|
Verified all of your testing notes above, everything seems to be working smoothly. This is such fantastic work, @rlskoeser! Re: @gissoo note 2 above, I agree that we should think more about the case of long contextual notes. Many academic articles have footnotes/endnotes that go beyond the 82 words of that contextual note No. 5, especially when you factor in the addition of bibliographic references. One idea: maybe the user can scroll through the text within the contextual note, the same way I can scroll through the text I'm writing now in this little GitHub comment editing window? And on @gissoo note 3 above, I'm also getting some funky behavior on iOS 13.4.1 using Firefox Version 26.0. I clicked contextual note 1, and then scrolled down on the article rather than clicking the 'X' to close the contextual note. The note disappeared but my place in the article jumped. And now when I go to click on that or any other contextual note, it won't open, and my place in the article moves. Here's a screen recording of what continues to happen when I try to click on a contextual note again, even after I refresh the page. |
@gwijthoff I think Nick also suggested this! Set a max height, but allow the text inside the note to scroll if it's longer than that. @gissoo how does this sound to you? |
@thatbudakguy is it possible some of these problems are because I only overrode the |
not sure, but that sounds plausible! |
|
@gissoo I've updated with the following changes:
I also found and corrected one interaction problem on Safari. |
@gissoo @thatbudakguy when I was revisiting the contextual notes styles, I noticed that the designs have a drop shadow (which I had forgotten — sorry). I tried to implement it, but apparently css box-shadow doesn't work on absolutely positioned elements (I tried several different approaches to try to get around this). I have one more idea about a way to implement this, but wanted to find out how important you think it is. |
oh no, I could've saved you some time... last week I also realized it didn't have the shadow, tried to add it, came to the same conclusion and decided it wasn't worth it. I should've said something!! |
Thanks for writing, @rlskoeser
|
@thatbudakguy wish I'd known! My one thought for another approach is to set the purple card shape on the |
@gwijthoff I changed the implementation for how notes are closed — could you test and see if this fixes the jumping behavior on mobile you documented earlier? For anyone interested in the specifics: it's apparently difficult to change the document location hash without scrolling but still have the CSS |
@rlskoeser @thatbudakguy re the contextual note container drop shadow: I think it's fine for this first issue/release to not have the shadow. I totally missed this! Does the information in this link help by any chance? There are several points there, if you haven't looked at it yet https://stackoverflow.com/questions/16198745/css-box-shadow-covering-all-contained-divs-using-absolute-positioning/16199113#16199113 |
@gissoo somehow I calculated the min-height incorrectly! It seems that actually removing the min-height does the right thing. Would you confirm that note 2 looks correct now? |
@rlskoeser the heights for note 2 and 4 look correct now, thank you |
@rlskoeser oof, still getting some residual funkiness on mobile. Here's a recording, iOS 13.4.1 / Firefox 26.0 After I click a contextual note for the first time, subsequent contextual notes won't open on my first tap. A second tap does bring them up. Not sure that this matters, but the contextual note text also exceeds the right boundary of my screen. You'll see it in this video with the phrase "Universit/y of Minnesota Press." Also, contextual notes with long text on mobile seem a little shy, as you'll see in that recording. I'm having trouble scrolling through the note: the second I does, it gets all bashful and hides. But on a positive note, the notes do close properly now on mobile when a user scrolls down! |
@gwijthoff thanks for flagging the content width issue on mobile! Fixing that corrected another problem I was seeing on some devices (specifically, scrolling long content within a note on FF). @gwijthoff my latest updates have the following changes:
|
@gissoo I think the max height for the largest note is still not correct, which might explain why it displays incorrectly on your phone. I added size constraints based on what I see in Figma to set the max height, but the full size of the container is larger than the max height in your designs! 🤯 I don't know if I'm doing some math wrong, or if the angle of the triangle at the top of the note is wrong, or what! Can you look at the largest note and suggest how or where you'd like me to adjust the max height size? The easiest thing for me to change to address this is the height of the text content inside the note. (But if I have the angles wrong, let's fix it!!) |
Closing this monster issue, since most of it has been resolved. Any further contextual note problems can be referenced in new bug reports. Thanks for following up on all of the above, @rlskoeser! |
testing notes
dev notes
figma link
this corresponds to the ability to add footnotes, contextual notes, etc - however we implement that. it could involve a shortcode, as suggested in #4.
revisions:
The text was updated successfully, but these errors were encountered: