FarmBot / Farmbot-Web-App

Setup, customize, and control FarmBot from any device
https://my.farm.bot
MIT License
893 stars 331 forks source link

Shareable resources #1490

Open roryaronson opened 4 years ago

roryaronson commented 4 years ago

An ability for users to publicly share their:

How it could work

In a sequence header or on a garden details panel, add a SHARE button. Clicking the button could open a popup with a toggle switch to turn on sharing. Once sharing is turned on, the popup shows two sharing options:

1) Share via link - this provides a unique link to send to others (in a support email) or post somewhere, such as the forum. Maybe something in the format: my.farm.bot/app/sequences/shared/83jv7d3kiy0

If another (logged in) user clicks this link, the app would open to the sequences page, with the shared sequence loaded in the editor. There could be some banner up in the sequence header indicating that the sequence is a shared sequence, and all editing would be disabled. There could be a button to SAVE A COPY which would save a copy of the shared sequence to the account for modification/use.

If a logged out user clicked the link, a lightweight version of the app could be loaded to display the sequence with no editing allowed, and no other controls/page elements/nav. Maybe just a button to LOGIN TO SAVE A COPY

2) Embed - this would provide an iframe (or oEmbed?) embed code that could be pasted into documentation, blog posts, the forum, etc. The embed content would be a lightweight version of the app to display the shared resource, without editing/nav capabilities. Maybe add a button to OPEN IN APP.

Dependencies

An obvious problem with saving a copy of someone else's sequence is that the sequence will likely have dependencies (tools, plants, groups, subsequences) that the new account doesn't have. While a saved sequence without dependencies might not be that useful, I think the amount of work and potential consequences of saving with dependencies is too much.

A middle-ground idea is to make a copy of the sequence without dependencies, but display the original author's dependency names to be used as a blueprint for the new user to "re-wire" the sequence with their own dependencies in order to fully save it. Something like:

Screen Shot 2019-10-04 at 12 52 48 PM

What are other thoughts, concerns, potential gotchyas?

RickCarlino commented 4 years ago

(Opps- accidentally pressed close button)

@roryaronson I think you've addressed the big concerns. The sub-resources will be tricky to manage in a way that is intuitive to end users and some resources will be easier to share than others.