Closed jedrichards closed 4 years ago
@jedrichards it looks good to me.
One thing we could consider adding to the response from our "npm proxy", is some of the localized data, if that is possible. This would be useful when opening a document with a missing assistant to allow us to still display a friendly, title, description and perhaps even the icon, before the user chooses to hit the install button. But happy to not do this if you guys don't think its worth it.
Example:
@luisbosque would be good to get your thoughts on it 🙏
After talking with @christianklotz setting up this backend service seems like too much complexity for what we try to achieve here. The logic to redirect to a sketch:// url seems like something that could perfectly happen in the assistants' webpage in JS or another approach would be to pre-generate the sketch:// urls of the different assistants during the deployment.
This will make a much simpler architecture, easier to maintain and prevent us to have to maintain a new service.
Agreed that extra services/moving parts aren't all that desirable.
If we're ditching the one-click web service we need to be clear on the implications:
sketch://
links on sketch.com would mean they could quickly get stale, since they'll point to fully qualified tarballs urls on npm (e.g. https://registry.npmjs.org/@sketch-hq/sketch-tidy-assistant/-/sketch-tidy-assistant-5.0.0.tgz) so if new versions of the Assistant were released between builds of sketch.com they wouldn't get picked upsketch://
protocolNone of the above are deal breakers though, so if we're ok with them we should brief the web marketing team about the extra requirement asap.
Closing for now, as #118 is handled separately.
Assistants will benefit from web services that performs the following tasks:
Read on more for more details.
Glossary
One click installs
Using a web service here, instead of users crafting the
sketch://
protocol deep-links themselves gains us the following advantages:Already have a proof of concept that is being used in the wild at the moment, so should just be a case of reworking this.
Url Assistants behaviour
sketch://
deep link protocol, and asks the Sketch to add it as a Url AssistantNpm Assistant behaviour
sketch://
deep link protocol, and asks Sketch to add it as a Npm AssistantSketch Npm Proxy
This could begin life as a single endpoint, where Sketch could ask for metadata about Npm packages, and get back information.
Using a web service here will insulate Sketch from any changes or rough edges in the npm API.
latest
tag, for example)So if Sketch posted the following JSON to the endpoint (i.e. one or more Assistant names)
It would get back something like
Technology choices
Domain
Perhaps something like
assistants.sketch.com
?