Skip to content

Releases: xh/hoist-react

v55.2.1

24 Feb 16:55
Compare
Choose a tag to compare

What's Changed

  • Fix bug where the splitter in a draggable Panel could be rendered i… by @ghsolomon in #3294

Full Changelog: v55.2.0...v55.2.1

v55.2.0

10 Feb 20:58
Compare
Choose a tag to compare

What's Changed

Full Changelog: v55.1.0...v55.2.0

v55.1.0

09 Feb 21:50
Compare
Choose a tag to compare

Version 55 is the first major update of the toolkit after our transition to typescript. In addition
to a host of runtime fixes and features, it also contains a good number of important typescript
typing adjustments, which are listed below. In also includes a helpful
Typescript upgrade guide.

🎁 New Features

  • Grid exports can now be tracked in the admin activity tab by setting exportOptions.track to
    true (defaults to false).
  • Miscellaneous performance improvements to the cube package
  • The implementation of the Cube.omitFn feature has been enhanced. This function will now be
    called on all non-leaf nodes, not just single child nodes. This allows for more flexible
    editing of the shape of the resulting hierarchical data emitted by cube views.

🐞 Bug Fixes

  • Fixed: grid cell editors would drop a single character edit.
  • Fixed: grid date input editor's popup did not position correctly in a grid with pinned columns.
  • Fixed issue with DashContainer flashing its "empty" text briefly before loading.
  • Several Hoist TypeScript types, interfaces, and signatures have been improved or corrected (typing
    changes only).
  • Fix bug where a className provided to a Panel with modalSupport would be dropped when in a
    modal state. Note this necessitated an additional layer in the Panel DOM hierarchy. Highly
    specific CSS selectors may be affected.
  • Fix bug where TileFrame would not pass through the keys of its children.

💥 Breaking Changes

  • The semantics of Cube.omitFn have changed such that it will now be called on all aggregate nodes,
    not just nodes with a single child. Applications may need to adjust any implementation of this
    function accordingly.
  • hoistCmp.containerFactory and hoistCmp.withContainerFactory are removed in favor of
    the basic hoistCmp.factory and hoistCmp.withFactory respectively. See typescript
    API adjustments below.

⚙️ Typescript API Adjustments

The following Typescript API were adjusted in v55.

  • Removed the distinction between StandardElementFactory and ContainerElementFactory. This
    distinction was deemed to be unnecessary, and overcomplicated the understanding of Hoist.
    Applications should simply continue to use ElementFactory instead. hoistCmp.containerFactory and
    hoistCmp.withContainerFactory are also removed in favor of the basic hoistCmp.factory and
    hoistCmp.withFactory respectively.

  • HoistProps.modelConfig now references the type declaration of HoistModel.config. See
    PanelModel and TabContainerModel for examples.

  • The new SelectOption type has been made multi-platform and moved to @xh/hoist/core.

Note that we do not intend to make such extensive Typescript changes going forward post-v55.0.
These changes were deemed critical and worth adjusting in our first typescript update, and before
typescript has been widely adopted in production Hoist apps.

⚙️ Technical

  • Hoist's Icon enumeration has been re-organized slightly to better separate icons that describe
    "what they look like" - e.g. Icon.magnifyingGlass() - from an expanded set of aliases that
    describe "how they are used" - e.g. Icon.search().
    • This allows apps to override icon choices made within Hoist components in a more targeted way,
      e.g. by setting Icon.columnMenu = Icon.ellipsisVertical.
  • All Hoist configurations that support omit: boolean now additionally support a "thunkable"
    callback of type () => boolean.
  • Grid will only persist minimal user column state for hidden columns, to reduce user pref sizes.

📚 Libraries

  • @blueprintjs/core ^4.12 -> ^4.14
  • corejs ^3.26 -> ^3.27
  • mobx 6.6 -> 6.7
  • onsenui 2.11 -> 2.12 (*see testing note below)
  • react-onsenui 1.11 > 1.13

Full Changelog: v55.0.8...v55.1.0

v53.2.1

19 Jan 17:04
Compare
Choose a tag to compare

v53.2.1 - 2023-01-19

  • Fixed a bug in which grid cell editors would drop a single character edit.

v54.0.0

31 Dec 15:17
Compare
Choose a tag to compare

v54.0.0 - 2022-12-31

We are pleased to announce that Hoist React has been fully rewritten in TypeScript! ✨🚀

All core Hoist Components, Models, and other utilities now have TypeScript interfaces for their
public APIs, improving the developer ergonomics of the toolkit with much more accurate dev-time type
checking and intellisense. Developers now also have the option (but are not required) to write
application code using TypeScript.

Runtime support for TypeScript is provided by @xh/hoist-dev-utils v6.1+, which recognizes and
transpiles TypeScript files (.ts|.tsx) via the @babel/plugin-transform-typescript plugin.
Development-time support can be provided by the user's IDE (e.g. IntelliJ or VSCode, which both
provide strong TypeScript-based error checking and auto-completion).

The goal of this release is to be backward compatible with v53 to the greatest degree possible, and
most applications will run with minimal or no changes. However, some breaking changes were required
and can require application adjustments, as detailed below.

As always, please review our Toolbox project, which we've updated
to use TypeScript for its own app-level code.

🎁 New Features

  • New TypeScript interface HoistProps and per-component extensions to specify props for all
    components. This replaces the use of the PropTypes library, which is no longer included.
  • Enhanced TypeScript-aware implementations of ElementFactory, including separate factories for
    standard components (elementFactory) and components that often take children only
    (containerElementFactory).
  • The @bindable annotation has been enhanced to produce a native javascript setter for its
    property as well as the setXXX() method it currently produces. This provides a more typescript
    friendly way to set properties in a mobx action, and should be the favored method going forward.
    The use of the setXXX() method will continue to be supported for backward compatibility.
  • References to singleton instances of services and the app model can now also be gained via the
    static instance property on the class name of the singleton - e.g. MyAppModel.instance.
    Referencing app-level services and the AppModel via XH is still fully supported and recommended.
  • New utility function waitFor returns a promise that will resolve after a specified condition
    has been met, polling at a specified interval.
  • Hoist Components will now automatically remount if the model passed to them (via context or props)
    is changed during the lifetime of the component. This allows applications to swap out models
    without needing to manually force the remounting of related components with an explicit
    key setting, i.e. key: model.xhId.
  • fmtQuantity function now takes two new flags useMillions and useBillions.

💥 Breaking Changes

  • The constructors for GridModel and Column no long accept arbitrary rest (e.g ...rest)
    arguments for applying app-specific data to the object. Instead, use the new appData property
    on these objects.
  • The elemFactory function has been removed. Applications calling this function should specify
    elementFactory (typically) or containerElementFactory instead.
    • Most application components are defined using helper aliases hoistCmp.factory
      and hoistCmp.withFactory - these calls do not need to change, unless your component
      needs to take a list of children directly (i.e. someComponent(child1, child2)).
    • Update the definition of any such components to use hoistCmp.containerFactory instead.
    • Where possible, favor the simpler, default factory for more streamlined type suggestions /
      error messages regarding your component's valid props.
  • The use of the model prop to provide a config object for a model to be created on-the-fly
    is deprecated.
    • Use the new modelConfig prop when passing a plain object config -
      e.g. someComp({modelConfig: {modelOpt: true}})
    • Continue to use the model prop when passing an existing model instance -
      e.g. someComp({model: someCompModel}).
  • PropTypes support has been removed in favor of the type script interfaces discussed above. Apps
    importing Hoist Proptypes instances should simply remove these compile-time references.

🐞 Bug Fixes

  • Fix bug where dragging on any panel header which is a descendant of a DashCanvasView would move
    the DashCanvasView.
  • Fix bug where GridModel.ensureRecordsVisibleAsync could fail to make collapsed nodes visible.
  • Fix bug where GridPersistenceModel would not clean outdated column state.
  • Fix animation bug when popping pages in the mobile navigator.

✅ Testing Scope

  • Full regression testing recommended - this is a major Hoist release and involved a significant
    amount of refactoring to the toolkit code. As such, we recommend a thorough regression test of any
    applications updating to this release from prior versions.

⚙️ Technical

  • Update preflight.js to catch errors that occur on startup, before our in-app exception handling
    is initialized.

📚 Libraries

  • @blueprintjs/core 4.11 -> 4.12
  • @xh/hoist-dev-utils 6.0 -> 6.1
  • typescript added @ 4.9
  • highcharts `9.3 -> 10.3

Full Changelog: v53.2.0...v54.0.0

v53.2.0

16 Nov 00:50
Compare
Choose a tag to compare

What's Changed

Full Changelog: v53.1.0...v53.2.0

v53.1.0

03 Nov 20:59
Compare
Choose a tag to compare

What's Changed

Full Changelog: v53.0.0...v53.1.0

v53.0.0

19 Oct 19:18
Compare
Choose a tag to compare

What's Changed

Full Changelog: v52.0.2...v53.0.0

v52.0.2

13 Oct 20:46
Compare
Choose a tag to compare

What's Changed

  • Form field dirty checking now uses lodash isEqual by @amcclain in #3161

Full Changelog: v52.0.1...v52.0.2

v52.0.1

10 Oct 21:52
Compare
Choose a tag to compare

What's Changed

Full Changelog: v51.0.0...v52.0.1