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

Create Core State #2511

Merged
merged 1 commit into from Feb 9, 2018
Merged

Create Core State #2511

merged 1 commit into from Feb 9, 2018

Conversation

theengineear
Copy link
Contributor

@theengineear theengineear commented Feb 9, 2018

[WIP: just wanted to push changes to plan.md up here]

Here's the types I ultimately want to end up with:

type CommunicationRecordProps = {
  contents: RecordOf<ContentsCommunicationRecordProps>,
  hosts: RecordOf<HostsCommunicationRecordProps>,
  kernels: RecordOf<KernelsCommunicationRecordProps>,
  kernelspecs: RecordOf<KernelspecsCommunicationRecordProps>,
  preferences: RecordOf<PreferencesCommunicationRecordProps>
};

type EntitiesRecordProps = {
  contents: RecordOf<ContentsEntitiesRecordProps>,
  hosts: RecordOf<HostsEntitiesRecordProps>,
  kernels: RecordOf<KernelsEntitiesRecordProps>,,
  kernelspecs: RecordOf<KernelspecsEntitiesRecordProps>,
  preferences: RecordOf<PreferencesRecordProps>
};

type CoreRecordProps = {
  selectedHostRef: ?HostRef,
  selectedContentRef: ?ContentRef,
  communication: RecordOf<CommunicationRecordProps>,
  entities: RecordOf<EntitiesRecordProps>
};

Then, I want to create a new reducer in /core that we export as core and that must be mounted at the top level of the state tree at core (maybe nteract as a namespace?) to work.

I want to get this state.core hunk mirroring the information that's currently in state.app, state.document, etc, etc and then start switching selectors over to the new sub-tree one-by-one.

This is mostly just documenting my own thoughts, but feel free to comment.

@theengineear
Copy link
Contributor Author

@rgbkrk any objections?

@@ -174,6 +166,7 @@ type state = {
[ref: Ref]: {
name: string,
resources: Object,
hostRef: Ref,
Copy link
Member

Choose a reason for hiding this comment

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

I assume you meant to stick the hostRef in the kernels byRef as well.

@@ -189,8 +182,7 @@ type state = {
[ref: Ref]: {
id: string,
type: ("local" | "jupyter"),
selectedKernelRef: Ref,
kernelRefs: Array<Ref>,
kernelIds: Array<Id>,
Copy link
Member

Choose a reason for hiding this comment

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

👍

@rgbkrk rgbkrk merged commit 1a3930d into nteract:master Feb 9, 2018
@rgbkrk rgbkrk added this to the Jupyter Extension M1 milestone Feb 10, 2018
@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