Previously, long lines of preformatted text would cause the lines to
run off the side of the ProseMirror edit box and give the entire entry
editor a scrollbar. This commit makes the edit box itself scroll,
which looks and feels much less broken.
The "< >" button on the toolbar should format selected
text as code, but its serving as a visual mode toggle.
This commit switches out the code icon for a text label,
and moves it to the right side of the rich text toolbar.
Switches back to custom frontmatter stringification
until support lands in preliminaries. This is necessary
because we use custom schemas for certain data types,
such as dates and times.
There were a couple issues with the original version of
`resolvePromiseProperties`:
- The wrapper promise was unnecessary, since we can just return the
`Promise.all`. Fixing this allows us to remove a wrapping function,
reduce indentation, remove the `resolve` and `reject` calls, and
remove the now unnecessary `.catch` line.
- There was inadvertent mutation in the `Object.assign` call - the
first parameter to `Object.assign` is mutated, so to call it without
mutating existing objects the first parameter should be a literal
`{}`. This is now fixed.
The log out menu was nested within a button, which caused
bubbling issues for the log out button event handler. This
was due to a misuse of the React Toolbox AppBar component.
Added a proper IconMenu to trigger the logout dropdown.
`resolvePromiseProperties` takes on object and returns a promise which
resolves to a copy of the object. This copy has all its immediate
properties which were Promises replaced with the resolved value of
those promises. Promises are run with `Promise.all`. Errors are passed
up to the outer promise chain.
Example usage:
```js
resolvePromiseProperties({
promise: Promise.resolve("this property will resolve to this string"),
nonPromise: "this will remain the same",
// you can nest the function
nestedPromiseInside: resolvePromiseProperties({
nestedPromise: Promise.resolve("this will resolve"),
nestedNonPromise: "this stays the same",
}),
})
.then(obj => console.log(obj))
```
That will produce the following output:
```js
{
promise: "this property will resolve to this string",
nonPromise: "this will remain the same",
nestedPromiseInside: {
nestedPromise: "this will resolve",
nestedNonPromise: "this stays the same",
},
}
```
- New state field: `state.entryDraft.hasChanged`, initialized to
`false`.
- `state.entryDraft.hasChanged` set to `true` in `entryDraft` reducer
for `DRAFT_CHANGE_FIELD`.
- `EntryPage` adds a `listenBefore` listener to `history` on
`componentDidMount` that checks `this.props.entryDraft.hasChanged`
and, if that is true, asks the user to confirm the navigation.
- `EntryPage` removes its listener on `componentWillUnmount`.
Full stops in slugs were preventing branch creation for unpublished
entries when using the editorial workflow, as `.` is not an allowed
character in branch names. This commit changes slug generation so
periods are replaced with `-` the same way other "non-sluggable"
characters are.
* Version Bump
* local search skeleton
* Added WaitService middleware
* Return matching queries
* wait action middleware rename/refactor
* bigger debounce time
* Fix: Initialize state using Immutable
* Local Search without integrations
* Local Search refactor: Keep state in closure, recurse
* “string” should be treated as the default widget by the inference. Closes#199
* Field config options: 'required' and 'pattern'
* Widget controls can implement it's own isValid
* Validation errors store in redux & displayed
* Support for returned Promises in isValid
* Allow widget controls to return either a boolean, an error object or a promise from isValid