NEW: Add SilverStripe\ORM\UnexpectedDataException class.
This change provides more graceful handling of the case where a
ChangeSetItem is referencing a no-longer-existing class.
The new exception, SilverStripe\ORM\UnexpectedDataException, is
intended to be available for throwing whenever we have unexpected data
in the database.
It can be trapped by the relevant UIs and more graceful errors than
HTTP 500s can be provided.
The props.tag default was set directly on props,
but the component used it from props.data.tag,
hence the default was ineffective.
Since empty arrays for props.data override nested React defaults,
there's no built-in way to enforce this default.
Hardcoding a default felt viable here, since the component allows overrides via props.
We can't use our own "id" values here, since react-bootstrap requires internal consistency
between tab containers and tab panes through its own auto-generated identifiers
This doesn’t have much impact on resulting JS size, but it will
hopefully make merge conflicts much less frequent.
The CSS growth is a little higher (6.5% increase in size) but is not
material.
If this materially reduces the number of merge conflicts we have, by
letting the git merge tools resolve some dist file mergers, I think it
would be worth it.
Some example changes in file size:
bundle.js 290K -> 301K
vendor.js 1,325K -> 1,321K
bundle.css 628K -> 669K
* Rename bundles (prep for webpack optimisation)
This might or might not reduce the overall repo size,
because git can combine similar chunks in the newly generated files
* Optimise webpack build time
Consolidates bundles, since a separation of bundle-framework.js vs. bundle-legacy.js
vs. bundle-lib.js no longer makes sense - they're all loaded upfront anyway,
since we'll be introducing more react-powered logic alongside the "legacy" JavaScript.
By consolidating into fewer bundles, we give the optimisation scripts (UglifyJS)
more options to reduce the overall file size.
The main motivation for a vendor.js is to shorten rebuild times:
Most active development is happening in files required through bundle.js.
This commit drastically reduces the rebuild time for those changes (15s to 4s).