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

Adding support for 1Password 8 #1518

Merged
merged 24 commits into from May 3, 2022
Merged

Adding support for 1Password 8 #1518

merged 24 commits into from May 3, 2022

Conversation

dteare
Copy link
Contributor

@dteare dteare commented Apr 27, 2022

Description

I worked with @thomaspaulmann to add support for 1Password 8 to the existing 1Password extension.

Screencast

CleanShot 2022-04-27 at 11 24 14@2x

screenshot-01

screenshot-02

screenshot-03

Checklist

❯ npm run build

> build
> ray build -e dist

info  - entry points [src/list.tsx]
info  - checked TypeScript
ready - built extension successfully

❯ npm run lint 

> lint
> ray lint

ready - run ESLint
ready - run Prettier
ready - no ESLint or Prettier issues found

@raycastbot raycastbot added the extension fix / improvement Label for PRs with extension's fix improvements label Apr 27, 2022
@raycastbot
Copy link
Collaborator

raycastbot commented Apr 27, 2022

Thank you for your contribution! 🎉

🔔 @khasbilegt @thomaspaulmann you might want to have a look.

@khasbilegt
Copy link
Contributor

Hello @dteare @thomaspaulmann,

First of all, thank you all for the contribution. I have been using 1Password 8 for quite some time so I haven't been able to do much about the issues and requests of this extension. However, I was planning to rewrite it using the new 1Password CLI. Correct me if I'm wrong but looks like this changes are possible because 1Password 8 has some backward compatibility on creating metadata files like 1Password 7 does. So in order to integrate with the new CLI would it better to create a new extension? or is it better to do it here but keep the logic separately?

@dteare
Copy link
Contributor Author

dteare commented Apr 27, 2022

Hello @khasbilegt! You're very welcome. And thank you for creating this extension! 🤗 I had reached out to you on the Raycast Slack channel to jam but I'm guessing you don't hang out there any more.

As for the 1Password CLI, that's exactly right. With the new CLI we have complete flexibility and can use it directly within this Raycast extension. We can even do a lot more like recreate the full item view and even editing if we wanted to, all directly within Raycast and without relying on the metadata files whatsoever. That will be great and is the plan for the future.

This PR is a stepping stone towards that future by leveraging the opbookmarks helper which creates the same set of metadata files that 1Password 7 creates. Admittedly it is more complicated and we need to simplify it so this is absolutely just the first step.

So in order to integrate with the new CLI would it better to create a new extension?

Yes! It would be. But that's not my decision to make. 🙂 My original plan was to use a separate 1Password 8 extension whose implementation would deviate completely to use the CLI and extend the capabilities that we have today. I was unable to convince @thomaspaulmann that this was the best way forward so some gymnastics will be needed to preserve backwards compatibility once we evolve beyond the simple metadata file approach.

@pernielsentikaer pernielsentikaer merged commit 24be130 into raycast:main May 3, 2022
@raycastbot
Copy link
Collaborator

Published to the Raycast Store:
https://raycast.com/khasbilegt/1password7

@azlekov azlekov mentioned this pull request May 4, 2022
mkitane pushed a commit to mkitane/extensions that referenced this pull request May 10, 2022
* 1Password: Extract CLI info to separate file

* 1Password: Add preference to toggle between 1Password 7 and 8

* 1Password: Make support for version 7 and 8 simpler

* 1Password: Migrate to API v1.30

* 1Password: Remove unnecessary dependency

* 1Password: Add changelog entry

* 1Password: Improve error messages

* Use 1Password 8 when both metadata locations exist

* Avoiding duplicate key warning

This is actually an issue in opbookmarks as the CLI doesn't export the category UUID. While we could hardcode things that will be problematic for new item types.

* Updating command title to reflect all item types

* Removing version specificity from the description

We need to change the folder name and the name+title as well. Some of this can only be done on the Raycast side.

* Updating contributors

* Updating 1Password 8 url schemes

* Updated screenshots

* Updating install instructions

* Updating package description & subtitle

* Chore: Corrected format

* Update package.json

* Various small updates

* Corrected metadata

* Update CHANGELOG.md

Co-authored-by: Thomas Paul Mann <hello@thomaspaulmann.com>
Co-authored-by: Per Nielsen Tikær <per@raycast.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
extension fix / improvement Label for PRs with extension's fix improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants