New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch to using govuk_admin_template and Bootstrap 3 #2241
Commits on Jun 26, 2015
-
* Add govuk_admin_template * Remove jquery-rails and Bootstrap gems, they’re provided via gem
-
Switch to using govuk_admin_template layout
* Use nested layouts * Remove bootstrap and custom variables from admin.scss * Remove now unnecessary javascript includes
-
Add Bootstrap form classes to form builder
In Bootstrap 3 all form elements that want to pickup the Bootstrap styles need: * A `form-control` class * A `form-group` wrapper for correct spacing Horizontal forms no longer use `controls`, and the space between label and field is set using newer grid classes. Setup horizontal forms for text fields and textareas.
-
Remove pre-gem environment indicator shims
Environment indicators are now provided by the admin gem
-
These overly generic styles clash with the Bootstrap defaults and patterns. Forms should look and behave as they do in other admin apps.
-
Render form errors using Bootstrap 3 alert
`error` was renamed to `danger`
-
Cleanup adding, editing and index of topics
* Switch to Bootstrap 3 grids where required * Include Bootstrap 3 alert and btn default classes * Switch featured link form away from horizontal styles, improve rendering and capitalise `URL`
-
Make header work with template & Bootstrap 3
* Use styles and markup patterns from admin template, remove original shims and assets * Fix favicon image location * Visually match existing header
-
* Use BS3 grid and label classes * Use list-unstyled and list-inline classes and remove custom document list styles
-
* Reduce custom styles in favour of Bootstrap defaults * Remove default indenting within lists (`list-unstyled`) * Add missing btn-default to buttons * Tweak spacing * Switch absolute_time to use a `<time>` element, and avoid styling as an abbreviation with a help cursor and dotted underline * Switch alerts from `-error` to `-danger` * Small typography fixes * Use no content styles for empty sections * Switch from `icon-` to `glyphicon-` * Update modals to latest syntax
-
Update checkbox and radio inputs to Bootstrap 3
* The radio/checkbox classes no longer go on the labels, they need to wrap the label and the input. See http://getbootstrap.com/css/#forms
-
* Switch to new grid classes * Fix checkboxes that aren’t using form_builder methods
-
* Update to work with admin gem’s approach to non-js checking * Prevent `ul` elements from indenting list items
-
Cleanup corporate information pages
* Remove, simplify or update grid classes * Use smart quotes in copy * Add borders to tables to match table style
-
Cleanup edition unpublish/withdraw forms
* Remove grid classes * Put form in well to match other editing interfaces * Use Bootstrap 3 radio classes * Remove strong tags from label text
-
If `data-toggle=modal` and `data-target` are used on a link element in Bootstrap 3, then Bootstrap attempts to load the contents of the link's href remotely, putting it into the modal container. There's no way of disabling this. (The feature is being removed in Bootstrap 4) We still want a link that works when js is broken or disabled. Use `data-module=linked-modal` rather than `data-toggle=modal` * The workaround doesn’t work in conjunction with the confirm dialogue, remove the dialogue as the edition still requires a reason before it can be published
-
* Use glyphicons, link and margin helpers * Remove custom styles which are now provided by Bootstrap/gem
-
Cleanup first published form fields
* Remove custom styles, use Bootstrap defaults * Labels are now bold by default * Wrap radio elements in `radio` container
-
Fix words to avoid highlighter
* Reset styles that were being inherited from the admin template due to a class clash. * Stop using `badge` styles in alert * Explicitly remove `hide` class from alert
-
Update file input builder to Bootstrap 3
Wrap generated markup in the `form-group` class
-
Cleanup new document forms for all types
* Switch to Bootstrap 3 grid classes * Add `form-group` wrappers and `form-control` classes where missing * Add `form-inline` around date input fields to prevent wrapping * Use ellipses rather than …
-
Fix 'designate as foreign language' fields
* Stop link clicks from changing the URL fragment using `preventDefault` * The fieldset is no longer the direct parent of the input, user `parents` instead to find the correct HTML element * Remove cancel button custom styles
-
Remove style guide and style shims
Before adopting the admin gem, some of the styles were ported across for use in statistics announcements. These can now be removed.
-
Cleanup statistics announcements
* Cleanup index view, new and edit forms, cancel form and reschedule forms * Update `muted` to `text-muted` * Use new Bootstrap alert, grid and form classes
-
Cleanup featured documents view
* Remove unused column headers from tables * Use grid glasses in current feature list over custom styles * Add missing `btn-default` classes * Switch to Bootstrap 3 grid classes
-
* Use new Bootstrap 3 form classes * Use smart quotes
-
Cleanup organisation list and forms
* Use Bootstrap 3 grid and form classes * Add missing `btn-default` classes
-
Cleanup contacts list and forms
* Use glyphicons from Bootstrap 3 in icon helper (colour is now inherited from text colour, which will be white on a dark button) * Use Bootstrap 3 form classes (`form-group`, `form-control`, etc) * Remove horizontal inputs and nest contact form in well so it looks and behaves like other forms
-
Cleanup social media list and forms
* Use Bootstrap 3 form classes (`form-group`, `form-control`, etc) * Remove horizontal inputs and nest form in well so it looks and behaves like other forms * Make social media URLs clickable
-
Cleanup governance group list and forms
* Use Bootstrap 3 grid classes * Use admin template table styles
-
Cleanup ordering of people forms
* Use Bootstrap 3 grid classes * Labels default to being bold, use `normal` class so that first line of person continues to be a normal font weight
-
Cleanup org translations list and form
* Use Bootstrap 3 grid classes * Use admin gem table styles * When there are no translations, show a no content message rather than an empty table
-
Cleanup financial reports index and form
* Use Bootstrap 3 grid classes * Use admin gem table styles * When there are no reports, show a no content message rather than an empty table
-
Since January there’ve been four IE6 sessions (<0.01% of users). * Remove IE6 stylesheet * Remove IE6 shims The admin gem still includes helpers for IE7 and below so that pages render acceptably using Bootstrap 3. In dev, this will mean one less admin file to compile when styles are changed.
-
Cleanup policy groups index and form
* Use Bootstrap 3 grid classes * Add missing `btn-default` class
-
* Use Bootstrap 3 grid and form classes * Add well around role translate forms to match other form styles * Add missing `btn-default` styles * Use smart quotes
-
Cleanup people lists and forms
* Use Bootstrap 3 grid and form classes * Add well around translate forms to match other form styles * Add missing `btn-default` styles * Use smart quotes * Add no content messages when there are no translations or historic accounts for people
-
Cleanup classification featuring forms
* Use Bootstrap 3 grid and form classes * Add well around forms to match other form styles * Add missing `btn-default` styles * Use smart quotes * Use no content messages styles * Use glyphicons * Stop using horizontal form styles
-
* Remove horizontal form fields * Use Bootstrap 3 form classes
-
Cleanup worldwide org list and forms
* Use Bootstrap 3 grid and form classes * Add well around role translate forms to match other form styles * Add missing `btn-default` styles * Use smart quotes * Remove horizontal form styles
-
Cleanup worldwide location list and forms
* Use Bootstrap 3 grid and form classes * Add missing `btn-default` styles * Prevent featurable offsite links partial from erroring when passed a world location
-
Cleanup fields of operation forms
* Use Bootstrap 3 form classes * Add missing `btn-default` class
-
* Add missing btn-default class * Use Bootstrap 3 grid classes * Stop using horizontal form controls
-
Cleanup sitewide settings pages
* Use Bootstrap 3 grid classes * Use admin template table styles * Add missing `btn-default` class
-
Cleanup promotional features list and forms
* Use Bootstrap 3 grid and form classes * Stop using horizontal form styles * Add missing `btn-default` classes
-
-
-
Remove last uses of old grid classes
* Switch from `spanX` to `col-md-X` * Remove spanX specific styles
-
Add missing
btn-default
classesIn Bootstrap 3 `btn` buttons must also specify a style class, `btn-default` is the grey one.
-
-
Use new Bootstrap 3 button size classes
`btn-small` to `btn-sm` `btn-mini` to `btn-xs` `btn-large` to `btn-lg`
-
Remove horizontal form options
* Remove last use of `horizontal: true` * Simplify form builder to avoid use of horizontal forms, keeping all forms consistent and avoiding the more complex (but more flexible) implementation of horizontal forms in Bootstrap 3, which uses grid classes. * Remove horizontal tests and update others to test for new syntax
-
Update date formats in governments feature
The governments table already used the `.to_s(:govuk_date)` feature, even though those date formats weren’t present without the admin gem. Now the gem is included these dates render in a user friendly way and the tests can be updated.
-
The javascript that searched for, cloned and updated the IDs of image inputs was closely coupled with the markup structure. When the new bootstrap form wrappers were added the javascript couldn’t find the reference input. * Use a js- class name to show that javascript is using the element * Update from the old `delegate` method to the newer `on` one * Use `find` over `children` to search more than one level deep * Avoid `input:first`, be specific and use the new js- class name
-
-
Use text-muted class on speed tagger
`muted` has been replaced with `text-muted`
-
Use admin gem’s js enabled classes
Replace `.js-enabled` with `.js` so that elements that depend on javascript running adopt the same styles. `js-enabled` was replaced with `.js` when the base admin template was adopted. See: https://github.com/alphagov/govuk_admin_template/blob/master/app/views/l ayouts/govuk_admin_template.html.erb#L15 This only affects admin uses of `js-enabled`
-
* Remove indenting from lists using `list-unstyled` * Switch to Bootstrap 3 button classes * Use `no-content` styles for empty group * Remove use of hgroup
-
Cleanup imports table, errors and forms
* Use admin gem table styles * Use Bootstrap 3 alert classes * Add form classes to new import form
-
Replace alert-error with alert-danger
Bootstrap 3 changed the alert-error class to alert-danger
-
Fix first published field toggle
* Toggle `if-js-hide` class rather than show/hide * Use Bootstrap 3 form classes
-
Update the js/non-js overrides to work with the new Bootstrap 3 collapse implementation.
-
* Use pre-built Bootstrap 3 chosen theme from: http://github.com/alxlit/bootstrap-chosen * Update `chzn-select` inputs to include a `form-control` class for better non-js styling
-
Wrap text in govspeak help sections
Prevent users from having to sideways scroll to see content.
Commits on Jun 29, 2015
-
* Remove Bootstrap 2 classes * Switch to glyphicons * Use no content styles from admin gem
-
Use
image-url
for chosen spriteEnsure the stylesheet includes the correct asset path when assets are compiled.