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

Handling (some) URL substrings as separate pages #1

Closed
peter-lyons-kehl opened this issue Aug 30, 2019 · 4 comments
Closed

Handling (some) URL substrings as separate pages #1

peter-lyons-kehl opened this issue Aug 30, 2019 · 4 comments

Comments

@peter-lyons-kehl
Copy link

Hi Laurent,

INTRO

When visiting an anchor link (https://server/path/to/page#anchor), YAWAS reads and records the highlights and comments for the unanchored URL. That way the highlights stay even as you follow other anchor links on the same page.

A side effect: If you also use another Google bookmarks-based extension, like Fess GBE for Firefox, then YAWAS will show highlights for any anchors on the page. However, those other extensions may not indicate the page as bookmarked, unless you remove the #anchor part from the URL.

Thank you for this. Could you keep that behavior, please. Optionally, would you consider adding a simple note, like above, about that behavior to either the extensions' webpage on Mozilla/Chrome, or to README.md?

THE ISSUE

The problem is, that YAWAS matches a page being visited with a stored set of highlights, even if the current page (one being visited) has a URL that is longer than the stored URL, but it's not longer due to an #anchor. Example:

  1. I highlighted on https://developers.google.com/protocol-buffers/docs/proto3

  2. Later I noticed that there's an old version of the same page: https://developers.google.com/protocol-buffers/docs/proto. To help me notice in the future that it's obsolete, I highlighted its header in red and added a comment.

  3. However, now that comment applies to https://developers.google.com/protocol-buffers/docs/proto3, and it doesn't show my original highlights (which are still stored). I know that to undo that, I can remove the G. Bookmarks record for https://developers.google.com/protocol-buffers/docs/proto, but I don't want to, as it has its purpose.
    image

Could it remove any anchors, but not match on substrings, please?

@ldenoue
Copy link
Owner

ldenoue commented Sep 1, 2019

Good catch. When querying google bookmarks, we use the url as a query, trusting that only highlights for that url are returned by google. Your test case shows it’s not the case: google must be doing some substring matching instead. We thus need to double check the urls returned and store the highlights under the correct ones.

I’ll try to fix this ASAP.

@ldenoue
Copy link
Owner

ldenoue commented Sep 2, 2019

I tested today to highlight these 2 URLs:

Yawas correctly retrieves the highlights for the correct URL: i.e. google doesn't do substring matching, see:
https://github.com/ldenoue/yawas/blob/master/yawas-background.js#L130

So I don't understand the issue: perhaps your other extension that manages your bookmarks is doing something that alters your Google Bookmarks?

@peter-lyons-kehl
Copy link
Author

Hi Laurent,

I confirm that this has been fixed since around a week ago (whether you fixed it intentionally, or as a side effect of another fix).

Thank you.

@peter-lyons-kehl
Copy link
Author

Hi Laurent,

I confirm that this has been fixed since around a week ago (whether you fixed it intentionally, or as a side effect of another fix).

Thank you.

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

No branches or pull requests

2 participants