Remirror: v0.4.0 Release

Release date:
July 22, 2019
Previous version:
v0.3.0 (released July 6, 2019)
Magnitude:
14,790 Diff Delta
Contributors:
2 total committers
Data confidence:
Commits:

80 Commits in this Release

Ordered by the degree to which they evolved the repo in this version.

Authored July 19, 2019
Authored July 13, 2019
Authored July 21, 2019
Authored July 21, 2019
Authored July 13, 2019
Authored July 14, 2019
Authored July 9, 2019
Authored July 14, 2019
Authored July 10, 2019
Authored July 11, 2019
Authored July 11, 2019
Authored July 16, 2019
Authored July 20, 2019
Authored July 11, 2019
Authored July 17, 2019
Authored July 21, 2019
Authored July 20, 2019
Authored July 17, 2019
Authored July 21, 2019
Authored July 17, 2019
Authored June 23, 2019
Authored July 20, 2019

Top Contributors in v0.4.0

ifiokjr
hcharley

Directory Browser for v0.4.0

We haven't yet finished calculating and confirming the files and directories changed in this release. Please check back soon.

Release Notes Published

This is a large release with a number of breaking changes.

Added

  • πŸš€ @remirror/extension-collaboration: Collaboration library added based on the brilliant example available in tiptap.
  • πŸš€ @remirror/extension-mention: Mentions can now be picked up from pasting data.
  • πŸš€ @remirror/extension-code-block: Add commands toggleCodeBlock, createCodeBlock, updateCodeBlock and formatCodeBlock, add keymap support for formatting, add backspace support for better navigation and other features.
  • @remirror/core: Add CommandNodeTypeParams, CommandMarkTypeParams, CommandTypeParams which is now passed to the commands method for extensions.
  • @remirror/react-utils, @remirror/react: Add suppressHydrationWarning prop to Remirror component. Set to true to ignore the hydration warning for a mismatch between the server and client content.
  • @remirror/core: Add new extensionData method to the ExtensionManager which allows the extension to provide data on every transaction which will be available for consumption in the renderProp, React Context hooks and HOC's.
  • @remirror/core: Add getActions to the params of all extension manager methods. This will throw an error if called before initialization.
  • @remirror/core: Allow extensions to override baseExtension in the RemirrorManager component.
  • @remirror/core: Add ensureTrailingParagraph as a configuration option for the paragraph node. In some scenarios, it is difficult to place a cursor after the last element. This ensures there's always space to select the position afterwards and fixes a whole range of issues. It defaults to false otherwise it breaks a lot of tests.
  • jest-prosemirror: Enable editorViewOptions for the createEditor method. For example, now it is possible to intercept transactions with the dispatchTransaction hook.
  • @remirror/renderer-react: Pass extension options through to SSR components as a prop.

  • Add internal modifier key functions for puppeteer testing.

  • Add integration editor tests for the Wysiwyg editor.

Changes

  • πŸ’₯ BREAKING @remirror/core: Change the way commands are configured. The command function on extensions now only accepts an object with the command names being globally unique. For example, the heading extension used to return a function now it returns an object with the following signature.
{
  toggleHeading(attrs?: Attrs<{level: number}>): CommandFunction;
}

This command can now be accessed via actions.toggleHeading({ level: 2 })

This is a large breaking change and may cause a lot of your existing code to stop working 😒. However, it paves the way for a better development experience, a simpler to manage library and some exciting features using type inference. Please do bear with me as I make these changes. I truly believe they'll be worthwhile.

  • πŸ’₯ BREAKING @remirror/core: Change usage isEnabled and isActive which are now methods on the command. e.g. actions.toggleHeading.isEnabled() would check whether the toggle heading button can be used at this moment.
  • πŸ’₯ BREAKING @remirror/core: Change Extension function signature actions of active and enabled.
  • πŸ’₯ BREAKING @remirror/core: Rename getEditorState to getState.
  • πŸ’₯ BREAKING @remirror/core: Change method getPortalContainer to property portalContainer on the extension manager.
  • πŸ’₯ BREAKING @remirror/extension-mention: Complete rewrite of internals and public API with better tests and more robust editing.
  • πŸ’₯ BREAKING @remirror/extension-mention: Change MentionExtension from NodeType to MarkType. Text is now editable after a mention is created.
  • πŸ’₯ BREAKING @remirror/react: Rename setChildAsRoot to childAsRoot on RemirrorContextProviderProps and all it consumers. This affects the RemirrorContextProvider, RemirrorProvider and ManagedRemirrorProvider exports. The prop now can take a boolean or the object with props to inject into the root.
  • πŸ’₯ BREAKING @remirror/react: All RemirrorProviders now require a children prop. This prevents a bug when rendering in non-dom environments.
  • πŸ’₯ BREAKING @remirror/react: dispatchTransaction has been renamed to onDispatchTransaction. It now must return a transaction and can be used to edit the transaction that will be used to create a new state.

  • πŸ› @remirror/core: Fix bug with extension manager failing to provide attributes from the extensions.

  • πŸ› @remirror/core: Fix TypeScript type of SSRComponent. Change from Component to ComponentType.

  • πŸ› @remirror/editor-twitter: Fix bug where text area didn't expand to the full height of editor container.