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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

That's so fetch! #2541

Merged
merged 4 commits into from Feb 16, 2018
Merged

That's so fetch! #2541

merged 4 commits into from Feb 16, 2018

Conversation

rgbkrk
Copy link
Member

@rgbkrk rgbkrk commented Feb 15, 2018

Desktop is now just like the webapp, in that it creates Contents API responses! No more load action or LOAD actionType. 馃槃

This also fixes up fetchContentFailed returning the right payload now.

All of this is in support of making #2516 easier to digest.

@rgbkrk rgbkrk changed the title fetchContents for ze desktop app [WIP] That's so fetch! Feb 15, 2018
@rgbkrk rgbkrk changed the title [WIP] That's so fetch! That's so fetch! Feb 15, 2018
@rgbkrk rgbkrk added this to the Jupyter Extension M1 milestone Feb 15, 2018
) =>
action$.pipe(
ofType(actionTypes.SET_NOTEBOOK),
map((action: SetNotebookAction) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

I gotta remember to set the type here! Nice.

Copy link
Member Author

Choose a reason for hiding this comment

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

Pretty handy since we don't have the rxjs operator types via flow. 馃槃

@@ -114,6 +114,7 @@ export function saveContentEpic(
}

// When content gets loaded, if it's a notebook, set it up as the notebook
// TODO: should this be renamed as "fetchContentFulfilledEpic"
Copy link
Contributor

Choose a reason for hiding this comment

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

Potentially. Is there a case when we have multiple epics listening for the same actions? If not, it's sorta nice when the naming lines up.

Copy link
Member Author

Choose a reason for hiding this comment

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

There won't be more than one epic listening for this (I think).

Copy link
Contributor

Choose a reason for hiding this comment

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

Then, "yes". 馃槃 but you don't need todo that in this pr.

Copy link
Member Author

Choose a reason for hiding this comment

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

馃槃 I'll take it out now.

@@ -117,41 +110,53 @@ function createContentsResponse(
*/
export const loadEpic = (action$: ActionsObservable<*>) =>
action$.pipe(
ofType(actionTypes.LOAD),
ofType(actionTypes.FETCH_CONTENT),
Copy link
Contributor

Choose a reason for hiding this comment

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

Cool, so the load action is gone now, and we just hook up this epic in place of the core fetchContent epic. I wonder if we should actually call this the fetchContentEpic now so that it's clear that we're using the desktop-specific fetchContentEpic, not the core fetchContentEpic?

Copy link
Member Author

Choose a reason for hiding this comment

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

I like that, I'll switch the name up here.

@rgbkrk
Copy link
Member Author

rgbkrk commented Feb 16, 2018

Woo, I fixed the tests! On to addressing feedback.

type: actionTypes.FETCH_CONTENT_FULFILLED,
error: Error
}): FetchContentFailed => ({
type: actionTypes.FETCH_CONTENT_FAILED,
Copy link
Contributor

Choose a reason for hiding this comment

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

馃憣 ha, i totally had this in a stashed change locally. you beat me :)

actions.launchKernel(action.kernelSpec, action.cwd)
)
)
switchMap(action => {
Copy link
Contributor

Choose a reason for hiding this comment

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

This is just synchronously returning an action, right? Couldn't we just map here?

Copy link
Contributor

@theengineear theengineear left a comment

Choose a reason for hiding this comment

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

馃帀

@theengineear theengineear merged commit e4164a2 into nteract:master Feb 16, 2018
@rgbkrk rgbkrk deleted the gretchen branch February 16, 2018 01:03
@rgbkrk rgbkrk mentioned this pull request Mar 7, 2018
7 tasks
@lock
Copy link

lock bot commented May 1, 2018

Howdy! I'm 馃敁馃!

In order to keep information timely (based on the most recent release), we want all activity to be added to either new issues or open issues and PRs. In service to that goal, I, the lock bot close inactive closed issues when they haven't had activity in 120 days.

Feel free to open a new issue for related bugs and link to relevant comments from this thread.

@lock lock bot locked and limited conversation to collaborators May 1, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants