-
Notifications
You must be signed in to change notification settings - Fork 24
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
Address #70, add template variable pocket-url #89
Conversation
woohoo! First contribution from the community! ❤️ Thanks for putting this together. I'm reviewing now. BTW you have to also update version numbers in |
Also, since (sadly) we do not have automated tests, can you describe how you went about testing this change? |
src/ui/components/PocketItem.tsx
Outdated
<PocketItemExternalLink | ||
title="Open in Pocket" | ||
url={getPocketItemPocketURL(item)} | ||
/> | ||
<PocketItemExternalLink title="Open Original" url={item.resolved_url} /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it might be clearer to the user to do the following:
- Switch the order of these two links, so that the "Open Original comes first".
- Rename "Open original" to simply "Open".
So it ends up looking like "Open" and "Open in Pocket", where "Open" is understood to be the existing behavior of opening the saved URL, and "Open in Pocket" is simply a modifier on top of that behavior that opens in Pocket.
LMK what you think.. It seems to me that this would be the easiest to understand for the user.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, I can make those changes.
src/ui/components/PocketItem.tsx
Outdated
.item > span { | ||
display: block; | ||
} | ||
|
||
.header { | ||
flex-grow: 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops. I think a semicolon is missing here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yup that's the one.. I can build now that I added the semi-colon.
As far as the "0.7.1": "0.12.11" |
Yup what you posted is sufficient, you don't have to update the Obsidian version numbers. Here's a PR that shows how to bump the version numbers: https://github.com/nybbles/obsidian-pocket/pull/85/files. |
Thank you again for this patch! |
Relevant Changes
{{pocket-url}}
to open the Pocket item inside the Pocket UI. The URL is constructed using theitem_id
field and relies on the user being authenticated to Pocket in their browser. It also has the potential to break if Pocket updates the schema for item URLs.manifest.json
andpackage.json
as well as adding the new variable to the README.With New Links
Example with Long Titles/Narrow Screen Width
Addresses #70.
Testing Steps
Basic Running Instructions
.obsidian/plugins
directory in a vault. It may be easiest to use a test vault, especially if you also have the current version of this plugin installed.npm i
command to install Node packages, thennpm run dev
to start a dev server with a build watch.0.7.1
Connect Your Pocket Account
in the plugin settings or by copying an existing, valid.__pocket_access_info__
file into the root directory.Branch Specific Instructions
Sync
command to create a list. Open the Pocket list.CTRL-SHIFT-I
oroption-cmd-i for
Mac).{{pocket-url}}
variable to the plugin's configured template. Click through the title from one of the Pocket items to see the newly-generated note.