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

fix: Add logic to return early if hover returns empty string #1446

Open
wants to merge 16 commits into
base: main
Choose a base branch
from

Conversation

tora-pan
Copy link
Contributor

@tora-pan tora-pan commented Mar 9, 2023

Add logic to return early if hover returns empty string.

Fixes #1417

@codecov
Copy link

codecov bot commented Mar 9, 2023

Codecov Report

Merging #1446 (8317805) into main (905358e) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #1446      +/-   ##
==========================================
+ Coverage   79.62%   79.64%   +0.01%     
==========================================
  Files           7        7              
  Lines        3004     3006       +2     
  Branches      189      189              
==========================================
+ Hits         2392     2394       +2     
  Misses        607      607              
  Partials        5        5              
Impacted Files Coverage Δ
extension/rikaichan.ts 87.70% <ø> (-0.04%) ⬇️
extension/background.ts 77.38% <100.00%> (+0.83%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Owner

@melink14 melink14 left a comment

Choose a reason for hiding this comment

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

We talked about also updating the content scripts as well (such that we'd expect to never hit this early return.

If we're treating this as the fix for the bug, maybe we should open another issue for tracking cleaning up the client side (so we don't send these search requests).

Another thought I had was whether this should be here or in the background.ts message handler. It's sometimes said that request validation should happen at system entry points (essentially, means you can safely assume valid data everywhere else)

I don't have a strong opinion but curious to hear your thoughts about it.

extension/rikaichan.ts Outdated Show resolved Hide resolved
extension/test/background_test.ts Outdated Show resolved Hide resolved
extension/test/background_test.ts Outdated Show resolved Hide resolved
extension/test/background_test.ts Outdated Show resolved Hide resolved
extension/test/background_test.ts Outdated Show resolved Hide resolved
extension/test/background_test.ts Outdated Show resolved Hide resolved
extension/test/background_test.ts Outdated Show resolved Hide resolved
extension/test/background_test.ts Outdated Show resolved Hide resolved
extension/test/background_test.ts Outdated Show resolved Hide resolved
extension/test/background_test.ts Show resolved Hide resolved
package.json Show resolved Hide resolved
extension/test/background_test.ts Outdated Show resolved Hide resolved
extension/test/background_test.ts Outdated Show resolved Hide resolved
extension/test/background_test.ts Show resolved Hide resolved
@tora-pan
Copy link
Contributor Author

@melink14 I'm not sure of the correct procedure for this but, moving this to a new branch / pr to simplify things.

#1458

Copy link
Owner

@melink14 melink14 left a comment

Choose a reason for hiding this comment

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

You marked some comments as resolved but they still seem to be here. Did you push?

extension/background.ts Outdated Show resolved Hide resolved
@melink14
Copy link
Owner

There is still https://github.com/melink14/rikaikun/pull/1458/files which is similar to this but loses the comments. It'd be nice if you just copied the conents of https://github.com/melink14/rikaikun/pull/1458/files to this branch and then closed the other PR. (since they're the same except this one has history)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Hovering over ruby text pops up orangatang kanji
2 participants