accessdigital / wilson

A Drupal installation profile produced by Access. New installations should use https://github.com/accessdigital/drupal-template
https://www.weareaccess.co.uk
4 stars 1 forks source link

Statistics paragraph #29

Closed AccessPaul closed 1 year ago

AccessPaul commented 2 years ago

Adds a new paragraph component for Statistics, with optional CountUp animation on numbers. JS required some changes to Babel and ESlint to suppress some issues with using JS modules (as required by CountUp).

Screenshot 2022-08-04 at 09 06 27 Screenshot 2022-08-04 at 09 06 37 Screenshot 2022-08-04 at 00 44 08

Includes some new utility CSS classes that can be used on fieldgroups to layout input fields in columns. If we like this approach, I can retrospectively apply this to other paragraphs, along with help text.

Screenshot 2022-08-04 at 00 39 27
iamsophiesk commented 2 years ago

Hey this paragraph looks familiar :D

AccessPaul commented 2 years ago

Overnight I had a change of heart about the design of this and so I've pushed in an update to align the stats to a grid (rather than a centred flexbox layout) and added a border to the left edge of each stat. I think this smartens it up a bit and gives some options to align the stats inside text content in a contemporary way.

AccessPaul commented 2 years ago

I can't comment on the file but should wilson-paragraph-icons.sketch be included in the PR? 🤔

To make sure the sketch file that provides the paragraph icons is never lost, I included it in the Wilson repo and it gets updated each time we add a paragraph. It also means that a project built with Wilson gets a copy, so that that client can have alterations made to their paragraph icons.

AccessPaul commented 1 year ago

I've updated this PR with various fixes as asked for. A couple of noteworthy points:-