Skip to content
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

Use individual component sass #1717

Merged
merged 2 commits into from
Apr 7, 2020
Merged

Conversation

andysellick
Copy link
Contributor

@andysellick andysellick commented Apr 1, 2020

Update government-frontend to import the sass for only the components it is using, instead of all components, as documented here.

Filesize comparison

Before:

Screenshot 2020-04-01 at 08 56 03

Total 851 KB

After:

Screenshot 2020-04-01 at 15 45 10

Total 628 KB

Additional changes

Also update all travel pages (such as foreign travel advice to the USA) to use the warning text component. This was previously not possible because the component did not allow for a heading but has been updated to allow this.

This is being done as part of this PR because this page used styles from the component but not the component itself - so I noticed it had broken when I made the Sass change (because the warning text component is not used anywhere, it was not part of the 'suggested sass' output. It now is).

Screenshot 2020-04-06 at 14 47 02

Trello card: https://trello.com/c/GWttlBxs/228-upgrade-applications-to-use-individual-component-sass

@bevanloon bevanloon temporarily deployed to government-f-use-indivi-pohrw6 April 1, 2020 08:05 Inactive
@andysellick andysellick changed the title Use individual component sass [DO NOT MERGE] Use individual component sass Apr 1, 2020
@andysellick andysellick force-pushed the use-individual-component-sass branch from 4e0db4b to 059077b Compare April 6, 2020 13:46
@andysellick andysellick changed the title [DO NOT MERGE] Use individual component sass Use individual component sass Apr 6, 2020
@andysellick andysellick force-pushed the use-individual-component-sass branch 5 times, most recently from 2e85128 to 0e1bb50 Compare April 6, 2020 15:03
Copy link
Contributor

@injms injms left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Super!

- this was previously built using styles from the warning component but not the component itself
- component could not be used because this part of the page required a heading
- component has since been upgraded to include an option to display as a heading, so can now be used
@andysellick andysellick force-pushed the use-individual-component-sass branch from 0e1bb50 to d8c0f36 Compare April 7, 2020 07:42
@andysellick andysellick merged commit dcbc563 into master Apr 7, 2020
@andysellick andysellick deleted the use-individual-component-sass branch April 7, 2020 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants