unfoldingWord / translationCore

Repository for the desktop application translationCore
https://www.translationcore.com
Other
36 stars 11 forks source link

Properly handle verse links in smurf bar for tN and tW #6872

Closed birchamp closed 4 years ago

birchamp commented 4 years ago

Story Explanation

User Story

As a TN/TW checker, I want verse links to show me the verse so that I can take advantage of the full content of the check.

When the verse link is clicked, the expanded scripture pane should pop up. ex_scripture_pane.png

Use https://material-ui.com/components/tooltips/ to show linked notes.

DOD: clicking on a verse link will either show the verse or the note depending on what the link refers to.

da1nerd commented 4 years ago

@birchamp where can I find an example note with a verse link in it?

birchamp commented 4 years ago

@cckozie - was this issue from the smurf bar or the TA articles? Maybe I wrote it up wrong. Per Larry, there's no standard for how to link to verses in TN/TW. I'm finding very few of these @neutrinog .

cckozie commented 4 years ago

@birchamp @neutrinog - The smurf bar, I think. There is a verse link in the second tN check in Titus for verse 2:2 in the Abstract Nouns group. Currently it shows as a link but does not do anything when clicked. image

da1nerd commented 4 years ago

@cckozie @birchamp In the example above, the link is not pointing to the verse. It is actually a poorly formatted link pointing to the note e.g. [Titus 1:13](../01/13/je3r). If it were pointing to the verse it should be formatted like this [Titus 1:13](rc://en/ult/book/tit/01/13).

Properly formatted scripture links are already partially supported (they get a tooltip). I can improve on that to also open the scripture pane. However, that note will need to be updated with the correct link.

If instead you want the link to open the referenced note, I'll need to add in support for that. I could technically make it work with the relative link as is, but the official syntax is [Titus 1:13](rc://en/tn/help/tit/01/13/je3r) so that note should probably still be fixed.

Which route do you want me to take?

birchamp commented 4 years ago

I'll see if I can find out from @jag3773 today if there's a standard for verse links.

jag3773 commented 4 years ago

@neutrinog Since this is an internal link I don't why you call it "poorly formatted". It looks correct to me, one note referring to another in the same document...

I think the desired behavior here would be to show the note, either via a hover or a jump, but up t @birchamp on how to implement.

da1nerd commented 4 years ago

@jag3773 you are right. For some reason I was thinking the link was from elsewhere. Probably because I was still thinking about the scripture link format. Using the link as is to open the referenced note would be fine.

birchamp commented 4 years ago

@mannycolon @cckozie - what do you think of using https://material-ui.com/components/tooltips/ to show the linked note?

cckozie commented 4 years ago

@birchamp - I've fine with using a tooltip for verse links but would defer to the stakeholders.

mannycolon commented 4 years ago

Looks good to me too

birchamp commented 4 years ago

@neutrinog - Let's go for this. Make it look like the other light background tooltips in the app.

image.png

da1nerd commented 4 years ago

@mannycolon I'm trying to manually look up a translation note. I thought it would be under resourcesReducer.translationHelps.translationNotes but that only has the tA article that pertains to the currently viewed note. What's the best way to fetch a translation note?

I'm loading the note in the checking tool wrapper similar to this scripture loader https://github.com/unfoldingWord/checking-tool-wrapper/blob/develop/src/components/CheckInfoCardWrapper.js#L27

I'll have the book id, chapter, verse, and note slug available for looking up the note.

birchamp commented 4 years ago

@neutrinog @cckozie - Per the content team and other stakeholders, this isn't a big feature worth investing a lot of time into at this point. Links to notes should just look like regular text. Is there are way to do that but keep the links that we're already handling properly?

cckozie commented 4 years ago

Looks good in 3.0.0 (311f028) image