Closed chris-grove closed 6 years ago
The function to highlight the sentences with a match was called every time a new category or keyword was selected for highlighting. I removed the call and separated the two highlighting processes. The problem should be fixed now.
@valearna Nice! Works great! One strange thing happens still, where it seems that parentheses '(' or ')' or basic words like 'in', 'to' or 'of' are retaining the sentence highlight color once moving on to a new sentence, but this only happens for the first sentence. Here's a video demo:
I can create a separate ticket for that if necessary.
Thanks @chris-grove for the feedback! Those basic words that were retaining the highlight color were highlighted as categories somewhere else in the text, but not in the currently selected sentence. I added new control logic to identify those cases. I tested the new code using the search in the video and it seems to work correctly now.
@valearna OK, almost perfect, but I'm still seeing the word "in" keeping a highlight after I navigate away from the first matched sentence:
It's really not a big issue, but if that is indicative of a larger or more systematic problem then I would want to fix it. Thanks!
In that case the word "in" appears in the same sentence twice, in the first case linked to a category and in the second one as a non-category. To solve the problem, I completely changed the logic for highlighting the sentences and the new strategy seems to cover all cases, although I still need to do more testing. Let me know if you find other glitches. Thanks a lot for the videos, they are really helpful!
OK, looks good! Closing.
This is pretty minor, but it seems that when performing a search and then viewing a paper for matching sentences, the highlighting of the sentence matches in the Curation tab (which is nice) precludes highlighting individual words within the sentence that match a searched term or category. Here's a video demo:
https://www.dropbox.com/s/lhyvlony3w5yi9s/TPC_category_highlighting_does_not_apply_to_selected_sentence_match_11-29-2017.mov?dl=0