Skip to content

Commit

Permalink
Revert "PP-12020 Upgrade to design system v5"
Browse files Browse the repository at this point in the history
This reverts commit b1cdb77.
  • Loading branch information
iqbalgds committed Dec 4, 2024
1 parent 36067c5 commit 65e3e45
Show file tree
Hide file tree
Showing 35 changed files with 147 additions and 152 deletions.
1 change: 1 addition & 0 deletions app/assets/js/components/add-service-spinner.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@

document.getElementById('submit-button').setAttribute('disabled', true)
document.getElementById('submit-button').setAttribute('aria-disabled', true)
document.getElementById('submit-button').setAttribute('class', 'govuk-button govuk-button--disabled')
}
})()
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@

document.getElementById('submit-button').setAttribute('disabled', true)
document.getElementById('submit-button').setAttribute('aria-disabled', true)
document.getElementById('submit-button').setAttribute('class', 'govuk-button govuk-button--disabled')
}
})()
5 changes: 1 addition & 4 deletions app/assets/sass/application.scss
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
// We set all our pages wider in selfservice because it helps people viewing the list of transactions
$govuk-page-width: 1200px;
$govuk-suppressed-warnings: (
govuk-typography-scale-14
);

@import "govuk-frontend/dist/govuk/all";
@import "govuk-frontend/govuk/all";
@import "accessible-autocomplete";

@import "components/cookie-message";
Expand Down
1 change: 0 additions & 1 deletion app/assets/sass/components/navigation.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
.service-info--tag {
display: inline-block;
margin-left: 5px;
max-width: none;
}

.service-info {
Expand Down
2 changes: 1 addition & 1 deletion app/assets/sass/components/print-button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
display: none;
}

.govuk-frontend-supported {
.js-enabled {
.print-button-wrapper {
display: block;
}
Expand Down
11 changes: 11 additions & 0 deletions app/assets/sass/components/request-to-go-live.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,17 @@
display: inline-block;
width: 30px;
}
.status {
background-color: govuk-colour("blue");
color: govuk-colour("white");
text-transform: uppercase;
letter-spacing: 1px;
font-size: 14px;
font-weight: bold;
padding: 0 5px;
margin-left: govuk-spacing(1);
vertical-align: middle;
}
.waiting {
background-color: govuk-colour("dark-grey");
}
Expand Down
8 changes: 4 additions & 4 deletions app/views/agreements/macro/status.njk
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
"INACTIVE": "govuk-tag--yellow"
} %}
{% set statusTextMap = {
"CREATED": "Needs payment details",
"ACTIVE": "Active",
"CANCELLED": "Cancelled",
"INACTIVE": "Inactive"
"CREATED": "needs payment details",
"ACTIVE": "active",
"CANCELLED": "cancelled",
"INACTIVE": "inactive"
} %}

{% macro agreementStatusTag(status) %}
Expand Down
2 changes: 1 addition & 1 deletion app/views/api-keys/create.njk
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
<div class="govuk-warning-text govuk-!-margin-bottom-0">
<span class="govuk-warning-text__icon" aria-hidden="true">!</span>
<strong class="govuk-warning-text__text">
<span class="govuk-visually-hidden">Warning</span>
<span class="govuk-warning-text__assistive">Warning</span>
<h2 class="govuk-heading-m">Store your API key securely</h2>
</strong>

Expand Down
4 changes: 2 additions & 2 deletions app/views/includes/phase-banner.njk
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
{% if normalisedPaymentProvider === 'sandbox' %}
Test
{% else %}
{{ normalisedPaymentProvider | capitalize }} test
{{ normalisedPaymentProvider }} Test
{% endif %}
{% else %}
Live
Expand All @@ -35,7 +35,7 @@
- switch psp
{% endif %}
{% endset %}
<strong class="govuk-tag service-info--tag {{ tagModifierClass }}">{{ tagText }}</strong>
<strong class="service-info--tag govuk-tag {{ tagModifierClass }}">{{ tagText }}</strong>
{% endif %}
{% endset %}

Expand Down
2 changes: 1 addition & 1 deletion app/views/includes/scripts.njk
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<script type="module" src="{{ js_path }}"></script>
<script src="{{ js_path }}"></script>
4 changes: 2 additions & 2 deletions app/views/payouts/list.njk
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Payments to your bank account - GOV.UK Pay
{% block beforeContent %}
{% set pageTitleBreadcrumbWithTag %}
<span>Payments to your bank account</span>
<strong class="govuk-tag govuk-tag--grey service-info--tag">{{ "Live" if filterLiveAccounts else "Test" }}</strong>
<strong class="service-info--tag govuk-tag govuk-tag--grey">{{ "LIVE" if filterLiveAccounts else "TEST" }}</strong>
{% endset %}
{{ breadcrumbs([
{ text: "My services", href: routes.serviceSwitcher.index },
Expand All @@ -20,7 +20,7 @@ Payments to your bank account - GOV.UK Pay
<div class="govuk-grid-column-full">
<h1 class="govuk-heading-l">
Payments to your bank account
<strong class="govuk-tag govuk-tag--grey">{{ "Live" if filterLiveAccounts else "Test" }}</strong>
<strong class="govuk-tag govuk-tag--grey">{{ "LIVE" if filterLiveAccounts else "TEST" }}</strong>
</h1>
</div>
<div class="govuk-grid-column-two-thirds govuk-!-margin-bottom-0">
Expand Down
22 changes: 6 additions & 16 deletions app/views/request-to-go-live/index.njk
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{% extends "../layout.njk" %}
{%- from "govuk/components/tag/macro.njk" import govukTag -%}

{% block pageTitle %}
Request a live account - {{ currentService.name }} - GOV.UK Pay
Expand Down Expand Up @@ -33,7 +32,7 @@
<div class="govuk-warning-text">
<span class="govuk-warning-text__icon" aria-hidden="true">!</span>
<strong class="govuk-warning-text__text">
<span class="govuk-visually-hidden">Warning</span>
<span class="govuk-warning-text__assistive">Warning</span>
All users with admin permissions can submit this information. You can <a href="{{formatServicePathsFor(routes.service.teamMembers.index, currentService.externalId)}}" class="govuk-link">manage your users</a> here.
</strong>
</div>
Expand Down Expand Up @@ -92,28 +91,19 @@
<ol class="govuk-list govuk-list--number">
<li>Add your organisation’s name and address. These details will appear on your payment pages.
{% if enteredOrganisationAddress %}
{{ govukTag({
text: "Completed"
}) }}
{% elif enteredOrganisationName %}
{{ govukTag({
text: "In progress",
classes: "govuk-tag--grey"
}) }}
<span class="status">Completed</span>
{% elif enteredOrganisationName %}
<span class="status">In Progress</span>
{% endif %}
</li>
<li>Tell us which payment service provider you will use.
{% if chosenHowToProcessPayments %}
{{ govukTag({
text: "Completed"
}) }}
<span class="status">Completed</span>
{% endif %}
</li>
<li>Read and accept our legal terms.
{% if agreedToTerms %}
{{ govukTag({
text: "Completed"
}) }}
<span class="status">Completed</span>
{% endif %}
</li>
</ol>
Expand Down
2 changes: 1 addition & 1 deletion app/views/services/_service-section.njk
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
{{ service.name }}
{% if service.isWorldpayTestService %}
{{govukTag({
text: "Worldpay test service",
text: "WORLDPAY TEST SERVICE",
classes: "govuk-tag--grey"
})}}
{% endif %}
Expand Down
2 changes: 1 addition & 1 deletion app/views/services/_service-switch.njk
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
{% endif %}
</button>
{% if account.provider_switch_enabled and service.isAdminUser %}
<strong class="govuk-tag govuk-tag--blue service-info--tag">switch PSP</strong>
<strong class="service-info--tag govuk-tag govuk-tag--blue">switch PSP</strong>
{% endif %}
</form>
</li>
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
document.getElementById('bank-account-form').addEventListener('submit', function () {
submitButton.setAttribute('disabled', 'true')
submitButton.setAttribute('aria-disabled', 'true')
submitButton.setAttribute('class', 'govuk-button govuk-button--disabled')
submitButton.textContent = "Saving..."
})
Expand Down
6 changes: 3 additions & 3 deletions app/views/switch-psp/switch-psp.njk
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
</span>

{% if not item.enabled and not item.complete %}
<strong class="govuk-tag app-task-list__tag govuk-tag--grey" id="{{ label }}-status">Cannot start yet</strong>
<strong class="govuk-tag app-task-list__tag govuk-tag--grey" id="{{ label }}-status">cannot start yet</strong>
{% elif item.enabled and not item.complete %}
<strong class="govuk-tag app-task-list__tag govuk-tag--grey" id="{{ label }}-status">Not started</strong>
<strong class="govuk-tag app-task-list__tag govuk-tag--grey" id="{{ label }}-status">not started</strong>
{% elif item.complete %}
<strong class="govuk-tag app-task-list__tag" id="{{ label }}-status">Completed</strong>
<strong class="govuk-tag app-task-list__tag" id="{{ label }}-status">completed</strong>
{% endif %}
</li>
{% endmacro %}
Expand Down
2 changes: 1 addition & 1 deletion app/views/transaction-detail/index.njk
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
{% if contextIsAllServiceTransactions %}
{% set pageTitleBreadcrumbWithTag %}
<span>Transactions for all services</span>
<strong class="govuk-tag govuk-tag--grey service-info--tag">{{ "Live" if live else "Test" }}</strong>
<strong class="service-info--tag govuk-tag govuk-tag--grey">{{ "LIVE" if live else "TEST" }}</strong>
{% endset %}
{{ breadcrumbs([
{ text: "My services", href: routes.serviceSwitcher.index },
Expand Down
2 changes: 1 addition & 1 deletion app/views/transactions/filter.njk
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@
{% endif %}
<div class="govuk-grid-column-full">
<div class="govuk-grid-column-one-half">
<details class="govuk-details" {{ detailsElementOpenHtml }}>
<details class="govuk-details" data-module="govuk-details" {{ detailsElementOpenHtml }}>
<summary class="govuk-details__summary">
<span class="govuk-details__summary-text">
Advanced filters
Expand Down
4 changes: 2 additions & 2 deletions app/views/transactions/index.njk
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
{% if allServiceTransactions %}
{% set pageTitleBreadcrumbWithTag %}
<span>Transactions for all services</span>
<strong class="govuk-tag govuk-tag--grey service-info--tag ">{{ "Live" if filterLiveAccounts else "Test" }}</strong>
<strong class="service-info--tag govuk-tag govuk-tag--grey">{{ "LIVE" if filterLiveAccounts else "TEST" }}</strong>
{% endset %}
{{ breadcrumbs([
{ text: "My services", href: routes.serviceSwitcher.index },
Expand Down Expand Up @@ -62,7 +62,7 @@
<h1 class="govuk-heading-l">
{% if allServiceTransactions %}
Transactions for all services
<strong class="govuk-tag govuk-tag--grey">{{ "Live" if filterLiveAccounts else "Test" }}</strong>
<strong class="govuk-tag govuk-tag--grey">{{ "LIVE" if filterLiveAccounts else "TEST" }}</strong>
{% else %}
Transactions
{% endif %}
Expand Down
2 changes: 1 addition & 1 deletion app/views/transactions/paginator.njk
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<input type="hidden" name="page" value="{{paginationLink.pageNumber}}"/>
<input type="hidden" name="pageSize" value="{{filters.pageSize}}"/>

<button class="pagination {{paginationLink.pageName}} {% if paginationLink.activePage %}active{% endif %}" {% if paginationLink.disabled %} disabled {% endif %} type="submit">
<button class="pagination {{paginationLink.pageName}} {% if paginationLink.activePage %}active{% endif %} {% if paginationLink.disabled %}govuk-button--disabled {% endif %}" {% if paginationLink.disabled %} disabled="disabled" {% endif %} type="submit">
<span class="govuk-visually-hidden">Results page </span>{{paginationLink.pageName}}
</button>
</form>
Expand Down
2 changes: 1 addition & 1 deletion app/views/webhooks/_paginator.njk
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<input type="hidden" name="page" value="{{paginationLink.pageNumber}}"/>
<input type="hidden" name="status" value="{{status}}"/>

<button class="pagination {{paginationLink.pageName}} {% if paginationLink.activePage %}active{% endif %}" {% if paginationLink.disabled %} disabled {% endif %} type="submit">
<button class="pagination {{paginationLink.pageName}} {% if paginationLink.activePage %}active{% endif %} {% if paginationLink.disabled %}govuk-button--disabled {% endif %}" {% if paginationLink.disabled %} disabled="disabled" {% endif %} type="submit">
<span class="govuk-visually-hidden">Results page </span>{{paginationLink.pageName}}
</button>
</form>
Expand Down
2 changes: 1 addition & 1 deletion app/views/webhooks/message.njk
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
}) }}

<div class="govuk-body">
<details class="govuk-details">
<details class="govuk-details" data-module="govuk-details">
<summary class="govuk-details__summary">
<span class="govuk-details__summary-text">{{ messageType }} event body</span>
</summary>
Expand Down
6 changes: 3 additions & 3 deletions app/views/your-psp/_stripe.njk
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
<div class="govuk-grid-column-one-third">
<span>
{% if not item.enabled and not item.completed %}
<strong class="govuk-tag govuk-tag--grey" id="{{ id }}-status">Cannot start yet</strong>
<strong class="govuk-tag govuk-tag--grey" id="{{ id }}-status">cannot start yet</strong>
{% elif item.enabled and not item.completed %}
<strong class="govuk-tag govuk-tag--grey" id="{{ id }}-status">Not started</strong>
<strong class="govuk-tag govuk-tag--grey" id="{{ id }}-status">not started</strong>
{% elif item.completed %}
<strong class="govuk-tag" id="{{ id }}-status">Completed</strong>
<strong class="govuk-tag" id="{{ id }}-status">completed</strong>
{% endif %}
</span>
</div>
Expand Down
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
"express": "4.21.1",
"express-validator": "^7.2.0",
"google-libphonenumber": "3.2.33",
"govuk-frontend": "^5.7.1",
"govuk-frontend": "^4.8.0",
"http-proxy": "1.18.x",
"https-proxy-agent": "5.0.1",
"joi": "17.12.1",
Expand Down
6 changes: 3 additions & 3 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ function initialiseGlobalMiddleware (app) {
if (process.env.DISABLE_REQUEST_LOGGING !== 'true') {
app.use(/\/((?!public|favicon.ico).)*/, loggingMiddleware())
}
app.use(favicon('node_modules/govuk-frontend/dist/govuk/assets/images/favicon.ico'))
app.use(favicon('node_modules/govuk-frontend/govuk/assets/images/favicon.ico'))
app.use(staticify.middleware)

app.use(function (req, res, next) {
Expand Down Expand Up @@ -99,7 +99,7 @@ function initialiseTemplateEngine (app) {
// Configure nunjucks
// see https://mozilla.github.io/nunjucks/api.html#configure
const nunjucksEnvironment = nunjucks.configure([
'node_modules/govuk-frontend/dist/',
'node_modules/govuk-frontend/',
'app/views'
], {
express: app, // the express app that nunjucks should install to
Expand Down Expand Up @@ -135,7 +135,7 @@ function initialiseTemplateEngine (app) {

function initialisePublic (app) {
app.use('/public', express.static('public'))
app.use('/', express.static('node_modules/govuk-frontend/dist/govuk'))
app.use('/', express.static('node_modules/govuk-frontend/govuk'))
}

function initialiseRoutes (app) {
Expand Down
2 changes: 1 addition & 1 deletion test/cypress/integration/agreements/agreement.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ describe('Agreement detail page', () => {
cy.get('[data-cy=agreement-detail]').find('dt').eq(1).contains('Reference')
cy.get('[data-cy=agreement-detail]').find('dd').eq(1).contains('valid-reference')
cy.get('[data-cy=agreement-detail]').find('dt').eq(2).contains('Status')
cy.get('[data-cy=agreement-detail]').find('dd').eq(2).contains('Active')
cy.get('[data-cy=agreement-detail]').find('dd').eq(2).contains('active')
cy.get('[data-cy=agreement-detail]').find('dt').eq(3).contains('Description')
cy.get('[data-cy=agreement-detail]').find('dd').eq(3).contains("Reason shown to paying user for taking agreement <script>console.log('AGREEMENT')</script>")
cy.get('[data-cy=agreement-detail]').find('dt').eq(4).contains('Date created')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ describe('All service transactions without automatic search', () => {
cy.get('.govuk-breadcrumbs').within(() => {
cy.get('.govuk-breadcrumbs__list-item').should('have.length', 2)
cy.get('.govuk-breadcrumbs__list-item').eq(1).contains('Transactions for all services')
cy.get('.govuk-breadcrumbs__list-item').eq(1).find('.govuk-tag').should('have.text', 'Live')
cy.get('.govuk-breadcrumbs__list-item').eq(1).find('.govuk-tag').should('have.text', 'LIVE')
})

cy.get('.transactions-list--row').should('have.length', 0)
Expand All @@ -92,7 +92,7 @@ describe('All service transactions without automatic search', () => {
cy.get('.govuk-breadcrumbs').within(() => {
cy.get('.govuk-breadcrumbs__list-item').should('have.length', 2)
cy.get('.govuk-breadcrumbs__list-item').eq(1).contains('Transactions for all services')
cy.get('.govuk-breadcrumbs__list-item').eq(1).find('.govuk-tag').should('have.text', 'Test')
cy.get('.govuk-breadcrumbs__list-item').eq(1).find('.govuk-tag').should('have.text', 'TEST')
})

cy.get('.transactions-list--row').should('have.length', 2)
Expand Down
Loading

0 comments on commit 65e3e45

Please sign in to comment.