The bundle is generated by running “webpack” directly - gulp is no
longer needed as an intermediary. The resulting config is a lot shorter,
although more configuration is pushed into lib.js.
Modules are shared between javascript files as global variables.
Although this global state pollution is a bit messy, I don’t think it’s
practically any worse than the previous state, and it highlights the
heavy coupling between the different packages we have in place.
Reducing the width of the coupling between the core javascript and
add-on modules would probably be a better way of dealing with this than
replacing global variables with some other kind of global state.
The web pack execution seems roughly twice as fast - if I clear out my
framework/client/dist/js folder, it takes 13.3s to rebuild. However,
it’s not rebuilding other files inside dist, only the bundle files.
CSS files are now included from javascript and incorporated into
bundle.css by the webpack. Although the style-loader is helpful in some
dev workflows (it allows live reload), it introduces a flash of
unstyled content which makes it inappropriate for production.
Instead ExtractTextPlugin is used to write all the aggregated CSS
into a single bundle.css file. A style-loader-based configuration could
be introduced for dev environments, if we make use of the webpack live
reloader in the future.
Note that the following features have been removed as they don't appear to be
necessary when using Webpack:
- UMD module generation
- thirdparty dist file copying
LeftAndMain.js deps: Without it, ssui.core.js gets loaded too late,
which leads e.g. to buttons being initialised without this added behaviour.
Introducing <Tabs> component based on react-bootstrap
Better support for nested fields in FormBuilder
Tweaks to get FormBuilder working with frameworktest BasicFieldsPage fields
Added exception in FormBuilder when Component is defined but not found
Added check in SingleSelectField for empty value before adding one in
Added temporary workaround for CompositeFields with no name (another story to address the actual problem)
Added asset_preview_height for File image preview, matches the defined CSS max-height
Added documentation to DBFile::PreviewLink() method
* Remove interference of nested for__fieldgroup-item
* Adjust position of dropdown field
* Remove divider lines, adjust position of upload area
Clean up styles a bit too
* Adjust position of image
* Mostly css tidy up, added use of a few variables
* Toggle arrow was showing other icon because of icon height
* All buttons in toolbars remove margin below, adjust button link color
* Reorder sort and filter, add toolbar styles
* Add button styles to toolbar
* Remove some of the linting issues
* Added new panel variables
* Simplify variable
* Replace panel variable, insert media dialog positioning
* Update with new variable name, reduce space below toolbar
* Build
* Uploading file spacing, toolbar styles added
* Visual uploads, error upload fixes, edit details panel spacing
* Add toolbar to upload modal
* build
* Build
* increase width of pagination on gridfield
* Add height to uploading items only
* Build
* Added class back for beat test to pass
This caught us out recently where code did a strict type check for `myVar === undefined`.
The var was defined as `let myVar;`, without a value - so the check returned false (it's `null`).
To avoid this situation, we've decided to enforce declarations with values.
Note that preference should be given to single, immutable assignments via const where possible.
See http://eslint.org/docs/rules/init-declarations
Allows actions to make decisions based on the form payload.
For example, a "delete" button can pass the currently edited record ID to its API endpoint.
Form element styles should be consistent throughout the CMS.
While we still have the ability to create dropdowns (<select>) which aren't based on
Entwine/HTML rather than new components like <SingleSelectField>,
we need to ensure those are rendered the same.
By default, the Entwine-based CMS sections will transform <select>
into a ChosenJS control, but you can still apply .no-chosen.
Hence there's a need for correct height both in React and Entwine sections,
not just in a React component.
Standardise template locations
Move CMSSettingsController class to SiteConfig module
Fix CMSMenu behaviour for namespaced admin sections
Split classes into one per file
Manual fixes and cleanup