Commit Graph

111 Commits

Author SHA1 Message Date
Christopher Joe
287809ec3b Refactored react FormFields to use react-bootstrap FormControl components
Addded Checkbox, CheckboxSet and Optionset (radio) fields
Refactored documentation
2016-10-05 10:25:21 +13:00
Paul Clarke
374ef6e0c3 Modal styles 2016-09-30 15:44:17 +13:00
Christopher Joe
963445e743 FIX tab link on top panel changes even when "cancel to browse" was selected 2016-09-30 14:57:15 +13:00
Daniel Hensby
74ecaded08
Merge branch '3' 2016-09-26 14:00:58 +01:00
Daniel Hensby
99f98e51d0
Merge branch '3' 2016-09-23 17:15:59 +01:00
Ingo Schommer
34dcda15ef Rebuild dist files 2016-09-22 14:48:00 +12:00
Sam Minnee
c24201b5f3 FIX: Break dist javascript and onto newlines.
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
2016-09-22 14:38:17 +12:00
Paul Clarke
62dcb0d0c4 close panel icon moved up to align with title 2016-09-22 11:21:54 +12:00
Damian Mooyman
ef88619d2f BUG Fix error in campaign area
Fix alignment of add campaign fields
2016-09-21 17:36:51 +12:00
Ingo Schommer
e1b827f7c8 Optimise webpack build time (#6049)
* 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).
2016-09-21 17:14:43 +12:00
Chris Joe
51ef369630 FIX stringify api call body to work for IE10 (#6032)
* FIX stringify api call body to work for IE10

* Pull out functions defined in createEndpointFetcher
2016-09-21 14:45:30 +12:00
Paul
4d52d655fd Fix for spacing of sitetree panel, reportAdmin, and toggle on Member details page (#5955)
* Panel/tab-panel and alerts spacing, button padding consistency and alignment

* Reports panel spacing adjustments

* ReportAdmin panel and toolbar spacing

* Comment change

* Fix formatting help toggle link

* Use standard line-heights and padding for buttons

* Add base panel styles

* Update to .panel styles and .toolbar spacing

* Remove legacy styles, linting fixes

* Toolbar--content to have consistent styles throughout

* Add panel and toolbar styles to areas missing them

* Replace values with variables

* Layout overrides for tabs and panels with padding

* Adjust JQueryUI button spacing to match other UI buttons

* Remove custom ReportAdmin styles

Update values to variables and modify panel and tab-panel spacing

* Remove text color override

* Remove double (.m-t-1) spacing from campaign panel

* Profile page remove legacy JLayout

* Remove legacy spacing

* Removed Layout from page so !important not needed

* Improve use of variables

* Add missing closing bracket, minor linting fixes

* Linting fixes

* Remove css importants

* Add temp fix for file upload within gridfield

Tidy structure of css

* css build

* Spacing bug fixed for campaign list alert
2016-09-21 10:12:58 +12:00
Chris Joe
08a39f5f93 Update file edit form (#6024)
* Added Created field to File/Image editor

* switch default input value to null

Fix react errors and added a field description

* API Use new DBField::getSchemaValue()
2016-09-20 12:56:45 +12:00
Daniel Hensby
f65168ef8d
Merge branch '3' 2016-09-16 13:43:23 +01:00
Ingo Schommer
3d7c60f8cb Updated dist files 2016-09-16 13:46:11 +12:00
Ingo Schommer
ee10dbb680 API Moved frontend assets into admin/ "module"
We've removed the ability to directly reference JS and CSS files
for form fields and other SilverStripe features in favour of a common bundle built by Webpack.

The logical next step is to make the framework module free of frontend dependencies,
which should simplify its operation, and avoid another time intensive "npm install" on a module.
2016-09-16 13:46:06 +12:00
Ingo Schommer
6be25f3b52 Entry point for UploadField_select.js
Used in iframe, so can't be rolled into other code.
Moved in admin/ since that's easier for now with Webpack entry points,
and we'll move all JS/CSS into admin/ anyway soon.
2016-09-16 13:44:14 +12:00
Ingo Schommer
25f4741142 Removed ModelAdmin/SecurityAdmin Webpack entry points
There's not a lot of benefit in packaging these separately in terms of initial CMS load size,
so let's simplify the setup. They'll eventually become lazy loaded chunks in a React-based setup
2016-09-16 13:44:12 +12:00
Sam Minnee
2e577ddb1d API Use Webpack
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.
2016-09-15 22:19:05 +12:00
Ingo Schommer
294644ce1a Updated dist files 2016-09-14 14:12:04 +12:00
Damian Mooyman
9b1c24cf4c API Move preview panel to CMS module
BUG Fix preview area flashing on section navigation
Fix source file issue
2016-09-13 13:20:17 +12:00
Ingo Schommer
7bc6f3ee9f Enforce JS var declaration with value (#5993)
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
2016-09-13 11:02:15 +12:00
Ingo Schommer
65718770d6 Update to React v15.0 2016-09-06 21:39:20 +12:00
Ingo Schommer
57d885f406 Updated dist files 2016-09-06 20:40:20 +12:00
Damian Mooyman
1eb4e70201 Merge pull request #5945 from open-sausages/pulls/4.0/insert-link
Insert link styling adjustments incl. minor text updates
2016-09-05 15:56:23 +12:00
Ingo Schommer
6d0d46b06b Merge pull request #5946 from robbieaverill/bugfix/5936-show-formatting-help
FIX Show formatting help toggle link
2016-09-05 12:10:57 +12:00
Robbie Averill
cbdf3eb725 FIX Show formatting help toggle link
* Fixes #5936
2016-09-05 11:59:14 +12:00
Paul Clarke
f2637fc059 Remove additional divider lines, adjust padding 2016-09-02 16:50:52 +12:00
Ingo Schommer
ecaed8c08d Fixed icon regression in <Breadcrumb> 2016-09-01 14:07:02 +12:00
Ingo Schommer
56b249eb23 Field values in FormBuilder action handling
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.
2016-09-01 07:55:56 +12:00
Ingo Schommer
fa5e6bbd69 Fixed breadcrumb icon spacing
Regression from https://github.com/silverstripe/silverstripe-framework/issues/5917
2016-08-31 22:31:39 +12:00
Christopher Joe
c1c20aaafc Breadcrumbs with new icons generated 2016-08-30 14:46:59 +12:00
Christopher Joe
b509f9199d Fix Modal response positioning 2016-08-29 10:50:17 +12:00
Ingo Schommer
564ddfa602 Apply .field class to <FieldHolder> react component
It keeps styling consistent between Entwine sections (generated by FieldHolder.ss)
and React sections (generated by <FieldHolder> component).
2016-08-28 13:31:17 +12:00
Ingo Schommer
79b9bb6f18 React for "Add to campaign" on pages
Reuse existing functionality rather than creating "new legacy code" through writing more Entwine
2016-08-28 13:07:32 +12:00
Christopher Joe
b77d21c25a Fix pages add to campaign, improved FormActions error handling, Popover focus highlight and refactored AddToCampaignModal to FormBuilderModal
tweaked tests to suit new generic FormBuilderModal, changed FormAction handler to throw a promise instead
2016-08-28 13:07:32 +12:00
Paul Clarke
b01de98b04 Remove padding override but adjust contents to suit container padding
Remove spacing to the right of icon as there is no btn label
2016-08-28 13:07:31 +12:00
Ingo Schommer
5c2e8d1299 Fix form attr merging order 2016-08-28 13:07:31 +12:00
Christopher Joe
b9624994ac AddToCampaign save message, Submitting indicator on FormAction button 2016-08-28 13:07:31 +12:00
Christopher Joe
fb64e27960 Cleanup API for better form schema support 2016-08-28 13:07:30 +12:00
Damian Mooyman
59efd280ad Fix issues with CMS permission codes
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
2016-08-17 11:19:14 +12:00
Christopher Joe
8a5f8fbc2d Created FieldHolder HOC for TextField and HtmlReadonlyField 2016-08-16 16:53:17 +12:00
Christopher Joe
0363351ee5 Add React HtmlReadonlyField and fixed TextField id 2016-08-16 11:10:44 +12:00
Christopher Joe
a68ba38478 Improve FormBuilder API and added HeaderField and LiteralField 2016-08-16 11:09:19 +12:00
Daniel Hensby
988af4582d Merge pull request #5862 from silverstripe-terraformers/fixes/batch-actions-checkboxes
Fix batch action permissions not applied to new nodes loaded
2016-08-11 14:26:27 +01:00
Damian Mooyman
6005a1c2b2 API Upgrade for silverstripe CMS namespace changes 2016-08-11 11:51:02 +12:00
Christopher Joe
7448fb7bae Fix batch action permissions not applied to new nodes loaded 2016-08-11 11:41:07 +12:00
Paul Clarke
b9445511b7 Bootstrap GridField 2016-08-03 18:35:18 +12:00
Christopher Joe
d93d9bc3c4 Disable datepicker for disabled or readonly fields, they were still editable through the picker 2016-08-01 11:47:48 +12:00
Damian Mooyman
06ae50e4f5
BUG Fix hash link navigation in CMS 2016-07-29 15:58:23 +12:00