Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5185 from nteract/release/20200629
nteract June 2020 Release
- Loading branch information
Showing
31 changed files
with
236 additions
and
112 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,128 @@ | ||
# June 2020 nteract Release | ||
|
||
## nteract Desktop App | ||
|
||
This month's release of the nteract desktop app contains a brand-new UI featuring: | ||
* an app-level toolbar | ||
* a file sidebar | ||
* a new cell UX | ||
* a new command prompt (activated by pressing <kbd>Cmd+Shift+P</kbd> on macOS or <kbd>Ctrl+Shift+P</p>) | ||
|
||
Over the comings months, we will be building on top of this new UX with: | ||
- support for opening multiple notebooks in the same menu | ||
- support for configuring keyboard shortcuts | ||
- and more! | ||
|
||
In addition to the new UI, the following changes have been shipped: | ||
- Support for automatically loading syntax highlighting for programming languages | ||
- Bug fix for issue where config changes were not persisted beyond a single sessions | ||
|
||
## nteract Core SDK | ||
|
||
The following changes have been shipped to the Core SDK. If you are using one of the packages listed below as a transitive | ||
dependency, you will need to update its parent package. | ||
|
||
### @nteract/commutable (v7.3.0) | ||
- Skip reformatting output bundle when serializing notebook document (https://github.com/nteract/nteract/pull/5146) | ||
|
||
### @nteract/core (v15.0.0) | ||
- **(Breaking Change)** Move `comms` entities list into `core.entities` | ||
- If you are referring to the `comms` state using nteract's selectors and epics, you will not need to migrate any code. | ||
- if you have hard-coded references to `state.comms`, these will need to be updated to `state.core.entities.comms`. | ||
- **(Breaking Change)** Deprecate `config` state in favor of `mythic-configurations` package | ||
- To use the package, either: | ||
* use the `makeConfigureStore` function from `@nteract/myths`: | ||
```typescript | ||
import {configuration} from "@nteract/mythic-configuration"; | ||
import {makeConfigureStore} from "@nteract/myths"; | ||
|
||
type NonPrivateState = { foo: string }; | ||
const configureStore = makeConfigureStore<NonPrivateState>()({ | ||
packages: [ | ||
configuration, | ||
], | ||
// reducers, epics, etc. | ||
}); | ||
export const store = configureStore({ foo: "bar" }); | ||
``` | ||
* or call `configuration.rootReducer(state, action)` in your reducer and add the return value of `configuration.makeRootEpic()` to your epics. | ||
- Dispatch the return value of `setConfigFile(<path>)` to make it load/write/watch a config file instead. | ||
- To define configuration options, use `defineConfigOption(...)`: | ||
```typescript | ||
import {defineConfigOption} from "@nteract/mythic-configuration"; | ||
|
||
export const { | ||
selector: tabSize, | ||
action: setTabSize, | ||
} = defineConfigOption({ | ||
label: "Tab Size", | ||
key: "codeMirror.tabSize", | ||
values: [ | ||
{label: "2 Spaces", value: 2}, | ||
{label: "3 Spaces", value: 3}, | ||
{label: "4 Spaces", value: 4}, | ||
], | ||
defaultValue: 4, | ||
}); | ||
``` | ||
- You can then use the selector (e.g. `tabSize` above) to get the value from a store (e.g. `tabSize(store.getState())`). | ||
- You can then alter the state by dispatching the result of the action function (e.g. `setTabSize` above, `store.dispatch(setTabSize(4))`). | ||
- If you have a group of config options with a common prefix (e.g. `codemirror.<...>`), you can get a selector for the whole group with `createConfigCollection(...)`: | ||
```typescript | ||
import {createConfigCollection} from "@nteract/mythic-configuration"; | ||
|
||
const codeMirrorConfig = createConfigCollection({ | ||
key: "codeMirror", | ||
}); | ||
``` | ||
You can then do something like `codeMirrorConfig(store.getState())` to get something like | ||
```javascript | ||
{ | ||
tabSize: 4, | ||
// ... other options starting with `codemirror.`, potentially nested if more than one dot | ||
} | ||
``` | ||
- The state is stored under `__private__.configuration` in the store, but it shouldn't be neccessary to directly access it. | ||
- To type the state/store you can use `HasPrivateConfigurationState`. | ||
- If you need a different way of persisting the config, you can set your own backend, e.g.: | ||
```typescript | ||
// Since the cats are typically lazing about the computer, let's utilize them to store our | ||
// config... | ||
const catConfigurationBackend = (whichCats: Cat[]) => ({ | ||
setup: () => | ||
// Is called when the config system initialises, should return an Observable<Action>, | ||
// generally using the loadConfig myth to specify when the config should be loaded. | ||
concat( | ||
of("immediately"), | ||
interval(10 * 60 * 1000), | ||
).pipe( | ||
tap(_ => wakeUpCats(whichCats)), | ||
mapTo(loadConfig.create()), | ||
), | ||
|
||
load: () => | ||
// Is called to load config, should return an Observable<Action>, generally using | ||
// the setConfig and/or setConfigAtKey myths to determine the config. | ||
askTheCatsAboutTheirConfigOptions(whichCats).pipe( | ||
mapErrorTo(undefined, error => error?.complaint === "HUNGRY"), | ||
skipWhile(data => data === undefined), | ||
map(setConfig.create), | ||
), | ||
|
||
save: (current: Map<string, any>) => | ||
// Is called with the current config object to save it after it changed, should return an | ||
// Observable<Action>, which should be empty unless you need to dispatch actions on save. | ||
tellTheCatsToRememberConfigOptions(current.toJSON(), whichCats).pipe( | ||
ignoreElements(), | ||
), | ||
} as ConfigurationBackend); | ||
|
||
export const setConfigCats = (whichCats: Cat[]) => | ||
setConfigBackend.create(catConfigurationBackend(whichCats)); | ||
|
||
// Now just do store.dispatch(setConfigCats(...)) to start using it and hope the cats have good | ||
// memory and feel like cooperating... | ||
``` | ||
|
||
### @nteract/editor (v10.1.0) | ||
- Add support for automatically loadign CodeMirror modes for languages (https://github.com/nteract/nteract/pull/5123) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.