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

Proposal: Enable importing CSS Modules via filename convention used in common frameworks #12

Merged
merged 1 commit into from
Feb 6, 2019

Conversation

NickColley
Copy link
Contributor

We have been working on this proposal with Alasdair and came to this conclusion:

"
Hanna, Ollie, Alistair, Tim and I went over your proposal together to discuss it.

We’ve spent a lot of time going over this and we try to accept proposals where possible but we have decided not to accept this proposal for now for the following reasons:

  1. We are not confident that we would be able to support this when issues come up.
  2. We don’t currently have a way to publish ‘alpha’ / ‘experimental’ features without making breaking changes for all users.
  3. We don't have time - due to constraints outside our control we need to be stricter with what we can do and can’t prioritise this work.

In order to accept this in the future we’d need:

  1. Evidence that CSS Modules work for all components, and how they are tested.
  2. Evidence of the need from teams across Government
  3. More time as a team

We think that the underlying problem this tries to solve is a multi-package distribution of components. We are not not sure this has enough benefits to warrant the extra overhead required to support this, but you could consider publishing govuk-react as a single package.

You can read more about our decision to publish a single package here: https://github.com/alphagov/govuk-design-system-architecture/blob/master/proposals/002-publish-one-npm-package-instead-of-multiple-npm-packages.md

This said, we still believe that more investigation into CSS Modules is a worthwhile thing in the future, and hope that you continue to explore it separately within your experimental package.

We’d also be open to documenting an experimental CSS Modules package within the GOV.UK Frontend installation documentation so that we can build more confidence.
"

Hanna, Ollie, Alistair, Tim and I went over your proposal together to discuss it.

We’ve spent a lot of time going over this and we try to accept proposals where possible but we have decided not to accept this proposal for now for the following reasons:

1. We are not confident that we would be able to support this when issues come up.
2. We don’t currently have a way to publish ‘alpha’ / ‘experimental’ features without making breaking changes for all users.
3. We don't have time - due to constraints outside our control we need to be stricter with what we can do and can’t prioritise this work.

In order to accept this in the future we’d need:
1. Evidence that CSS Modules work for all components, and how they are tested.
2. Evidence of the need from teams across Government
3. More time as a team

We think that the underlying problem this tries to solve is a multi-package distribution of components. We are not not sure this has enough benefits to warrant the extra overhead required to support this, but you could consider publishing govuk-react as a single package.

You can read more about our decision to publish a single package here: https://github.com/alphagov/govuk-design-system-architecture/blob/master/proposals/002-publish-one-npm-package-instead-of-multiple-npm-packages.md

This said, we still believe that more investigation into CSS Modules is a worthwhile thing in the future, and hope that you continue to explore it separately within your experimental package.

We’d also be open to documenting an experimental CSS Modules package within the GOV.UK Frontend installation documentation so that we can build more confidence.

Co-authored-by: Hanna Laakso <[email protected]>
Co-authored-by: Alasdair McLeay <[email protected]>
@NickColley
Copy link
Contributor Author

NickColley commented Feb 6, 2019

@alphagov/design-system-developers and @penx can you take a look at this and let me know if you're happy for me to merge please?

@@ -0,0 +1,115 @@
# Enable importing CSS Modules via filename convention used in common frameworks
Copy link
Contributor

Choose a reason for hiding this comment

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

Think we discussed using the word projects rather than frameworks? i.e. create-react-app vs. react

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it's a bit of a fuzzy line what is a library, framework, project.

I think it's probably OK given the subject of the proposal to use framework here.

Many people argue that React is a library not a framework 🤷‍♂️

Copy link
Contributor

Choose a reason for hiding this comment

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

also the convention for .module.css is part of create-react-app (the build system), not React itself (the view library) but I don't mind the wording staying as-is

@penx
Copy link
Contributor

penx commented Feb 6, 2019

approved other than one minor comment

@NickColley
Copy link
Contributor Author

Thanks @penx

@NickColley NickColley merged commit 6642713 into master Feb 6, 2019
@NickColley NickColley deleted the proposal-004 branch February 6, 2019 16:46
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