Major cleanup of components, lists and Drupal preprocessing
Major cleanup of components, lists and Drupal preprocessing.
This version brings stable API - all Drupal fields were re-assessed, renamed
and/or removed.
🧩 Component library
New features
- Added Time base component. 🚀🚀🚀
- Fully refactored all Cards from scratch to rely on other components. 🚀🚀🚀
- Fully refactored Icon to support inline SVG icons: icons now inherit color and size of the container. 🚀🚀🚀
- Refactored Popover to act as a dropdown container and have a trigger link
- Refactored Single filtered and added Apply button. Added content slots
- Simplified Group filter to bare minimum, Added Apply button and removed custom Ajax auto-submit support (still works with Ajax views).
- Updated Primary navigation expand triggers to appear centred for when items are multi-lined.
- Added Tag List component and added to Promo and Event cards.
- Added
Subtitle
field to the Promo card. - Refactored Link to use Icon and allowed to be used as an icon-only component.
- Added a size to the Item list.
Fixes
- Removed grouping of components in Storybook. This makes it easier to navigate between components.
- Fixed Chip properties to correctly handle multiple state
- Fixed Chip example event export.
- Fixed field mappings and styles for Form element
- Fixed field mappings for Fieldset
- Fixed input position in Radio
- Fixed input position in Checkbox
- Updated Collapsible to be always expanded when no JS.
- Fixed above link button on List to be a
regular
size and added content slots. - Fixed bottom spacing of the last item of the last Basic content component.
- Fixed
Site section
style in Banner. - Fixed stripe variables and Message and Alerts icon colours.
- Fixed Icon sizes on components.
- Updated Link and Content Link component’s CSS to use word-break to break content.
- Fixed TOC jumping when clicked.
- Removed broken
storybook-addon-pseudo-states
plugin. - Removed Description List component.
- Removed DropdownFilter in favour of Popover
- Refactored Campaign component.
- Unified calls to
ct-breakpoint()
mixin. - Fixed missing
attributes
prop to the Item grid. - Fixed links direction in the Service card.
- Fixed A11Y in mobile menu to communicate the state.
- Created deprecations system and a SASS header to provide build information.
- Updated CSS variables generation to support numeric values and opacity.
- Added separate styles for Scrollspy.
- Fixed typo in 'elipsis' in Pager.
- Updated margin resets to happen in a single place for multiple components.
- Added vertical highlight mixin and refactored components.
💧 Drupal theme
New features
- Added Event content type layout and fixed view modes. Event is now a first-class citizen.
- Added a list of Topics displayed by default on Page content. This can be hidden with
Hide tags
checkbox. - Added icon for external links in content.
- Added a capability to expose internal properties as data attributes in DOM useful for migrations.
- Added support for SVG in WYSIWYG.
- Added centralised last preprocessor to convert CSS classes in attributes to
modifier_class
variable. - Added sorting by Promoted value in the Automated list.
- Added 'none' value for Vertical Spacing and made it required for all components.
- Added
no-js
CSS class to<html>
attributes. - Added default minimal styling for all text in Drupal.
- Added links processing to tables.
- Added feature opt-out mechanism. Some of the features can be opted out to use standard Drupal functionality
- Added
drush civictheme:stylesheet
Drush command to forcefully re-generate stylesheet (before, it would be lazy-generated only on the next page load). - Added
Short Date and Time
date formatter.
Fixes
- Fixed color filters applied twice after being set via Drush. 🚀🚀🚀
- Refactored Automated list, tests and generated content. 🚀🚀🚀
- Refactored Automated list filters. 🚀🚀🚀
- Refactored all Cards preprocessors. 🚀🚀🚀
- Updated field mappings for all components (every field was checked for name, type, validity etc). 🚀🚀🚀
- Replaced Summary field with Content on non-Cards paragraphs. This field should only be used on Cards paragraphs.
- Removed
Size
field from cards. - Fixed fields processing on Manual list.
- Fixed breadcrumb not listing the last item as a current page on non-GovCMS profile.
- Fixed image as icon on Navigation card.
- Fixed Accordion panels to be closed when editing.
- Fixed Manual list to have cards closed when editing.
- Fixed Tags list not having bottom vertical space by default.
- Fixed Slider slides to be closed when editing.
- Fixed Slider to allow multiple links and Date field.
- Fixed 'Showing x of y' is not hidden for Automated list with limited results.
- Removed obsolete node view modes.
- Fixed theme config reset key stored in config.
- Fixed
<body>
tag not having correct classes. - Fixed Basic Content component field mapping.
- Fixed Image preprocessing.
- Fixed Banner field mapping.
- Added preprocessing for Content component.
- Updated field mapping in Slider.
- Replaced
print_r
withvar_export
in colour validation exception. - Updated Event card Image field to not be compulsory.
- Updated Event card to use Topics (plural) field.
- Updated Mobile Navigation block to make Trigger text a required field.
- Fixed Slider Slide default image position value set to Left.
- Removed obsolete Link field from Slider.
- Fixed Next Step content field.
- Updated Callout link title to be required.
- Moved
Hide tags
intoAppearance
group on Page content type. - Removed obsolete Topic field from Subject reference card.
- Fixed background color for Table, Attachment, Dropdown filter and Campaign components.
- Updated Banner block component to add Type and Featured image fields.
- Removed
teaser
view mode as it was never used.
⚙ Platform
-
Default content:
- Fixed content profiles content.
- Fixed Color Palettes in content profiles.
- Fixed missing footer menus on Corporate profile.
-
Stack and workflow:
- Updated config of PHPCS and PHPMD to lint super fast (3.5min to 15 seconds)
- Refactored all existing Behat tests to remove obsolete tests and converted JS tests into non-JS for speed.
- Updated some tests to be compatible with a sub-theme -> increased test coverage (they used to run only for a base theme).
- Added content generation for Event
- Fixed content generation for Page and added missing variations for some components (see https://nginx-php.master.civictheme-source.lagoon.salsa.hosting/generated-content/components).
- Fixed phpcs exclusion script unit test to allow to be ran outside of docker.
- Updated project readme to have only relevant information.
- Removed Styleguide in favour of generated content.
-
CI:
- Added Library test runner as GH action. This tests that each page of Storybook can load.
- Included basetheme tests into subtheme tests runs.
🧨 Breaking changes:
- Fields renamed:
field_c_p_fill_width
->field_c_p_list_fill_width
field_c_p_column_count
->field_c_p_list_column_count
- Removed
field_c_p_topic
field in favour of existingfield_c_p_topics
(plural) field. - Replaced
field_c_n_date
withfield_c_n_date_range
in Event. - Replaced
Summary
field withContent
on non-Cards paragraphs. This field should only be used on Cards paragraphs. - Replaced
field_c_n_date
withfield_c_n_date_range
in Event. - Removed
Size
field from cards. - Removed
Topic
field from Subject reference card. - Removed functionality:
- Removed
DropdownFilter
component and mappings in Drupal. View filters now appear in Popover component). - Removed custom Drupal ajax views override that was providing AJAX autosubmit functionality as it was not working correctly with already broken Single and Group filters.
- Removed exporting of colours CSV from the Library.
- Removed
- Topics now appear under content for Page unless
Hide tags
is checked. If Topics should be hidden within existing content such updated should be performed manually.