Skip to content

Implement Categories in 1password extension - #347

Merged
fe9lix merged 2 commits into
raycast:mainfrom
selfish:feat/1password7-choose-primary-action
Nov 22, 2021
Merged

fe9lix merged 2 commits into
raycast:mainfrom
selfish:feat/1password7-choose-primary-action

Conversation

@selfish

@selfish selfish commented Nov 12, 2021

Copy link
Copy Markdown
Contributor

Description

This PR adds category sections to the 1password extension, to show items of the same type clustered.

Type of change

  • Improvement for somebody else's extension. Extension author: @khasbilegt

Screenshots

Before - Mixed Types:

1p-before

After - Categorized view:

1p-after

Checklist

@pernielsentikaer

Copy link
Copy Markdown
Contributor

Hi @selfish 👋

It sounds like a good update to me 💪

@khasbilegt what do you think about this update, and can you give it a quick spin?

@pernielsentikaer pernielsentikaer added the extension fix / improvement Label for PRs with extension's fix improvements label Nov 14, 2021
@khasbilegt

Copy link
Copy Markdown
Contributor

Hello, @selfish. Thank you for your contribution.

@pernielsentikaer this PR looks good to me.

@pernielsentikaer pernielsentikaer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hi @selfish 👋

Very nice addition to this already awesome extension 💪

A suggestion for later could be to add the possibility to hide the type subtitle since for some it could be a bit redundant having it in the group title.

I have 200+ items in one of them, so I like it, but if you only have a few it could be a delightful setting to have to for the UX.

This should be added in a new PR, since I'm going to mark this accepted now 😄

@pernielsentikaer pernielsentikaer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hi again 👋

Please check the suggestion, when it's done It's ready to get merged 💯

Comment thread extensions/1password7/src/list.tsx Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
console.log(onePasswordMetaItemsCategory)
console.log(onePasswordMetaItemsCategory)

Can we remove this, no need to log secret data to the console 😄

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Whoopsie! Good catch.
Debug code left there.

Removed!

@selfish
selfish force-pushed the feat/1password7-choose-primary-action branch from 7b55e5c to 8690063 Compare November 17, 2021 11:42
@selfish

selfish commented Nov 17, 2021

Copy link
Copy Markdown
Contributor Author

Thanks for your review.
I've removed the leftover console.log, and will create a followup-PR to add the option to toggle the redundant subtitle.
Cheers!

@pernielsentikaer pernielsentikaer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hi @selfish 👋

Awesome update, it looks SO good 💯

I just checked the latest version and can see that we have “unique key prop” issue that we need to have addressed before merging, can you look into it?

2021-11-17 15:48:56.917 F  Raycast[781:ab35b] [com.raycast.extensions.1password7:list] Warning: Each child in a list should have a unique "key" prop.

Check the render method of `PasswordList`. See https://reactjs.org/link/warning-keys for more information.
    at null.PasswordListCategory (/Users/pernielsentikaer/Desktop/newnew/extensions/extensions/1password7/src/list.tsx:133:46)
    at null.PasswordList (/Users/pernielsentikaer/Desktop/newnew/extensions/extensions/1password7/src/list.tsx:84:25)
    at null.Command (/Users/pernielsentikaer/Desktop/newnew/extensions/extensions/1password7/src/list.tsx:71:59)
    at ray-navigation-stack
    at nm (/Applications/Raycast.app/Contents/Resources/RaycastCommands_RaycastCommands.bundle/Contents/Resources/api/node_modules/@raycast/api/index.js:24:10558)
    at al (/Applications/Raycast.app/Contents/Resources/RaycastCommands_RaycastCommands.bundle/Contents/Resources/api/node_modules/@raycast/api/index.js:24:10663)
    at Ts (/Applications/Raycast.app/Contents/Resources/RaycastCommands_RaycastCommands.bundle/Contents/Resources/api/node_modules/@raycast/api/index.js:24:9779)
    at QO (/Applications/Raycast.app/Contents/Resources/RaycastCommands_RaycastCommands.bundle/Contents/Resources/api/node_modules/@raycast/api/index.js:24:8740)
    at ray-root
    at Ef (/Applications/Raycast.app/Contents/Resources/RaycastCommands_RaycastCommands.bundle/Contents/Resources/api/node_modules/@raycast/api/index.js:24:10083)

Request a new review when you are ready, feel free to contact me here or at Slack if you have any questions regarding resolving this issue.

@selfish

selfish commented Nov 18, 2021

Copy link
Copy Markdown
Contributor Author

Will do ASAP

@pernielsentikaer

Copy link
Copy Markdown
Contributor

Awesome @selfish 💪 — Just a quick question, is the only for 1password 7, or will it work with 1password 8 too?

@selfish

selfish commented Nov 20, 2021 •

Copy link
Copy Markdown
Contributor Author

@pernielsentikaer error resolved.

As for your question, there's not much documentation for 1pass 8 for now, but I tend to expect full backward compatibility.
Are you hinting at updating the name to not be v7 specific? I don't mind including that. Should be real quick to do.

@selfish

selfish commented Nov 20, 2021

Copy link
Copy Markdown
Contributor Author

Okay, scratch that. I just updated and for now, 1pass 8 won't offer the 3rd party integrations option. So yeah, only 1p 7 for now.

@pernielsentikaer pernielsentikaer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Awesome @selfish 💪

All things I found has been resolved, I'm going to accept it 💯

@fe9lix
fe9lix merged commit 6259036 into raycast:main Nov 22, 2021
@raycastbot

Copy link
Copy Markdown
Collaborator

FezVrasta pushed a commit to FezVrasta/extensions that referenced this pull request Nov 24, 2021
* Implement Categories in 1password extension

* Resolve unique key error with 1password categories
@selfish
selfish deleted the feat/1password7-choose-primary-action branch November 28, 2021 10:27
colebemis added a commit to colebemis/raycast-extensions that referenced this pull request Nov 6, 2024