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

Improve context menu to save current page URL (no text selected) #335

Closed
penge opened this issue Dec 19, 2021 · 5 comments · Fixed by #341
Closed

Improve context menu to save current page URL (no text selected) #335

penge opened this issue Dec 19, 2021 · 5 comments · Fixed by #341
Labels
enhancement New feature or request
Milestone

Comments

@penge
Copy link
Owner

penge commented Dec 19, 2021

There has been a suggestion (on Web Store) if My Notes Context menu could be also used to save links, as it saves only plain text now.

@penge penge added the enhancement New feature or request label Dec 19, 2021
@penge
Copy link
Owner Author

penge commented Dec 19, 2021

This feature cannot be added, unfortunately.

Reason:
contextMenus API provides "linkUrl", as an URL to a link on which the user has right-clicked on. Selected text, that is provided via "selectionText", might NOT contain just a link. There's no way to tell if the selected text is only the link, or not.
Example:
The user has selected a block of text, or multiple links, or a combination of both. "linkUrl" will be populated, although not everything selected ("selectionText") is a link. There's no way to differentiate only a link was selected, as we would like links to be stored as links and text as text.

@penge penge closed this as completed Dec 19, 2021
@xSwagboy69x
Copy link

Hi, I'm the person who left that review/comment on the Web Store, I just saw your reply, sorry for the delay.

The current behavior is to select some text, then use context menu to save to chosen note – which results in the selected text AND a functional link TO the source URL (rather than on it) directly under it, correct? So, what I'm suggesting is to be able to do the same thing – save that link to the source page – without needing to select (and save) text. Sometimes, there isn't a block of text that I need to save at all, or the page I'm on is mostly images. Essentially, "copy URL to note".

I assumed it would be possible b/c the extension already is already doing it, just only when I select text. If I'm wrong, I'd be fine with plaintext URL being saved too; just something to be able to keep track of lists of pages in a note.

Also, I really liked the "clipboard" feature where I could save text directly to a specified note, that was very useful :)

Thanks for your hard work!

@penge
Copy link
Owner Author

penge commented Dec 30, 2021

Hi @Jessamynn!

I am glad the reply found you and led you here. What you are writing is correct – we have the functionality already, it just needs to be extended to saving URL only (no text selected).

This is definitely doable and I'll be glad to add it into the next version. (I misunderstood the functionality before so I was writing about something else.)

I will also bring back the "clipboard" feature (I miss it too). Here's how it could work:

  • when text is selected, @Clipboard could be above all notes, so it's quick to spot and save to
  • when saving URL (no text selected), @Clipboard could be the only note to save to (It would make the context menu really neat and practical to save URL links quickly.)

Note: If @Clipboard note woudn't exist, it would be created automatically.
Note2: I am renaming this issue and adding it to the next version.
Note3: As a bonus, I'll look into notifications, that would pop-up and close in the top-right corner on a successful save.

@penge penge changed the title Use context menu to save links Improve context menu to save current page URL (no text selected) Dec 30, 2021
@penge penge reopened this Dec 30, 2021
@penge penge added this to the 3.16 milestone Dec 30, 2021
@xSwagboy69x
Copy link

@penge

Thanks for the prompt reply! Your ideas regarding URL saving and @clipboard are pretty much exactly what I was thinking, so that sounds great.

I hope this isn't too much extra work, I made sure that my requests were related to functionality that exists (or existed, like the clipboard) so that implementation would be as painless as possible :)

@penge
Copy link
Owner Author

penge commented Dec 31, 2021

@Jessamynn

Thanks for being considerate! Actually, I jumped right into it and it's already implemented. Let me get back to it in the next year and test it, and release it. Expect it to be released under version 3.16 in a couple of days.

Happy New Year! :)

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

Successfully merging a pull request may close this issue.

2 participants