Commit Graph

7723 Commits

Author SHA1 Message Date
Chris Hill-Scott
c8fe1fc715 Merge pull request #2937 from alphagov/heading-rationalisation
Rationalise heading sizes and ‘Back’ links
2019-04-30 15:51:50 +01:00
Chris Hill-Scott
8ad58d641c Fix vertical position of ‘Manage’ link
This doesn’t line up now that the heading sizes have changed.
2019-04-30 15:30:31 +01:00
Chris Hill-Scott
d9da63401f Normalise heading sizes
Since we added template folders the templates page has had a ‘medium’
sized heading, where other pages have stuck with a ‘large’ size.

This commit rationalises the decision around which pages have which
heading size:
- ‘navigation’ pages (eg templates, team members, email reply to
  addresses) have medium sized headings
- transactional pages (ie ones which have a green button) keep the
  larger heading size
2019-04-30 15:30:31 +01:00
Chris Hill-Scott
75bbf4f45c Remove back link arguments to page footer
We’ve stopped using them in favour of putting any ‘back’ link at the top
of the page. This commit removes them from the macro to make sure we
don’t accidentally reintroduce them.
2019-04-30 15:29:40 +01:00
Chris Hill-Scott
0f449087e8 Increase hit area of back link
The GOV.UK Design System back link component is sized (roughly) to the
contain the text and icon. Presumably this is so it’s safe to use in
various contexts.

Since we have control over the context is which it’s used, we can get
away with making the click area larger – in accordance with Fitt’s law –
without risking overlapping other page elements.
2019-04-30 15:29:40 +01:00
Chris Hill-Scott
74fb30ce5f Add GOV.UK Design System style back links
The Design System has standardised on back links being at the top of the
page, decorated with a small text-coloured arrow.

I think this makes more sense than having them at the bottom, because it
suggests, in some way, being able to go back before commiting to any of
the forms on the page. Whereas the things at the bottom of the page
should be performing actions on what’s in the page.

The reason for making this change now is that it de-clutters the area
around the green buttons. This was presenting a design challenge where
multiple levels of interaction were happening in the same form. Moving
these back links to the top of the page should mean that, in these
complicated forms, there’s one fewer thing to compete for the user’s
attention.

I’ve componentised this into a `page_header` macro so that the change is
easier to roll out and maintain.
2019-04-30 15:29:39 +01:00
Chris Hill-Scott
a97956e571 Merge pull request #2939 from alphagov/new-service-button
Make ‘Add a new service’ a button
2019-04-30 15:28:35 +01:00
Chris Hill-Scott
3cfe4740fb Make ‘Add a new service’ a button
This, along with putting it in a sticky footer, makes it consistent with
the ‘Add template’ and ‘Invite team member’ buttons.
2019-04-30 15:08:40 +01:00
Chris Hill-Scott
98107df0a4 Merge pull request #2940 from alphagov/org-settings-table
Make organisation settings column width consistent
2019-04-30 14:58:34 +01:00
Chris Hill-Scott
c1781ccedb Make organisation settings column width consistent
To match 9e238a4f87/app/templates/views/service-settings.html (L13)
2019-04-30 13:46:04 +01:00
Chris Hill-Scott
9e238a4f87 Merge pull request #2923 from alphagov/dont-ask-org-type
Don’t ask for organisation type when we know it
2019-04-30 11:22:21 +01:00
Chris Hill-Scott
0f2f9fa946 Merge pull request #2931 from alphagov/rationalise-settings
Allow more space for values in settings tables
2019-04-29 16:58:24 +01:00
Chris Hill-Scott
0512f40ad3 Fix misleading class name
Not sure where this came from, but visually our tables have always
aligned text to the left by default.
2019-04-29 16:36:47 +01:00
Chris Hill-Scott
5340c4c2e8 Prefer CSS-native first child selector
This fits nicer with the block below and with the CSS further down that
applies certain styles for the first cell using `:first-child` too.
2019-04-29 16:25:06 +01:00
Chris Hill-Scott
68f5b58f9d Merge pull request #2935 from alphagov/secondary-not-necessary
Remove secondary and tertiary button styles
2019-04-29 13:22:45 +01:00
Chris Hill-Scott
a1025111d9 Allow overflow on right-aligned table cells
The right aligned cells contain ‘Change’ links. These have a large
`border` to make the clickable area bigger. This commit removes the
`overflow: hidden` from these cells, so that the larger border remains
visible.
2019-04-26 11:43:41 +01:00
Katie Smith
83ece1cda0 Merge pull request #2926 from alphagov/fix-changing-users-email
Allow non-gov email addresses to be changed to gov email addresses
2019-04-26 10:11:16 +01:00
Katie Smith
bf4eae8b61 Merge pull request #2933 from alphagov/bump-utils
Bump utils to 31.2.5
2019-04-26 10:10:45 +01:00
Chris Hill-Scott
bb19617bb1 Remove secondary and tertiary button styles
We don’t use them anywhere (at least not the definitions in this
stylesheet).
2019-04-25 17:16:14 +01:00
Katie Smith
b9648d3129 Bump utils to 31.2.5 2019-04-25 11:13:48 +01:00
Katie Smith
d689b031a2 Allow non-gov email addresses to be changed to gov email addresses
When a user's email address is updated, we not allowing it to be changed
to a non-government email address. We now allow a non-gov email address
to be changed to another non-gov email address. Government email
addresses still cannot be changed to non-government email addresses.

Also fixes the link in the error message on the ChangeEmailAddress form -
this was being escaped before.
2019-04-25 10:36:04 +01:00
Katie Smith
33aa16661e Delete unused form 2019-04-25 10:36:04 +01:00
Chris Hill-Scott
da19c0b4ad Remove bullets from lists in tables
I think this is something we inherited from the Digital Marketplace
code. We only use this for organisation settings are the moment, but
the list markers are redundant because each item will never wrap onto a
new line; it will truncate instead. Still keeps a little sliver of
spacing just so it doesn’t look like a paragraph.
2019-04-24 16:11:32 +01:00
Chris Hill-Scott
d3caaf94b1 Make archive/suspend links not buttons
They don’t immediately perform an action, so semantically they are
links, not buttons.
2019-04-24 16:11:32 +01:00
Chris Hill-Scott
7c8ce6c62a Make platform admin settings table body copy size
No reason why it should be smaller and harder to read than the
user-facing settings table.
2019-04-24 16:11:32 +01:00
Chris Hill-Scott
5ac2abb7bc Make center column of table wider
Most of the content of our ‘settings’ tables is in the value, not the
key. The value is in the middle column. So we should allocate the most
space to the value.

The previous layout was based on the premise that most pages divided the
grid like this:
```
 _______ _______ _______ _______ _______ _______ _______ _______
|  1/8  |  1/8  |  1/8  |  1/8  |  1/8  |  1/8  |  1/8  |  1/8  |
|               |               |               |               |
|      2/8      |      2/8      |      2/8      |      2/8      |
|               |               |               |               |
|–Navigation––––|–Main column–––––––––––––––––––––––––––––––––––|
|               |                       |                       |
|               |          3/8          |          3/8          |
|               |                       |                       |
|               |–Label–––––––––––––––––|–Value––––––––––––Link–|
|               |                       |                       |
|_______________|_______________________|_______________________|
```

This was because a lot of pages had a left column for emails, and a
right column for text messages, so it felt consistent for tables to
always default to 50% of the width of the main column.

This consistency has faded with time, especially as we added letters.

So this commit changes these tables to allocate more space to the
central column, but still sticking to the grid like this:

```
 _______ _______ _______ _______ _______ _______ _______ _______
|  1/8  |  1/8  |  1/8  |  1/8  |  1/8  |  1/8  |  1/8  |  1/8  |
|       |       |       |       |       |       |       |       |
|      2/8      |      2/8      |              4/8              |
|               |               |                               |
|–Navigation––––|–Main column–––––––––––––––––––––––––––––––––––|
|               |               |                       |       |
|               |      2/8      |          3/8          |  1/8  |
|               |               |                       |       |
|               |–Label–––––––––|–Value–––––––––––––––––|–––Link|

|_______________|_______________|_______________________|_______|
```

Since there’s more space to display the value of a setting this commit
also truncates settings that are too long to fit in the width of the
column (for example a long email address) rather than the previous
behaviour of truncating them. This all just makes things look a bit
cleaner.
2019-04-24 16:11:32 +01:00
Tom Byers
b77b427ed8 Merge pull request #2930 from alphagov/fix-gulp-watch
Make watch task work with new Gulp API
2019-04-24 14:58:59 +01:00
Tom Byers
2eab320fe3 Merge pull request #2912 from alphagov/add-jest-framework
Add Jest framework for testing JavaScript
2019-04-24 14:02:09 +01:00
Tom Byers
47be667590 Make watch task work with new Gulp API
Gulp changed its API in version 4.0. The watch
task was not updated to the new format when we
moved to this version.

This moves the watch task to the new format.
2019-04-24 13:27:26 +01:00
Chris Hill-Scott
6d9554c395 Merge pull request #2929 from alphagov/remove-unused-method
Remove unused method
2019-04-24 13:23:23 +01:00
Chris Hill-Scott
f726551714 Remove unused method
We use `.get_free_sms_fragment_limit_for_year()` instead, which
functionally is the same thing (has a default argument of `year=None`).
2019-04-24 13:10:41 +01:00
Tom Byers
b11ab2c384 Remove peer dependencies
Peer dependencies are defined by projects intended
to be used by other projects (ie, libraries).

This doesn't apply to this project so removing the
peer dependencies field.

I'm also not sure why the `request` dependency was
there as it isn't a peer dependency of any of the
packages that use it in this project's dependency
tree.
2019-04-24 11:26:55 +01:00
Tom Byers
1f948cc0b4 Run Jest along with other JS tests 2019-04-24 10:46:55 +01:00
Tom Byers
00c1ebf02a Add test for autofocus.js
One of the simplest of our JavaScript files to
test how difficult this is.

Answer is not too bad and includes the file
needing a DOM to operate on and jQuery in the
global scope.
2019-04-24 10:46:55 +01:00
Tom Byers
2e558744a5 Add Jest and peer dependencies 2019-04-24 10:46:55 +01:00
Chris Hill-Scott
4ba1015c64 Merge pull request #2928 from alphagov/make-live-request-no-org
Don’t error if service without an organisation requests to go live
2019-04-23 16:55:42 +01:00
Chris Hill-Scott
9c846979be Don’t error if service without an organisation requests to go live
It was trying to look at `organisation.domains`, which caused an
`AttributeError` if there wasn’t an organisation.
2019-04-23 16:48:15 +01:00
Chris Hill-Scott
55a3a244d7 Merge pull request #2917 from alphagov/record-user-that-requested-to-go-live
Update service with the user that requested to go live.
2019-04-23 15:46:50 +01:00
Chris Hill-Scott
9f1bc285fa Merge branch 'master' into record-user-that-requested-to-go-live 2019-04-23 15:38:44 +01:00
Chris Hill-Scott
4b14ab748f Merge pull request #2927 from alphagov/officeforstudents.org.uk
Added officeforstudents.org.uk to email domains
2019-04-23 11:21:18 +01:00
Pete Herlihy
fc24509fd2 Added officeforstudents.org.uk to email domains 2019-04-23 11:12:14 +01:00
Leo Hemsted
28919742da Merge pull request #2925 from alphagov/manifest-quoting
ensure env vars in manifest are quoted
2019-04-18 15:23:12 +01:00
Leo Hemsted
9f10cd0b82 ensure env vars in manifest are quoted
if they're not defined in the credentials file, they should be an empty
string, rather than null.
2019-04-18 15:14:32 +01:00
Leo Hemsted
b5972fc2b9 Merge pull request #2924 from alphagov/cf-app
default CF_APP to notify-admin
2019-04-18 15:00:14 +01:00
Leo Hemsted
4b386d36ef default CF_APP to notify-admin
(it's overriden in the calls to generate-manifest for the prototypes)
2019-04-18 14:48:23 +01:00
Chris Hill-Scott
08e9b35d7a Don’t ask for organisation type when we know it
Every time someone adds a new service we ask them what kind of
organisation they work for.

We can look this up based on the user’s email address now. So we should
only ask the question if:
- we don’t know about the organisation
- or we haven’t set what type of organisation it is (this shouldn’t be
  possible on productions because we’ve populated the column for all
  existing organisations and it’s impossible to add a new one without
  setting it
2019-04-18 14:08:13 +01:00
Leo Hemsted
c0909db4b2 Merge pull request #2909 from alphagov/single-app-manifest
move manifest to single jinja template
2019-04-18 13:52:36 +01:00
Leo Hemsted
d96f76585c Merge pull request #2910 from alphagov/unpin-runtime
unpin patch version of python
2019-04-18 13:52:25 +01:00
Chris Hill-Scott
7beea0b2ac Merge pull request #2922 from alphagov/features-footer-second-pass
Features and footer updates
2019-04-18 13:17:16 +01:00
Chris Hill-Scott
aa16e1f2ce Add tests to make sure static pages render
This will catch if we accidentally break them by adding a `url_for` that
references a non-existant endpoint or something like that.
2019-04-18 13:06:39 +01:00