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

add ability to link to lines #41

Open
jduss4 opened this issue Jul 22, 2019 · 10 comments
Open

add ability to link to lines #41

jduss4 opened this issue Jul 22, 2019 · 10 comments
Assignees
Labels
wait stuff to wait on (often until right before launch)
Milestone

Comments

@jduss4
Copy link
Member

jduss4 commented Jul 22, 2019

you can manually link to a line right now if you look for its anchor id, but my proposal is:

  • hover a line (turns green), you click it, it turns a color to indicate its selection
  • clicking the link also adds an anchor tag in the URL
  • when you go to that URL, the browser will automatically pop you to the correct line (current behavior)
  • we highlight that line in a new color to indicate its selection

this feature would make sending links to look at specific lines possible, although the behavior might be a little funky depending on how fast the page is loading

@jduss4 jduss4 added the wait stuff to wait on (often until right before launch) label Jul 22, 2019
@jduss4 jduss4 added this to the v2 milestone Jul 22, 2019
@jduss4
Copy link
Member Author

jduss4 commented Apr 13, 2020

I got this mostly working except:

  • @nichgray would like "URL" to be an icon that only appears when the v_container is being hovered (some CSS is there for .v_line_link but it is not functioning correctly)

  • because of the page loading, the line that you are trying to jump to will actually appear ABOVE the final resting place of the browser. That's not great. (figured out)

@jduss4
Copy link
Member Author

jduss4 commented Apr 13, 2020

@karindalziel handing this off to you.

Relevant DOM type info:

image

The idea is that we want to make that "URL" on the right hand side something a bit more visually appealing, perhaps an icon, perhaps with hover text explaining that you click it to copy a link to your clipboard, etc. It should only appear when you are hovering the poem line, rather than having hundreds on the page all the time.

image

@jduss4
Copy link
Member Author

jduss4 commented Apr 13, 2020

A little (non functional) code already exists in css/variorum.css and there's also javascript towards the bottom of javascript/variorum.js if you need to tweak any behavior. The "URL" text is coming from the XSLT.

@karindalziel
Copy link
Member

karindalziel commented Apr 21, 2020

So I got this far on the visual part of this issue

Screen Shot 2020-04-21 at 3 44 09 PM

I'm not quite sure what we should do next, let's discuss.

I used the "link" emoji as the icon, I'm not sure how cross compatible that is but emoji's seem pretty widespread anymore?

I'm thinking the javascript to copy the link will apply to the whole div, correct?

@karindalziel
Copy link
Member

one possible downside with emoji's is the look different depending on system. here's windows.

variorumcrop

@karindalziel
Copy link
Member

Next up, figure out a way to indicate that the URL has been copied to clipboard

@karindalziel
Copy link
Member

So right now the options are:

1: keep the above as is, but add a tooltip that says "click to copy link to clipboard" on hover

Screen Shot 2020-04-22 at 9 05 22 AM

2: do something like stack overflow, with a text box they can use to select and copy the link themselves, with (optionally) another link to copy to clipboard

Screen Shot 2020-04-22 at 9 03 12 AM

3: do something like github, where clicking an icon brings up a submenu with the option to "copy permalink"

Screen Shot 2020-04-22 at 9 08 53 AM

@nichgray
Copy link
Member

Another consideration: the reviews would have to be handled differently from the main text of the variorum if we do the copy link option, which may require the creation of new, reviews-specific css/js?

@nichgray nichgray added bug Something isn't working and removed wait stuff to wait on (often until right before launch) labels May 20, 2020
@nichgray
Copy link
Member

For some reason the work list boxes to the right of the screen (normally) are now wonky when you use a line-link URL. The only change, to my knowledge, was running the .rb script that regenerates the list of works...

Screen Shot 2020-05-20 at 11 47 38 AM

@nichgray
Copy link
Member

Above issue apparently resolved itself? Removing labels...

@nichgray nichgray added wait stuff to wait on (often until right before launch) and removed bug Something isn't working labels Jun 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wait stuff to wait on (often until right before launch)
Projects
None yet
Development

No branches or pull requests

3 participants