alpheios-project / alpheios-core

Alpheios Core Javascript Packages and Libraries
15 stars 2 forks source link

highlight disambiguated result in popup #147

Closed balmas closed 4 years ago

balmas commented 4 years ago

if we use treebank (or other) data to disambiguate parser results in the popup, we should visually indicate that in some way.

balmas commented 4 years ago

@kirlat I don't have a good idea of how this should look so suggest what you think would work. thanks!

balmas commented 4 years ago

in Alpheios Components 3.3.0-qa.20200410462 but wait on #221 before testing

balmas commented 4 years ago

Ok, this can be tested now in the texts-test environment with Alpheios Components 3.3.0-qa.20200423418

A lexeme which has been disamibugated by the treebank data should have a little arrow and a tree diagram next to it, e.g.:

745f3f07-880d-419f-93dd-7091394365c2

balmas commented 4 years ago

(I think maybe there are some css alignment issues to work out still...)

balmas commented 4 years ago

to investigate -- sometimes we aren't getting the disambiguated symbol when using the Alpheios data

e.g. φθίνωσιν at https://texts-test.alpheios.net/text/urn:cts:greekLit:tlg0085.tlg005.alpheios-text-grc1/passage/1-30

balmas commented 4 years ago

I have found 2 scenarios so far where we aren't getting the disamibugation marker when I would have expected it:

(1) when the morphology service doesn't produce results -- i.e. in that case the treebank data is the ONLY data. That's the case for φθίνωσιν at https://texts-test.alpheios.net/text/urn:cts:greekLit:tlg0085.tlg005.alpheios-text-grc1/passage/1-30

(2) when the treebank data is missing a part of speech (this is due to data errors per alpheios-project/alpheios-trees#4) That's the case for ἐμπρέποντας at https://texts-test.alpheios.net/text/urn:cts:greekLit:tlg0085.tlg005.alpheios-text-grc1/passage/1-30

The latter should be fixed with the data. The former I'm not sure about. Will discuss with @abrasax

balmas commented 4 years ago

In the meantime, @kirlat can you look into the alignment issue I'm seeing in the alpheios_nemo_ui environment? It doesn't occur on the embed-lib demo page, so I am guessing it's style bleeding from the underlying page causing the slight misalignment.

kirlat commented 4 years ago

Definitely, will look at it

kirlat commented 4 years ago

This is a tricky one. The disambiguated icon SVG height is 22 pixels in both cases, but the parent div (a base element for tooltip) is 26px in embed lib and only 22.16px in Nemo UI. Cannot figure why. Both those elements seem to have parameters that affecting dimensions the same.

kirlat commented 4 years ago

Oh, found it, that's because SVG has a display: inline-block and in that case browser reserves space for descenders (the bits that hang off the bottom of 'y' and 'p'). We have to set it to display: block for them to have an equal height.

balmas commented 4 years ago

Alpheios Components 3.3.0-qa.20200501441

balmas commented 4 years ago

test with Alpheios Components 3.3.0-qa.20200504341

monzug commented 4 years ago

alignment and issue 2 have been fixed. issue 1) is still reproducible. Let me know if I should close this one and open a separate issue for 1).

see screenshot

missing-treebank-icon

balmas commented 4 years ago

I think issue (1) may be resolved by my latest use case to be fixed in #166 : https://github.com/alpheios-project/alpheios-core/issues/166#issuecomment-630417237

monzug commented 4 years ago

1) will be tested in issue #166