Commit Graph

21 Commits

Author SHA1 Message Date
Ingo Schommer
f6a4a059fa Moved frontend code from dist/ to src/
We no longer compile it, so it’s technically the “source” now
2017-03-15 11:07:17 +13:00
Ingo Schommer
02bbc05816 Remove unnecessary frontend build tooling
We’re loading 60MB of node_modules to compile 600 LOC of SCSS files down to CSS.
These can be maintained as plain CSS for now, at least until we redesign installer (at which point we’ll likely split it out into a separate module)
2017-03-15 11:03:04 +13:00
Sam Minnee
f63b741e46 FIX: Improve DebugView’s display of non-header information.
DebugView had not ability just to output a regular paragraph that
didn’t have a blue background.

This refactors the CSS classes a bit to amend this.
2017-02-26 15:07:32 +13:00
Sam Minnee
b61c5a56de FIX: sass-lint styleguide fixes 2016-09-18 14:50:27 +12:00
Ingo Schommer
8eac22c628 Separate CSS bundling in Webpack
Multiple entry points can't result in a single bundle.css with a fixed filename, see
https://github.com/webpack/extract-text-webpack-plugin/issues/179

Until that's resolved, it's easier to keep the 'css' task separate in Webpack,
and have a single entry point for all CSS (bundle.scss).

Also partially reverting "Moved frontend assets into admin/ "module"",
which moved too many files: debug.css and install.css need to remain
as framework (not admin) deps. Split out into a separate `framework-css` Webpack
task in preparation for splitting off the module.
2016-09-16 13:46:09 +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
5f7b13ee49 API Removed unused images across CMS UI
Many of these are now inline via Webpack's url-loader plugin (https://github.com/webpack/url-loader),
and a tonne were legacy references (e.g. leftovers from ComplexTableField).

Some of these might still be used in other modules like userforms,
but we're removing support for "hotlinking" images in core - they're not an API.
2016-09-15 22:19:10 +12:00
Sam Minnee
1b527fca3f FIX Webpack handles images & fonts.
Responsibility for finding and referencing images and fonts is now
given to webpack. All the url references are now relative to the
component scss file, and point to font & images files in src/, rather
than assuming someone else will place them in dist.

This makes the source more modular, and makes it easier to, for
example, inline images are data URIs, or create a new build script that
builds several modules for a project in a single pass.

Workaround for bad font path in bundle.css:
ExtactTextPlugin didn’t work as well with a subfolder reference in the
filename. This is just a short-term fix and could probably be improved
to put bundle.css back in the styles subfolder.

Webpack handles images & fonts:
Responsibility for finding and referencing images and fonts is now
given to webpack. All the url references are now relative to the
component scss file, and point to font & images files in src/, rather
than assuming someone else will place them in dist.

This makes the source more modular, and makes it easier to, for
example, inline images are data URIs, or create a new build script that
builds several modules for a project in a single pass.

Clarify docs on spriting and webfonts:
We've decided to remove sprity since it comes with hundreds of dependencies,
and needs compilation within the "npm install" - dragging out the already overweight
install process, and making the resulting node_modules/ folder less portable between systems.
2016-09-15 22:19:09 +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
Paul
955d75b219 Insert media into TinyMCE modal, styling fixes and improvements (#5967)
* 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
2016-09-14 13:48:33 +12:00
Paul Clarke
b9445511b7 Bootstrap GridField 2016-08-03 18:35:18 +12:00
Damian Mooyman
6e74b57c36 BUG Fix issue with gulpfile.js not compiling client/src/legacy dir
BUG Make SelectionGroup.ss and SelectionGroup.js work together
BUG Fix for IE visual indentation of composite field
2016-07-28 16:32:40 +12:00
Damian Mooyman
a809e80d01 API Convert CMS forms to bootstrap
NEW Add cms-forms microtheme to cater to bootstrap's needs.

Note that the old SS3 assets section is buggy as a result of this change.
2016-07-25 17:24:26 +12:00
Paul
f4037fe319 Swap out .Actions class for bootstrap .btn-toolbar (#5581)
* Swap out .Actions class for bootstrap .btn-toolbar

* Converted all south toolbars to use new toolbar component styles, content and preview styles for scrollbars adjusted where required
2016-05-27 13:39:10 +12:00
Paul Clarke
8bdaa97b47 Changed search text to white, linked missing image 2016-05-11 11:29:59 +12:00
Ingo Schommer
c251fab9af Fixed more SCSSLint errors, disabled some files
The mixins and compasscompat will probably be replaced in time,
and install.scss is quite low priority to fix (same treatment as legacy/* styles)
2016-05-06 08:02:38 +12:00
Damian Mooyman
f88d708ee9 BUG Fix GridFieldAddExistingAutocompleter and GridFieldExportButton
Based on https://github.com/silverstripe/silverstripe-framework/pull/5426
Fixes #5267
2016-05-03 17:45:46 +12:00
Damian Mooyman
e7cd864ebc Merge branch 'master' 2016-05-02 10:38:08 +12:00
Paul
ddda7db303 reduced line-height to old height and vertically centered (#5406) 2016-05-02 08:56:20 +12:00
Damian Mooyman
d52db0ba34 Merge 3 into master
# Conflicts:
#	.travis.yml
#	admin/css/ie7.css
#	admin/css/ie7.css.map
#	admin/css/ie8.css.map
#	admin/css/screen.css
#	admin/css/screen.css.map
#	admin/javascript/LeftAndMain.js
#	admin/scss/_style.scss
#	admin/scss/_uitheme.scss
#	control/HTTPRequest.php
#	core/Object.php
#	css/AssetUploadField.css
#	css/AssetUploadField.css.map
#	css/ConfirmedPasswordField.css.map
#	css/Form.css.map
#	css/GridField.css.map
#	css/TreeDropdownField.css.map
#	css/UploadField.css
#	css/UploadField.css.map
#	css/debug.css.map
#	dev/Debug.php
#	docs/en/00_Getting_Started/00_Server_Requirements.md
#	docs/en/02_Developer_Guides/06_Testing/00_Unit_Testing.md
#	docs/en/02_Developer_Guides/06_Testing/index.md
#	docs/en/02_Developer_Guides/14_Files/02_Images.md
#	docs/en/02_Developer_Guides/15_Customising_the_Admin_Interface/How_Tos/Extend_CMS_Interface.md
#	filesystem/File.php
#	filesystem/Folder.php
#	filesystem/GD.php
#	filesystem/Upload.php
#	forms/ToggleField.php
#	forms/Validator.php
#	javascript/lang/en_GB.js
#	javascript/lang/fr.js
#	javascript/lang/src/en.js
#	javascript/lang/src/fr.js
#	model/Image.php
#	model/UnsavedRelationList.php
#	model/Versioned.php
#	model/connect/MySQLDatabase.php
#	model/fieldtypes/DBField.php
#	model/fieldtypes/Enum.php
#	scss/AssetUploadField.scss
#	scss/UploadField.scss
#	templates/email/ChangePasswordEmail.ss
#	templates/forms/DropdownField.ss
#	tests/behat/features/bootstrap/SilverStripe/Framework/Test/Behaviour/CmsFormsContext.php
#	tests/behat/features/bootstrap/SilverStripe/Framework/Test/Behaviour/CmsUiContext.php
#	tests/forms/EnumFieldTest.php
#	tests/security/MemberTest.php
#	tests/security/MemberTest.yml
#	tests/security/SecurityTest.php
2016-04-29 17:50:55 +12:00
Ingo Schommer
19de22f427 API Moved frontend assets into admin/client/
admin/javascript => admin/client
admin/javascript/src => admin/client/src/legacy (mostly)
admin/scss/_variables.scss => admin/client/styles/_variables.scss
admin/scss => admin/client/styles/legacy/
admin/css/editor.css => admin/client/dist/css/editor.css
admin/css/screen.css => admin/client/dist/css/bundle.css
admin/images => admin/client/dist/images
admin/images/sprites/src => admin/client/src/sprites
admin/images/sprites/dist => admin/client/dist/sprites
admin/font => admin/client/dist/font
2016-04-20 21:13:10 +12:00