Releases: xh/hoist-react
v55.2.1
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
What's Changed
- Add TS override everywhere by @lbwexler in #3284
- Clean-up Date Range handling in tracking by @lbwexler in #3287
- Improved signatures of
RestStore
APIs by @amcclain in #3288 - Dash canvas enhancements by @ghsolomon in #3290
- Preserve dim values by @lbwexler in #3289
Full Changelog: v55.1.0...v55.2.0
v55.1.0
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 aPanel
withmodalSupport
would be dropped when in a
modal state. Note this necessitated an additional layer in thePanel
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
andhoistCmp.withContainerFactory
are removed in favor of
the basichoistCmp.factory
andhoistCmp.withFactory
respectively. See typescript
API adjustments below.
⚙️ Typescript API Adjustments
The following Typescript API were adjusted in v55.
-
Removed the distinction between
StandardElementFactory
andContainerElementFactory
. This
distinction was deemed to be unnecessary, and overcomplicated the understanding of Hoist.
Applications should simply continue to useElementFactory
instead.hoistCmp.containerFactory
and
hoistCmp.withContainerFactory
are also removed in favor of the basichoistCmp.factory
and
hoistCmp.withFactory
respectively. -
HoistProps.modelConfig
now references the type declaration ofHoistModel.config
. See
PanelModel
andTabContainerModel
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 settingIcon.columnMenu = Icon.ellipsisVertical
.
- This allows apps to override icon choices made within Hoist components in a more targeted way,
- 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
v54.0.0
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 thePropTypes
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 thesetXXX()
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 thesetXXX()
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
staticinstance
property on the class name of the singleton - e.g.MyAppModel.instance
.
Referencing app-level services and the AppModel viaXH
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 flagsuseMillions
anduseBillions
.
💥 Breaking Changes
- The constructors for
GridModel
andColumn
no long accept arbitrary rest (e.g...rest
)
arguments for applying app-specific data to the object. Instead, use the newappData
property
on these objects. - The
elemFactory
function has been removed. Applications calling this function should specify
elementFactory
(typically) orcontainerElementFactory
instead.- Most application components are defined using helper aliases
hoistCmp.factory
andhoistCmp.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.
- Most application components are defined using helper aliases
- 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})
.
- Use the new
- 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
theDashCanvasView
. - 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
v53.1.0
What's Changed
- Fix ModalSupport lifecycle bug by @ghsolomon in #3183
- Fix to gaps between select inputs and their dropdown menus by @amcclain in #3187
- Fix toast styling bug by @ghsolomon in #3189
- Fix
GridModel
bug whereStore
would fail to recognize dot-separat… by @ghsolomon in #3190 - Dock Container fixes by @TomTirapani in #3196
Full Changelog: v53.0.0...v53.1.0
v53.0.0
v52.0.2
v52.0.1
What's Changed
- Clone props by @lbwexler in #3128
- Show lastUpdated / lastUpdatedBy in admin config/pref differ by @PeteDarinzo in #3129
- Upgrade React to v18 by @TomTirapani in #2934
- Dash canvas autoheight by @ghsolomon in #3060
- XH.getActiveModels() by @lbwexler in #3133
- Make DashContainerModel.onResize and convertStateToGL null safe, Fixes: #3126 by @febbraiod in #3135
- Add support for per-cell data types in Grid Excel exports by @ghsolomon in #3124
- Expose dashCanvasAddViewButton as a public component by @ghsolomon in #3138
- Tweak to task observer logic by @lbwexler in #3142
- Hoist Inspector by @amcclain in #3140
- Check and require that all service classes extend HoistService by @amcclain in #3146
- Fixed boolean filterChooser fields suggesting true for 'false' by @jskupsik in #3149
- Status monitor message override by @jskupsik in #3145
- xhImpl flag by @amcclain in #3151
- Add methods to load / refresh a TabContainer directly by @TomTirapani in #2930
- Add observable
XH.environmentService.serverVersion
by @amcclain in #3156 - Filter chooser model now accepts shorthand number inputs by @jskupsik in #3155
- Fixed store context menu rendering '[object Object]' on formatter-having fields by @jskupsik in #3154
- Aligned the Store.updateData() to follow documented format by @jskupsik in #3150
- Inspector improvement (syncRun) by @amcclain in #3159
Full Changelog: v51.0.0...v52.0.1