Skip to content
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

Closed
wants to merge 97 commits into from
Closed

WIP: GitHub download by URL #680

wants to merge 97 commits into from

Conversation

bergie
Copy link
Member

@bergie bergie commented Feb 20, 2017

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 with https://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

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)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is a Persisted?

Copy link
Member Author

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']
Copy link
Member

@jonnor jonnor Feb 23, 2017

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.

Copy link
Member Author

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.

out: ['existing', 'new']
async: true
, (data, groups, out, callback) ->
unless data.state?.projects?.length
Copy link
Member

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

@bergie
Copy link
Member Author

bergie commented Feb 23, 2017

Here is how the high-level architecture should look like. With a bit of subgraphing we can make ui/main look like this:

screenshot 2017-02-23 at 17 06 39

This was referenced May 9, 2017
This was referenced Jun 15, 2017
@bergie bergie mentioned this pull request Nov 15, 2017
10 tasks
@bergie bergie closed this in #820 Nov 17, 2017
@bergie bergie deleted the github_download_url branch February 15, 2019 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants