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

feat: tooltip overlap pdf/text view #533

Conversation

dorianmiller
Copy link
Contributor

@dorianmiller dorianmiller commented Sep 25, 2023

What do these changes do/fix?

Added tooltip for overlapping enrichments.

PDF view

image

Text view

image

How do you test/verify these changes?

  1. Open a document in Discovery Tooling.
  2. Select 2 enrichment categories (until overlap is available)
  3. Hover over overlapping enrichments and verify tooltip content

Also, In Components sample app, test contracts visualization. Should be same as before. Some changes in the other views, required fixes in this view:
image

Have you documented your changes (if necessary)?

NA

Are there any breaking changes included in this pull request?

No

drdorianm added 30 commits June 12, 2023 21:38
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@noah-eigenfeld
Copy link
Contributor

noah-eigenfeld commented Oct 17, 2023

Testing results

I keep running into cases where the tooltip isn't displayed all of the enrichments a highlight is associated with, even when the highlight correctly has the overlapping highlights color. At first, I thought it might be that the tooltip needed the two to be an exact match, but then I found examples like this one, where the same word is an exact match for two enrichments, and right next to each other is a highlight with both enrichments in the tooltip and one with a single enrichment.
Screenshot 2023-10-17 at 11 51 45 AM
Screenshot 2023-10-17 at 11 51 38 AM
The above example is a dictionary overlapping with entities v2.

I also keep getting stuck with a ghost highlight/border stuck onscreen, often at different positions.
Screenshot 2023-10-17 at 11 58 41 AM

In addition to these, I see that using the arrows to navigate between highlights only scrolls the highlights into view some of the time in the text view, with no pattern I've found as to the type of enrichment that fails.

Edit: looks like the ghosting highlight is an existing bug. I'll write up a bug report for it.

@dorianmiller
Copy link
Contributor Author

Screenshot 1 and 2: I updated the implementation to match the described design.

Copy link
Member

@jhpedemonte jhpedemonte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works well for me, didn't see any issues in either PDF or Text views. Just had some minor suggestions -- with those fixed, approved.

@@ -162,6 +159,28 @@ export function calcToolTipContent(
return tooltipContent;
}

function calcOneTooltipRow(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What exactly does this function do? Please add a comment.

Copy link
Contributor

@noah-eigenfeld noah-eigenfeld left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified that the scrolling issue is fixed now. Code changes look good to me

@dorianmiller dorianmiller merged commit 0e6d6c5 into watson-developer-cloud:master Nov 8, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

5 participants