React Spaces

View on GitHub NPM version

Release notes for version 0.2.0

This version represents a major refactor of the inner functionality of React Spaces.

The main changes are largely internal and detailed as follows:

  • A global state implementation holding state information for all spaces instead of holding it at each spaces parent space. This implementation avoids React side effect and state synchronisation issues in older version.
  • A shift from using React portals to a direct DOM manipulation implementation to apply styles to spaces for better performance.
  • Addition of JEST tests to test the core library functionality in an attempt to avoid broken functionality when adding features to the library in the future.

All attempts have been to maintain backwards compatibility to 0.1.x releases however there may be a few changes that may cause you issues depending on your usage of the library:

  • In an attempt to avoid reparenting of children within a space when using <Custom /> and changing it's properties, all spaces now consistently have an outer element (.spaces-space) and an inner element (.spaces-space-inner). In older versions, the inner element may not have been rendered depending on the type of space and whether it was scrollable or not. If you have any custom styling relying on the existence of an outer element only, this may cause issues. You should adjust any styling in this case.
  • To allow more placement options of the resize handles (i.e. centered over the boundary of neighbouring spaces), all resize handles for child spaces now sit directly within the elements for the parent space. In older versions, the resize handles for a space were placed directly inside the space element.
  • The property overlayHandle has now been superceded by the handlePlacement property which now takes multiple different types of handle placement. overlayHandle={false} can now be achieved with handlePlacement="inside" whereas overlayHandle={true} is handlePlacement="overlay-inside".