FooSoft / yomichan

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

[Feature Request] general image improvements #1767

Open Thermospore opened 3 years ago

Thermospore commented 3 years ago

1. Make compact glossary image hyperlinks blue

easy to miss otherwise :)

here is what it looks like the same color as the Log debug info to console hyperlink

css: .gloss-image-link {color: #4a91ed;}

image

2. Sometimes compact glossary hover images have unneeded background / offset

background image

offset image

no issue (for reference) image

3. Compact glossary hover images are rather small, should have a setting to change it

4. In non-compact mode, default image css isn't optimal in many cases

images often flow out of the border and or have unneeded background / offset sometimes the text wrap gets broken by this as well

example 1: offset + flows off page + broken text wrap original image (had to zip it cos github doesn't support webp) screenshot of popup window

example 2: background + flows off page original image stitched screenshot of the search page

5. Should also have an option to control the max size (esp height) of image in non-compact mode

Thermospore commented 3 years ago

Originally just had no.1; turning this into a general image improvements issue

ttu-ttu commented 3 years ago

On a different note, I think it would look better if there's a shadow for pop-up images on compact mode, as the backgrounds of the image may blend with Yomichan's background, making it look weird, at least for me image

toasted-nutbread commented 3 years ago
  1. Makes sense
  2. Can you share the dictionary which has this behaviour?
  3. It is small because it matches the size of the [Image] text. There is not really a good way around this unless the image is not anchored to the text. Maybe it would have to be kind of like an overlay covering the popup.
  4. I'll see if there's a way to improve wrapping, I may need reference to that dictionary also.
  5. I'd like to avoid having an explicit setting on the settings page if possible, since it seems like something that would get very little use. Also custom CSS can cover that. The underlying issue is just that the default CSS should be improved.
  6. Popup image shadow sounds fine, but that could change if the [Image] hover behaviour changes.

Oh, and the extra "dead" space you're seeing is supposed to be to size the image container to its natural size, but that may be broken or the image may be acting strangely. That padding shouldn't be there for a correct case.

ttu-ttu commented 3 years ago

I believe 2 and 4 are related, and the attached dictionary should be able to reproduce them (look up the word sample) sample-image.zip

In addition, I think "Description B" for the sample dictionary should be centered, if you decide to keep the behavior of centering "sample-b.png"

Thermospore commented 3 years ago
  1. sweet
  2. all of those pics are from the entries for in these two dicts: 大辞林 第三版(画像のみ) (v2).zip デジタル大辞泉.zip
  3. i'll throw an idea out, maybe the hover image could simply be another popup, only containing the image? would allow for resizing too, and would already have framework for shadow
  4. same as 2
  5. sounds good

thanks!

Thermospore commented 3 years ago

new changes lookin good :)