extensions icon indicating copy to clipboard operation
extensions copied to clipboard

Add validatorjs-functions extension

Open djankies opened this issue 1 year ago • 1 comments

Description

Screencast

Checklist

djankies avatar Jan 13 '25 01:01 djankies

Congratulations on your new Raycast extension! :rocket:

You can expect an initial review within five business days.

Once the PR is approved and merged, the extension will be available on our Store.

raycastbot avatar Jan 13 '25 01:01 raycastbot

Hi @pernielsentikaer! That would be possible by cloning the functions and manually updating the extension as ValidatoJS is updated. The GitHub integration allowed the extension to pull validator functions directly from the repo to avoid that. Would the manual route be preferable to you?

djankies avatar Jan 22 '25 09:01 djankies

@xmok, have you worked with this in the past? Adding a GitHub key to the search functionality is, in my opinion, a poor user experience 😊

pernielsentikaer avatar Jan 23 '25 21:01 pernielsentikaer

Yup I agree this doesn't seem like the best approach! @djankies I've contributed to a number of docs extensions and there are a couple of ways you can do it:

A as you suggested: manually clone all the files and show to the user. Pro: also available offline Con: need to update manually

B do something similar to the Next.js Documentation extension: step 1: we use OctoKit to fetch pages from the repo step 2: when user opens a page, it is downloaded and saved locally to user's system Pro: also available offline (and no need for PAT) Con: need to first download a file/page

C (not recommended) do something similar to the Axios Docs extension: show all the links/pages, but open them directly in browser Pro: takes up less space Con: not really a good experience

D (not recommended) keep the current method of entering a GitHub PAT (this is also done by 1 LOC - JavaScript Utilities in Single Line of Code but not the best for user

E (probably not relevant) if docs are available in Algolia, fetch using Algolia e.g. as in Alpine.js if docs are available via a package, fetch using that e.g. as in NSIS Reference

You could go with option A, option B, or a combo e.g. you can choose to fetch docs on-the-fly but implement caching to ensure new data is only fetched when some time has passed which will make sure you don't hit rate limits.

Hope this helps!

xmok avatar Jan 24 '25 12:01 xmok

Thanks for taking your time to help here @xmok 🔥

pernielsentikaer avatar Jan 27 '25 08:01 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 Feb 10 '25 08:02 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 Feb 17 '25 09:02 raycastbot