Commit Graph

17128 Commits

Author SHA1 Message Date
Ingo Schommer
60294654d9 Merge pull request #6056 from open-sausages/pulls/4.0/fix-file-validation
BUG Fix invalid file uploads not being validated
2016-09-22 16:22:01 +12:00
Ingo Schommer
301436f669 Merge pull request #6005 from open-sausages/pulls/4.0/defaut-string-value
API Enable default value to be specified for dbstring types at the db level
2016-09-22 16:09:19 +12:00
Damian Mooyman
e8375111b1
API Enable default value to be specified for dbstring types at the db level
Fixes #1409
2016-09-22 15:19:30 +12:00
Damian Mooyman
9a9cd97bc3 BUG Fix invalid file uploads not being validated 2016-09-22 14:55:06 +12:00
Ingo Schommer
86dd56ba49 Merge pull request #6002 from open-sausages/pulls/4.0-react-tabs-props
Fixed react-bootstrap tabs warnings
2016-09-22 14:48:26 +12:00
Ingo Schommer
34dcda15ef Rebuild dist files 2016-09-22 14:48:00 +12:00
Ingo Schommer
5d9c8a8b95 Better <CompositeField> prop defaults
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.
2016-09-22 14:46:46 +12:00
Ingo Schommer
5415afe8bf Fixed react-bootstrap tabs warnings
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
2016-09-22 14:46:46 +12:00
Ingo Schommer
368d3ee65e Merge pull request #6051 from sminnee/die-dist-conflicts-die
FIX: Break dist javascript and onto newlines.
2016-09-22 14:45:53 +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
Ingo Schommer
a80ac1651a Merge pull request #6053 from open-sausages/pulls/4.0/restore-cms-tests
Restore CMS build to CI
2016-09-22 11:41:16 +12:00
Damian Mooyman
1000e94337 Merge pull request #5954 from open-sausages/pulls/4.0/ssviewer-include-docs
Clarified <% include %> use in SS4 (fixes #5952)
2016-09-22 11:33:05 +12:00
Ingo Schommer
54aad839c4 Clarified <% include %> use in SS4 (see #5952) 2016-09-22 11:29:32 +12:00
Ingo Schommer
a96edf4477 Merge pull request #6054 from open-sausages/pulls/4.0/asset-tidy
A mix of minor tidy up with AssetAdmin
2016-09-22 11:22:31 +12:00
Paul Clarke
62dcb0d0c4 close panel icon moved up to align with title 2016-09-22 11:21:54 +12:00
Paul Clarke
3d774a02cb Chosen no longer nested within .field 2016-09-22 11:20:29 +12:00
Paul Clarke
ab4592a84a adjust max width of file to expand over max allowable width if thin 2016-09-22 11:20:28 +12:00
Paul Clarke
119d46b734 Update folder icon 2016-09-22 11:20:28 +12:00
Paul Clarke
3f06d4f327 style dimensions 2016-09-22 11:20:28 +12:00
Ingo Schommer
c36d947faa Merge pull request #6050 from open-sausages/pulls/4.0/highlighted-file-tweak
API Move PreviewLink logic into File dataobject
2016-09-22 10:42:04 +12:00
Ingo Schommer
ca620c1c14 Merge pull request #6036 from open-sausages/pulls/4.0/fix-cms-buttons
BUG fix issue with popup menu appearing on the left
2016-09-22 09:17:20 +12:00
Ingo Schommer
c309632b72 Merge pull request #6031 from open-sausages/pulls/4.0/fix-campaign-admin
BUG Fix error in campaign area
2016-09-22 09:14:30 +12:00
Damian Mooyman
9062680ccc Restore CMS build to CI 2016-09-22 08:31:56 +12:00
Christopher Joe
ea50e30079 API Move PreviewLink logic into File dataobject 2016-09-21 17:37:35 +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
Damian Mooyman
5a59c4f4b4 API Add bootstrap button row template
API Add bootstrap button template
BUG fix draft / published preview selector
2016-09-21 15:59:12 +12:00
Chris Joe
a85ba1222b Add helper-circle and block icons (#6035) 2016-09-21 15:15:59 +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
Ingo Schommer
183b3915d3 Merge pull request #6045 from sminnee/fix-pr-builds
FIX: Make PR builds work.
2016-09-21 13:22:09 +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
Sam Minnee
2e054af7b1 FIX: Throw more helpful error if tests are run badly.
If you run tests outside of a composer autoloader-based environment, or
your autoloader isn’t pulling in Constants.php, everything will break.

This provides a more helpful error message.
2016-09-21 09:43:14 +12:00
Sam Minnee
3ea23ce2b7 FIX: Make PR builds work.
PR builds are consistently failing because the version of framework
being used cannot be inferred. This environment variable provides the
answer.

It will need to be fixed for each major release, but I think that’s
less maintenance burden than complicating the build script to read this
from composer.json:extra.branch-alias.dev-master.
2016-09-21 09:26:29 +12:00
Will Rossiter
796ca2171d Merge pull request #6044 from jsirish/patch-1
Docs - sort by random instructions
2016-09-21 07:46:18 +12:00
Jason Irish
dcc51ec479 Docs - sort by random instructions
Added instructions for sorting per database type. `RAND()` throws errors in PostgreSQL and SQLite
2016-09-20 14:16:22 -05: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
32d1856d40 FIX Debug::caller() will now handle errors from outside function calls (#6029) 2016-09-20 09:03:22 +12:00
Daniel Hensby
e93a376332 Merge pull request #6025 from tony13tv/patch-3
FIX: Frontend UploadField wouldn't call ssdialog
2016-09-19 11:31:01 +01:00
Cristian Torres
d2d770c6fb FIX: Frontend UploadField wouldn't call ssdialog
As in front end jQuery would be redefined by users custom version. Also the script should use the scope variable ```$``` as it represents the instance of jQuery with all the requirements loaded.
2016-09-18 19:37:44 -06:00
Ingo Schommer
f9581438b5 Merge pull request #6016 from sminnee/travis-lint
NEW: Run JS/CSS linting in Travis.
2016-09-18 16:27:00 +12:00
Ingo Schommer
a0c0a4ae4f Updated docs with sass-lint references 2016-09-18 16:25:16 +12:00
Ingo Schommer
96892636c7 Removed CodeClimate badge 2016-09-18 16:25:08 +12:00
Ingo Schommer
8217109890 Added sass-lint to shrinkwrap file 2016-09-18 16:25:01 +12:00
Sam Minnee
b19475d748 NEW: Ignore npm-shrinkwrap for greenskeeper-provided PRs. 2016-09-18 14:52:00 +12:00
Sam Minnee
b61c5a56de FIX: sass-lint styleguide fixes 2016-09-18 14:50:27 +12:00
Sam Minnee
c2ebff5c19 NEW: Use sass-lint over scss-lint
SCSS linting now uses the node-based sass-lint tool, since we’re
shifting away from CodeClimate.

This has the benefit of not requiring a ruby gem on dev tools -
everything is provided as npm dev dependencies.

This was also necessary to run the linting inside travis.
2016-09-18 14:50:27 +12:00
Sam Minnee
f700d86557 NEW: Run JS/CSS linting in Travis.
The ‘npm run lint’ command will be used to run listing on Travis, which
can also be used on local dev environments. These can also be used with
editor plugins to highlight errors immediately.

The intention is that this can be used in place of codeclimate. The
benefits are that we use a single toolchain in both CI and local dev,
which is not entirely the case at the moment.

Note the sass-lint is provided by “sudo gem install scss_lint”. It’s
possible that we can move to a node-based sass-lint; I can’t recall
what the motivation for using the scss_lint gem was - I think it was
mainly that we had the AirBNB styleguide already implemented as a linter
config.
2016-09-18 14:49:08 +12:00
Daniel Hensby
6f28ac5365 Merge pull request #5986 from sminnee/simpler-test-run
Simpler test run
2016-09-17 08:10:46 +01:00
Sam Minnee
07396e4437 NEW: Move Travis behat test to run locally.
This shifts the behat test run to be triggered form composer activity
within the framework module directly,

 * silverstripe/serve is used to provide a webserver, based on the
   php -S command
 * se/selenium-server-standalone is used to install selenium rather than
   a download command

Because we’re using serve, the behat configuration can be locked down.

Further refinements could be made on this:

 * the behat-extension could be responsible for installing and
   starting/stopping selenium, making these tests more portable
 * xvfb initialisation could be provided with another bin tool in the
   begat-extension: vendor/bin/xvfb 1024x768
 * The bootstrap-file argument to serve could be provided as part of a
   composer.json setting. This would make it easier for developers to
   start a dev server simply by running vendor/bin/serve
 * the behat-extension could be responsible for installing and
   starting/stopping silverstripe/serve, removing the need for
   specifying base_url at all, and possibly utilising the same bootstrap
   file between serve and behat.
2016-09-17 15:40:37 +12:00
Sam Minnee
96126323d2 NEW: themedCSS() and themedJavascript() work with any file layout.
themedCSS() and themedJavascript() files have previously been hardcoded
to reside in the css/ or javascript/ folder directly beneath the theme
path.

This short-cut still works, but you can also specify the theme-relative
path in its entirely, giving you more flexibility about your resource
layout.
2016-09-17 15:40:37 +12:00