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

Highlight when multiple verses are in the reference field in TSV7 #1491

Closed
birchamp opened this issue Dec 15, 2022 · 5 comments
Closed

Highlight when multiple verses are in the reference field in TSV7 #1491

birchamp opened this issue Dec 15, 2022 · 5 comments
Assignees
Labels
QA/Passed QA Completed

Comments

@birchamp
Copy link
Contributor

birchamp commented Dec 15, 2022

If the occurrence number is -1, the word should be highlighted every time it appears in ANY of the verses in the reference range. This is the most common use case, but the current way of highlighting based on specific occurrence numbers (like 1, 2, 3) should still work.

@birchamp
Copy link
Contributor Author

@jincypjose we need to know how big of an effort this is.

@jincypjose
Copy link
Contributor

jincypjose commented Dec 20, 2022

@birchamp - @larsgson, @Joel-C-Johnson and i were debugging this issue and found out it's a few day's effort not a quick fix
And for the future reference.Its in single-scripture-rcl
these are two files where focus is needed:
ScripturePane.tsx
useScripture.tsx

and then search for "verseObjectsArray",
which is the structure @larsgson created to solve this within gE

@jincypjose
Copy link
Contributor

jincypjose commented Feb 9, 2023

  1. we made progress on this but later found that it only works if the occurrence happens on the first verse, if there is no occurrences on the first verse non of the words would be highlighted for eg php1:1-2,2:5
    Edge case 1:
    failing-2.png

  2. if there is no occurrences in the middle verses then only the words in the first verse would be highlighted
    Edge case 2:
    working-1.pngfailing-1.png

  3. If there are no occurrences of the quote in some of the mid verses of a reference range, the occurrence numbers will not match what is actually highlighted. i.e. if we have three verses and the quote refers to a word that only appears in verses one and three, the occurrence numbers for those two words should be 1 and 2, but they are assigned 1 and 3.
    Edge case 3:
    Screenshot from 2023-03-07 20-03-23
    Screenshot from 2023-03-07 20-03-35
    Screenshot from 2023-03-07 20-03-42

AREA OF FOCUS
(export const selectionsFromQuoteAndString = ({
quote,
stringMap: rawStringMap,
occurrence,
})) this is in selection.js file (https://github.com/unfoldingWord/scripture-resources-rcl/blob/master/src/core/selections/selections.js) line-62

@elsylambert
Copy link
Contributor

Does this issue scope for occurrences -1 only? Or does it cover Occurrence 2 or more in verse ranges? @abelpz @jincypjose

@elsylambert elsylambert added the question Further information is requested label Mar 13, 2023
@elsylambert
Copy link
Contributor

elsylambert commented Mar 16, 2023

translationCore Create - v1.11 build 235-a32731d. Highlighting in verse ranges works fine. -1 occurrence highlights all the occurrences in the range and if occurrences are changed to 1 or higher, the correct occurrence of the Quote is highlighted.
Screenshot 2023-03-16 at 10.01.54 AM.png

@elsylambert elsylambert added QA/Passed QA Completed and removed question Further information is requested labels Mar 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
QA/Passed QA Completed
Projects
None yet
Development

No branches or pull requests

5 participants