extensions icon indicating copy to clipboard operation
extensions copied to clipboard

[WIP] Update Liveblocks Extension

Open andreaselia opened this issue 1 year ago • 2 comments

Description

WIP - still testing, but almost ready.

Screencast

Checklist

andreaselia avatar Jul 09 '24 21:07 andreaselia

Thank you for your contribution! :tada:

🔔 @andreaselia you might want to have a look.

You can use this guide to learn how to check out the Pull Request locally in order to test it.

You can expect an initial review within five business days.

raycastbot avatar Jul 09 '24 21:07 raycastbot

Hey! I converted it to a draft as you marked as WIP. Just mark as ready for review when you are ready :)

mil3na avatar Jul 10 '24 14:07 mil3na

Is this ready for review now?

mil3na avatar Jul 25 '24 11:07 mil3na

Is this ready for review now?

@mil3na a preliminary review would be great, please.

andreaselia avatar Jul 26 '24 09:07 andreaselia

@mil3na I'll provide a video, but in terms of the error, the message itself is self explanatory, and a toast error isn't clear enough for this scenario, what would you recommend doing instead?

andreaselia avatar Jul 26 '24 19:07 andreaselia

No, you should never throw an error like this at the user. You should handle it and show a more intuitive message. Either on the bottom left or a separate panel.

mil3na avatar Jul 29 '24 11:07 mil3na

No, you should never throw an error like this at the user. You should handle it and show a more intuitive message. Either on the bottom left or a separate panel.

Yeah, I know a user shouldn't see stack trace error, that's why I asked for a suggestion, I'll look at adding an empty view for this, thanks!

I wonder if there'd be a feature request in here somewhere for adding your own validation to preference fields? 😄

andreaselia avatar Jul 29 '24 12:07 andreaselia

What kind of validation are you missing? As it is a form, you can use the form validation: https://developers.raycast.com/api-reference/user-interface/form

mil3na avatar Jul 31 '24 11:07 mil3na

What kind of validation are you missing? As it is a form, you can use the form validation: https://developers.raycast.com/api-reference/user-interface/form

That form is provided by Raycast automatically via the preferences in the package.json file, so we have no control over that or validating it at the moment as far as I'm aware?

"preferences": [
  {
    "name": "secret",
    "type": "password",
    "required": true,
    "title": "Secret Key",
    "description": "You can find your Secret Key in the Liveblocks Dashboard."
  }
],

It would be cool to be able to validate this with custom validation though, other than just what's allowed here such as required.

I'll work on catching this error and try to pass it through to its own detail view.

andreaselia avatar Aug 01 '24 09:08 andreaselia

This pull request has been automatically marked as stale because it did not have any recent activity.

It will be closed if no further activity occurs in the next 7 days to keep our backlog clean 😊

raycastbot avatar Aug 16 '24 09:08 raycastbot

This issue has been automatically closed due to inactivity.

Feel free to comment in the thread when you're ready to continue working on it 🙂

You can also catch us in Slack if you want to discuss this.

raycastbot avatar Aug 23 '24 09:08 raycastbot

Ah yes, I need to produce the video. I'll do this ASAP so you can see it working with data and approve @mil3na 👍

andreaselia avatar Aug 24 '24 21:08 andreaselia

@mil3na instead of a video, I thought I'd just provide screenshots of a few states and fixes.

The "active users" details:

CleanShot 2024-08-24 at 22 46 15@2x

Rooms list with the new room for the "active users" listed above:

CleanShot 2024-08-24 at 22 46 22@2x

Gracefully handled the wrong API secret being provided:

CleanShot 2024-08-24 at 22 46 36@2x

andreaselia avatar Aug 24 '24 21:08 andreaselia

Hi @andreaselia 👋

Awesome that you're working on an update on this extension 🔥

I would maybe use List.EmptyView to show the error instead of the markdown view. Then you can also add the Icon.Warning icon 🙂

Is the data dynamic on the user? Instead of just showing the json string, could we parse and show it as metadata?

pernielsentikaer avatar Aug 28 '24 09:08 pernielsentikaer

Hi @andreaselia 👋

Awesome that you're working on an update on this extension 🔥

I would maybe use List.EmptyView to show the error instead of the markdown view. Then you can also add the Icon.Warning icon 🙂

Is the data dynamic on the user? Instead of just showing the json string, could we parse and show it as metadata?

Updated it to use List.EmptyView, good suggestion!

I did originally have the data parsing (might be in the commit history), but it didn't make sense to me as the data can have many different types of values and lengths, so it wouldn't always be readable.

andreaselia avatar Aug 28 '24 20:08 andreaselia

Do you by any chance have a secret key I can test with? You can DM me on Slack 🙂

pernielsentikaer avatar Aug 29 '24 06:08 pernielsentikaer

This pull request has been automatically marked as stale because it did not have any recent activity.

It will be closed if no further activity occurs in the next 7 days to keep our backlog clean 😊

raycastbot avatar Sep 26 '24 08:09 raycastbot

@pernielsentikaer to have a look when he gets back 😁

andreaselia avatar Sep 26 '24 13:09 andreaselia

Published to the Raycast Store: https://raycast.com/andreaselia/liveblocks

github-actions[bot] avatar Oct 01 '24 06:10 github-actions[bot]

:tada: :tada: :tada:

We've rewarded your Raycast account with some credits. You will soon be able to exchange them for some swag.

raycastbot avatar Oct 01 '24 06:10 raycastbot