FooSoft / yomichan

Japanese pop-up dictionary extension for Chrome and Firefox.
https://foosoft.net/projects/yomichan
Other
1.06k stars 213 forks source link

Frequency/tag display errors with new yomichan update (v20.12.6.1) #1130

Closed Thermospore closed 3 years ago

Thermospore commented 3 years ago

Description

  1. Frequency lists are showing up twice: image image

  2. I don't know if this is a bug or not (or if it's even new), but it seems tags don't show up unless they are in the top dictionary entry. Here is 食べる again, but with jmdict on top: image

~~3. Not sure what that adv in the 素早い screenshot was. It doesn't show up anymore (even with 新明解 back on top) image~~ edit: my bad, that was just the conjugation

Browser version Google Chrome バージョン: 87.0.4280.88(Official Build) (64 ビット)

Yomichan version v20.12.6.1

Exported settings file (exported from v1 settings page; haven't taken a look at v2 yet) yomichan-settings-2020-12-19-05-36-26.txt

Thanks for taking a look!

EDIT: Also, in case it's relevant, I created that jmdict on 9/21/2020 using yomichan import

Thermospore commented 3 years ago

Oh, I figured out #3, it's just the conjugation haha image

Didn't immediately recognize it since everything is a bit jumbled at the moment

PagChompman commented 3 years ago

Same, almost everyone I talked to also have this problem. Hope it gets fixed soon :) Also, why is the text blue by the way?

Thermospore commented 3 years ago

Also, why is the text blue by the way?

That's a new thing, I think to make entries with the P "popular term" tag stick out

edit: it also greys out entries with obsolete readings, irregular kanji usage, etc! Pretty sweet!

toasted-nutbread commented 3 years ago

For anyone who is experiencing this issue, can you reproduce the problem on the search page, then open the browser's dev console (F12), and run this code:

console.log(document.querySelector('.term-special-tags').innerHTML)

And copy what it outputs? I'm trying to reproduce, even after importing the settings file, but only one of them shows up for me (which is what should be happening).

Also, why is the text blue by the way?

This is a bug; the color should have only been applied in certain display modes.

c-ehrlich commented 3 years ago

I'm also having this issue, here's my output for that console command.

<div class="frequencies tag-list" data-count="1"><span class="tag" data-category="frequency" data-expression="ペン" data-reading="ペン" data-reading-is-same="true" data-dictionary="Innocent Corpus" data-frequency="7932" data-index="0"><span class="tag-inner"><span class="tag-frequency-disambiguation"><span class="tag-frequency-disambiguation-expression">ペン</span><span class="tag-frequency-disambiguation-separator"></span><span class="tag-frequency-disambiguation-reading">ペン</span></span><span class="tag-frequency-dictionary-name">Innocent Corpus</span><span class="tag-frequency-separator"></span><span class="tag-frequency-value">7932</span></span></span></div>

When I disable the frequency list it shows up 0 times (as expected), after re-enabling it it shows up twice again.

toasted-nutbread commented 3 years ago

Hmm, testing with that snippet didn't help as much as I had expected. Could you (or anyone) share either:

  1. The result of this command (assuming the first definition in the list exhibits the issue):
    console.log(document.querySelector('.entry').innerHTML)
  2. Save the entire page HTML (CTRL+S) and share the HTML file here.

Edit: nevermind, I have reproduced it and am looking into it.

toasted-nutbread commented 3 years ago

Issue is fixed and will be included in an upcoming patch release. The issue was due to an incorrect CSS selector which doesn't work in Chrome 87, but does in Chrome 89 and Firefox.

As a temporary workaround, add this custom CSS rule:

:root[data-glossary-layout-mode=compact] .entry:not([data-expression-multi=true]) .term-special-tags {
    display: none;
}

I will also look into the second issue mentioned in the OP.

toasted-nutbread commented 3 years ago

As for the second issue, I think the behaviour was always that way. #1138 updates it to include the tags from all definitions.

Thermospore commented 3 years ago

Awesome, thanks for the patches and the workaround!

(personally, I've since been converted to Group related terms mode 😈)

I guess we should leave this issue open until the patch goes through, so people can find the workaround?

Thermospore commented 3 years ago

Looks like the patch with #1135 is pushed through. Works great for me! And I assume #1138 will come though at some point as well, too.

Thanks!