Paperfeed / LiuChan

A Chinese mouseover dictionary extension for Chrome
https://paperfeed.github.io/LiuChan
20 stars 11 forks source link

LiuChan toolbar button wrong state #8

Open manyfew opened 6 years ago

manyfew commented 6 years ago

I've noticed some times the LiuChan toolbar button is red but LiuChan is not really active (the button really should be gray). If I click the button, it stays red and LiuChan finally becomes enabled.

I've also noticed some times LiuChan highlights Chinese characters but the pop-up does not show. Reloading the web page usually fixes this.

Thanks :)

manyfew commented 6 years ago

This problem didn't happen so much at the beginning, it's very strange. What is really happening is this: LiuChan is active and the red icon reflects this, but then suddenly it stops working, while the icon remains red. The solution is to click the icon twice to "wake it up".

Paperfeed commented 6 years ago

I've had this happen to me several times as well. I think I've solved it - will upload a patch this evening. Not entirely sure if it's fixed, but I believe it had to do with new windows being created and the extension not properly sending along the configuration to the new window (as it only propagated state on tab change, not on window focus). I'll just push out the patch and see if it occurs again or not.

Also the icon would show up red/active upon first loading (without actually enabling itself), which it should not, so I've fixed that.

On Thu, Jan 18, 2018 at 8:35 AM, Manuel Fernandez notifications@github.com wrote:

This problem didn't happen so much at the beginning, it's very strange. What is really happening is this: LiuChan is active and the red icon reflects this, but then suddenly it stops working, while the icon remains red. The solution is to click the icon twice to "wake it up".

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Paperfeed/LiuChan/issues/8#issuecomment-358562430, or mute the thread https://github.com/notifications/unsubscribe-auth/ABj8VxIQedKhdQW0NHVOJqC1evN4OCO4ks5tLvQ7gaJpZM4RBc_m .

manyfew commented 6 years ago

Hi, did you upload this update to the Chrome store? There it still says it's at version 1.1.0, thank you

Paperfeed commented 6 years ago

Update has been pushed. I also added a notepad functionality (available on right clicking the icon). Took a bit longer due to life interfering :)

On Sun, Jan 21, 2018 at 9:22 PM, Manuel Fernandez notifications@github.com wrote:

Hi, did you upload this update to the Chrome store? There it still says it's at version 1.1.0, thank you

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Paperfeed/LiuChan/issues/8#issuecomment-359277587, or mute the thread https://github.com/notifications/unsubscribe-auth/ABj8V1A0onaC8iH4tC4akJWZloyR89edks5tM5xqgaJpZM4RBc_m .

manyfew commented 6 years ago

Much appreciated! I'm testing now. It seems to be working well so far.

The new Notepad is very interesting. I'm not sure what your intended use is but I can think of a couple of ways to put it to good use. I've posted a few suggestions for this feature on a separate thread.

manyfew commented 6 years ago

Actually, been testing this for a bit now and it seems it's still broken. If you use Liuchan regularly I'm sure you will have noticed.

manyfew commented 6 years ago

Hey, just wondering if you managed to figure this out, thanks!

Paperfeed commented 6 years ago

I'm currently traveling. Haven't had time to check. It's weird though because I haven't been able to replicate it anymore. Do you have any idea what causes it to happen? After how long/ which actions does it seem to occur? After you switch tabs/ windows? On the same page? Any other details would be greatly appreciated.

On Feb 22, 2018 07:00, "Manuel Fernandez" notifications@github.com wrote:

Hey, just wondering if you managed to figure this out, thanks!

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Paperfeed/LiuChan/issues/8#issuecomment-367520240, or mute the thread https://github.com/notifications/unsubscribe-auth/ABj8V36hELD9dejNNCfFWSQziZnHuFLsks5tXK4BgaJpZM4RBc_m .

manyfew commented 6 years ago

No worries :)

I‘ve done some digging and I can reproduce the problem as follows:

  1. Ensure LiuChan is already enabled (icon is red).
  2. Open a new tab.
  3. Type www.baidu.com in the address bar, press Enter key and wait for page to load.
  4. At the top of the Baidu's home page there are some Chinese characters; move the mouse pointer over them and you should see LiuChan's pop-up. So far so good, LiuChan is working correctly.
  5. Now, in the Baidu search box, type some text, for example, 你好吗 and press Enter key if necessary (it should search automatically without you having to press Enter).
  6. The search results should contain plenty of Chinese characters, now move the mouse over some of those Chinese characters. Note that the LiuChan icon is still red.

Expected result: LiuChan pop-up is displayed as mouse passes over Chinese characters. Actual result: LiuChan group-highlights the Chinese words correctly, but the pop-up never displays.

  1. Click the Reload button in Chrome to refresh the page and repeat Step 6 (move mouse over Chinese characters, again).

Result: After reloading the page, LiuChan works again.

  1. Repeat Steps 1-6 again to reproduce the problem one more time.
  2. Ensure the pop-up isn't working, then click the LiuChan icon. The icon should turn gray.
  3. Click the icon one more time, it should turn red.
  4. Now move the mouse over some Chinese text.

Result: After turning LiuChan off and on again, the pop-up works correctly.

I hope that helps, have fun travelling!

Paperfeed commented 6 years ago

Thank you very much for the beautiful bug report! (Have you done this before?)

I found where the problem lies and (to my knowledge) fixed the issue, along with another serious big that only affected new users. All in all, a good day for LiuChan :)

Apologies for the delay. I'm still on the road, but 'found' some time to have a look :d

Again, thank you for he continued support with all the bug reports and suggestions :)

On Sun, Feb 25, 2018 at 10:26 PM, Manuel Fernandez <notifications@github.com

wrote:

No worries :)

I‘ve done some digging and I can reproduce the problem as follows:

  1. Ensure LiuChan is already enabled (icon is red).
  2. Open a new tab.
  3. Type www.baidu.com in the address bar, press Enter key and wait for page to load.
  4. At the top of the Baidu's home page there are some Chinese characters; move the mouse pointer over them and you should see LiuChan's pop-up. So far so good, LiuChan is working correctly.
  5. Now, in the Baidu search box, type some text, for example, 你好吗 and press Enter key if necessary (it should search automatically without you having to press Enter).
  6. The search results should contain plenty of Chinese characters, now move the mouse over some of those Chinese characters. Note that the LiuChan icon is still red.

Expected result: LiuChan pop-up is displayed as mouse passes over Chinese characters. Actual result: LiuChan group-highlights the Chinese words correctly, but the pop-up never displays.

  1. Click the Reload button in Chrome to refresh the page and repeat Step 6 (move mouse over Chinese characters, again).

Result: After reloading the page, LiuChan works again.

  1. Repeat Steps 1-6 again to reproduce the problem one more time.
  2. Ensure the pop-up isn't working, then click the LiuChan icon. The icon should turn gray.
  3. Click the icon one more time, it should turn red.
  4. Now move the mouse over some Chinese text.

Result: After turning LiuChan off and on again, the pop-up works correctly.

I hope that helps, have fun travelling!

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Paperfeed/LiuChan/issues/8#issuecomment-368318024, or mute the thread https://github.com/notifications/unsubscribe-auth/ABj8V7NfUxZUlt7fKRzGHrY4qWQ3URGeks5tYXuQgaJpZM4RBc_m .

manyfew commented 6 years ago

It finally seems to be working, awesome update! And yes, I report bugs all the time ;) I'll test it for a week or so and report. Much appreciated!

manyfew commented 6 years ago

It's working well. The only thing is every time I start Chrome, LiuChan is disabled by default. Would it be possible to add a setting under 'General' to specify start-up state, for example:

Start: [Enabled | Disabled | Last]