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

Make the manage prototype pages independent of the govuk-frontend plugin #2118

Conversation

BenSurgisonGDS
Copy link
Contributor

@BenSurgisonGDS BenSurgisonGDS commented Apr 13, 2023

@BenSurgisonGDS BenSurgisonGDS force-pushed the make-manage-prototype-pages-independent-of-govuk-frontend-plugin branch 2 times, most recently from bbc2336 to ede126c Compare April 13, 2023 19:02
@BenSurgisonGDS BenSurgisonGDS marked this pull request as ready for review April 13, 2023 19:40
@BenSurgisonGDS BenSurgisonGDS linked an issue Apr 13, 2023 that may be closed by this pull request
2 tasks
@BenSurgisonGDS BenSurgisonGDS force-pushed the make-manage-prototype-pages-independent-of-govuk-frontend-plugin branch 6 times, most recently from 7d7aa31 to 86324f3 Compare April 14, 2023 12:28
@@ -5,11 +5,7 @@
@import ".tmp/sass/plugins";

// Patterns that aren't in Frontend
Copy link
Contributor

Choose a reason for hiding this comment

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

can we update the comment to talk about supporting pages made with old templates, something like that?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed as suggested

@BenSurgisonGDS BenSurgisonGDS force-pushed the make-manage-prototype-pages-independent-of-govuk-frontend-plugin branch from 43eda30 to 056a890 Compare April 14, 2023 16:35
CHANGELOG.md Outdated
@@ -2,6 +2,10 @@

## Unreleased

### New features

- [#2118: Make the manage prototype pages independent of the govuk-frontend plugin](https://github.com/alphagov/govuk-prototype-kit/pull/2118)
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it might be more of a fix - this doesn't really introduce new functionality, it fixes a potential issue

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Moved change log comment as requested

@BenSurgisonGDS BenSurgisonGDS force-pushed the make-manage-prototype-pages-independent-of-govuk-frontend-plugin branch from 056a890 to a6ac43d Compare April 14, 2023 17:09
@BenSurgisonGDS BenSurgisonGDS force-pushed the make-manage-prototype-pages-independent-of-govuk-frontend-plugin branch 3 times, most recently from fb340b0 to 49a7cf3 Compare April 17, 2023 07:46
@nataliecarey
Copy link
Contributor

When I try to run this I get a load of errors:

Undefined mixin.
   ╷
15 │   @include govuk-text-colour;
   │   ^^^^^^^^^^^^^^^^^^^^^^^^^^
   ╵
  node_modules/@govuk-prototype-kit/common-templates/sass/_contents-list.scss 15:3  @import
  .tmp/sass/_plugins.scss 4:9                                                       @import
  ../../opensource/alphagov/govuk-prototype-kit/lib/assets/sass/prototype.scss 5:9  root stylesheet
Error: Undefined mixin.
   ╷
15 │   @include govuk-text-colour;
   │   ^^^^^^^^^^^^^^^^^^^^^^^^^^
   ╵
  node_modules/@govuk-prototype-kit/common-templates/sass/_contents-list.scss 15:3  @import
  .tmp/sass/_plugins.scss 4:9                                                       @import
  ../../opensource/alphagov/govuk-prototype-kit/lib/assets/sass/prototype.scss 5:9  root stylesheet
    at Object.wrapException (/Users/natalie.carey/projects/opensource/alphagov/govuk-prototype-kit/node_modules/sass/sass.dart.js:1247:17)
    at _EvaluateVisitor1.visitIncludeRule$1 (/Users/natalie.carey/projects/opensource/alphagov/govuk-prototype-kit/node_modules/sass/sass.dart.js:81234:17)
    at IncludeRule0.accept$1$1 (/Users/natalie.carey/projects/opensource/alphagov/govuk-prototype-kit/node_modules/sass/sass.dart.js:86218:22)
    at IncludeRule0.accept$1 (/Users/natalie.carey/projects/opensource/alphagov/govuk-prototype-kit/node_modules/sass/sass.dart.js:86221:19)
    at _EvaluateVisitor_visitStyleRule__closure1.call$0 (/Users/natalie.carey/projects/opensource/alphagov/govuk-prototype-kit/node_modules/sass/sass.dart.js:83275:16)
    at _EvaluateVisitor1._evaluate0$_withStyleRule$1$2 (/Users/natalie.carey/projects/opensource/alphagov/govuk-prototype-kit/node_modules/sass/sass.dart.js:82164:25)
    at _EvaluateVisitor1._evaluate0$_withStyleRule$2 (/Users/natalie.carey/projects/opensource/alphagov/govuk-prototype-kit/node_modules/sass/sass.dart.js:82169:19)
    at _EvaluateVisitor_visitStyleRule_closure20.call$0 (/Users/natalie.carey/projects/opensource/alphagov/govuk-prototype-kit/node_modules/sass/sass.dart.js:83267:10)
    at Environment0.scope$1$3$semiGlobal$when (/Users/natalie.carey/projects/opensource/alphagov/govuk-prototype-kit/node_modules/sass/sass.dart.js:80245:25)
    at Environment0.scope$1$2$when (/Users/natalie.carey/projects/opensource/alphagov/govuk-prototype-kit/node_modules/sass/sass.dart.js:80291:19)
Undefined mixin.
   ╷
15 │   @include govuk-text-colour;
   │   ^^^^^^^^^^^^^^^^^^^^^^^^^^
   ╵
  node_modules/@govuk-prototype-kit/common-templates/sass/_contents-list.scss 15:3   @import
  .tmp/sass/_plugins.scss 4:9                                                        @import
  ../../opensource/alphagov/govuk-prototype-kit/lib/assets/sass/prototype.scss 5:9   @import
  ../../opensource/alphagov/govuk-prototype-kit/lib/assets/sass/unbranded.scss 12:9  root stylesheet
Error: Undefined mixin.
   ╷
15 │   @include govuk-text-colour;
   │   ^^^^^^^^^^^^^^^^^^^^^^^^^^
   ╵
  node_modules/@govuk-prototype-kit/common-templates/sass/_contents-list.scss 15:3   @import
  .tmp/sass/_plugins.scss 4:9                                                        @import
  ../../opensource/alphagov/govuk-prototype-kit/lib/assets/sass/prototype.scss 5:9   @import
  ../../opensource/alphagov/govuk-prototype-kit/lib/assets/sass/unbranded.scss 12:9  root stylesheet
    at Object.wrapException (/Users/natalie.carey/projects/opensource/alphagov/govuk-prototype-kit/node_modules/sass/sass.dart.js:1247:17)
    at _EvaluateVisitor1.visitIncludeRule$1 (/Users/natalie.carey/projects/opensource/alphagov/govuk-prototype-kit/node_modules/sass/sass.dart.js:81234:17)
    at IncludeRule0.accept$1$1 (/Users/natalie.carey/projects/opensource/alphagov/govuk-prototype-kit/node_modules/sass/sass.dart.js:86218:22)
    at IncludeRule0.accept$1 (/Users/natalie.carey/projects/opensource/alphagov/govuk-prototype-kit/node_modules/sass/sass.dart.js:86221:19)
    at _EvaluateVisitor_visitStyleRule__closure1.call$0 (/Users/natalie.carey/projects/opensource/alphagov/govuk-prototype-kit/node_modules/sass/sass.dart.js:83275:16)
    at _EvaluateVisitor1._evaluate0$_withStyleRule$1$2 (/Users/natalie.carey/projects/opensource/alphagov/govuk-prototype-kit/node_modules/sass/sass.dart.js:82164:25)
    at _EvaluateVisitor1._evaluate0$_withStyleRule$2 (/Users/natalie.carey/projects/opensource/alphagov/govuk-prototype-kit/node_modules/sass/sass.dart.js:82169:19)
    at _EvaluateVisitor_visitStyleRule_closure20.call$0 (/Users/natalie.carey/projects/opensource/alphagov/govuk-prototype-kit/node_modules/sass/sass.dart.js:83267:10)
    at Environment0.scope$1$3$semiGlobal$when (/Users/natalie.carey/projects/opensource/alphagov/govuk-prototype-kit/node_modules/sass/sass.dart.js:80245:25)
    at Environment0.scope$1$2$when (/Users/natalie.carey/projects/opensource/alphagov/govuk-prototype-kit/node_modules/sass/sass.dart.js:80291:19)

It seems to work anyway, I'll keep reviewing.

@nataliecarey
Copy link
Contributor

@BenSurgisonGDS thanks for your reply on Slack - I uninstalled @govuk-prototype-kit/common-templates and the errors went away.

The functionality works and it feels really good to be able to use the kit without govuk-frontend (for those who don't use it).

One thing I think we should change - when the user doesn't have govuk-frontend I don't think we should show the Install common templates button in the Templates tab.

(I'm still reviewing the code but that's the only change I'd suggest in the behaviour.

@BenSurgisonGDS
Copy link
Contributor Author

@BenSurgisonGDS thanks for your reply on Slack - I uninstalled @govuk-prototype-kit/common-templates and the errors went away.

The functionality works and it feels really good to be able to use the kit without govuk-frontend (for those who don't use it).

One thing I think we should change - when the user doesn't have govuk-frontend I don't think we should show the Install common templates button in the Templates tab.

(I'm still reviewing the code but that's the only change I'd suggest in the behaviour.

Fix has been made so that the link in the templates page to install common templates will not be displayed if the govuk-frontend plugin has been uninstalled.

@BenSurgisonGDS BenSurgisonGDS force-pushed the make-manage-prototype-pages-independent-of-govuk-frontend-plugin branch from 1bf1623 to 2be23bf Compare April 19, 2023 10:05
@BenSurgisonGDS BenSurgisonGDS force-pushed the make-manage-prototype-pages-independent-of-govuk-frontend-plugin branch from 2be23bf to fe24af4 Compare April 19, 2023 14:53
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.

Make the Manage Prototype pages work without GOV.UK Frontend
3 participants