-
Notifications
You must be signed in to change notification settings - Fork 173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: GitHub download by URL #680
Conversation
graphs/Save.fbp
Outdated
@@ -42,8 +42,9 @@ SplitSpec OUT -> IN EnsureId | |||
StoreName OUT -> NAME Store(indexeddb/GetStore) | |||
WriteTransaction TRANSACTION -> TRANSACTION Store STORE -> STORE Put(indexeddb/Put) | |||
EnsureId OUT -> VALUE Put | |||
'state=ok' -> PROPERTY SetOk(objects/SetProperty) | |||
Put KEY -> START CreateOk(objects/CreateObject) OUT -> IN SetOk OUT -> IN MergeContext | |||
StoreName OUT -> TYPE CreateOk(ui/PersistedToContext) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is a Persisted?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Persisted" is whatever we just saved ... graph, runtime, component, project, spec.
async: true | ||
, (data, groups, out, callback) -> | ||
api = octo.api() | ||
api.token data.state.user['github-token'] if data.state.user?['github-token'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't like that a generic and should-have-small-scope component like this gets the entire state. It makes data dependencies invisible in the graph, and lets the component do whatever it wants.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair point, we can plug a GetActionValues
in front of this so we only pick the pieces we need.
components/CheckGistExists.coffee
Outdated
out: ['existing', 'new'] | ||
async: true | ||
, (data, groups, out, callback) -> | ||
unless data.state?.projects?.length |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same, I think this component should just get projects
2b929bd
to
aaaa238
Compare
Will example a "Open in Flowhub" mechanism where users can provide a URL to open a given GitHub repo directly in Flowhub with:
(these are essentially GitHub URLs with
https://github.com/
replaced withhttps://app.flowhub.io/#github/
)If user already has that repo downloaded, we redirect to normal project view. If not, we download and then redirect.
We will be able to use this mechanism also for the example projects, meaning that they'll get downloaded to user's IndexedDB and user can then edit them locally with persistence.
The same behavior is applied also to gist examples, which solves #229 and #475.
Fixes #638