Commit Graph

368 Commits

Author SHA1 Message Date
Chris Hill-Scott
c32dbae8e9 Remove icons
We don’t use them anywhere, and removing this include should save a bit
of file size in the compiled CSS.
2017-05-17 08:56:11 +01:00
Chris Hill-Scott
fe5343e2c6 Remove duplicate include
This file is included again two lines below.
2017-05-17 08:55:50 +01:00
Chris Hill-Scott
3829002d65 Merge pull request #1261 from alphagov/wrap-email-meta
Make meta email preview meta info wrap nicely
2017-05-05 14:10:42 +01:00
Chris Hill-Scott
9be17bd728 Make meta email preview meta info wrap nicely
Because the email addresses can get pretty long, and have no spaces in
them, they sometimes break out of their containing box. This looks messy
and causes horizontal scrolling.
2017-05-03 15:12:25 +01:00
Chris Hill-Scott
d1cd74daa8 Update utils with to make letters unclickable
Brings in:
- [ ] https://github.com/alphagov/notifications-utils/pull/159

Means:
- renaming a bunch of things
- removing any CSS that targeted the link, and making it target the
  containing element too
2017-05-03 12:20:45 +01:00
Chris Hill-Scott
38eac48e7d Merge pull request #1248 from alphagov/fix-ghost-radio
Fix ghost radio button on API key page
2017-04-27 09:52:12 +01:00
Chris Hill-Scott
e247de6b00 Fix ghost radio button on API key page
I think the `opacity: 0.5` is a hangover from when the browser default
radio buttons were visible on the page – before the new radios and
checkboxes.
2017-04-26 13:04:35 +01:00
Chris Hill-Scott
e9754e92df Add a back button to the scheduler
We’ve seen in research a user getting stuck playing with the
scheduler. They picked a day, but then didn’t want to choose one of the
options for that day. There’s no way to do this except pick a day and
then un-pick it.

What they ended up doing was clicking the grey back button, which took
them back to the previous page, making them upload their file again.

This commit adds a ‘back’ link for the scheduler. ‘Back’ seems like
sensible naming because that’s the thing that the user tried to click,
and the UI of a link matches the thing they clicked to get into this
situation.
2017-04-26 11:36:45 +01:00
Chris Hill-Scott
d731de6edf Fix the focus handling on the scheduler
This got broken when we removed the old GOV.UK Selection Buttons
javascript in a592898eff
2017-04-26 11:34:39 +01:00
Chris Hill-Scott
cf80d0da26 Make position of letter edit links absolute
Previously they were relative (ie percentages). This made sure that they
worked on mobile, when the letter might be narrower.

However it broke when the preview was more than one page, because
13% of the height of 2 pages is different to 13% of the height of one
pages.

This commit changes the positions to be pixel values, which match the
calculated percentage values when the preview is one page.
2017-04-25 16:01:14 +01:00
Chris Hill-Scott
38fbc3c47d Merge pull request #1235 from alphagov/fix-button-padding-product-page
Fix button padding on the product page
2017-04-20 15:18:20 +01:00
Chris Hill-Scott
baa2ff9332 Fix button padding on the product product-page
It’s uneven ever since we upgraded the toolkit. Guess it’s probably
allowing space for an arrow image. But I don’t like the arrow image
because it looks like it’s pointing at the ‘or sign in’ link.

So this commit overrides the button’s default spacing.
2017-04-20 15:03:38 +01:00
Chris Hill-Scott
ac948ceb19 Make delete link flush left when there’s no button
The delete link was designed to be used with a button, where it needs
some padding to separate it from the button.

We now have a case where it’s being used without an accompanying button,
so we need a variation without that padding.
2017-04-18 13:49:01 +01:00
Chris Hill-Scott
685cce37bf Remove ‘mode’ banner type
No longer used anywhere.
2017-04-12 09:58:47 +01:00
Chris Hill-Scott
7fcabbc0e6 Add hover state for new radio select styles
Because they look like links, they should have all the clicking
affordance of links.
2017-04-11 17:22:44 +01:00
Chris Hill-Scott
bde140f560 Fix overlapping UI with new radio buttons
Not sure what about the new radios is causing this, but they no longer
expand the size of the container, causing an overlap.

The fixed height was originally for performance reasons, but removing
it doesn’t seem to cause the page to jump around on load, so I think
it’s OK.
2017-04-11 17:05:02 +01:00
Chris Hill-Scott
53b10f14f6 Merge pull request #1222 from alphagov/toolkit-upgrade
Upgrade GOV.UK Template, Frontend Tookit, and Elements
2017-04-11 14:03:08 +01:00
Chris Hill-Scott
f7f0128f0c Remove button padding override
Not sure why we were doing this. But as part of the Elements upgrade
our back buttons got bigger (because they weren’t constrained by the
line in our `app.scss`) but any green submit buttons stayed smaller in
height, so didn’t line up.

This commit removes the override, so all buttons have the size that
Elements intended.
2017-04-10 14:54:28 +01:00
Chris Hill-Scott
8d5af47620 Change class names for validation errors in html
Implements the class name changes detailed in:
https://github.com/alphagov/govuk_elements/pull/405
2017-04-10 14:54:27 +01:00
Chris Hill-Scott
87c81c994f Ensure disabled radio buttons are still legible
The Elements CSS was making the `label` and `input` of disabled radio
buttons `opacity: 0.5`. This was resulting in text that was:
- too pale, especially where we were nesting 16px ‘hint’ text inside the
  label
- waaaay too pale when inside a link inside the label

This commit overrides elements to dim the disabled radio button by
making it’s text colour grey, rather than making the whole thing
semi-transparent.
2017-04-10 14:54:27 +01:00
Chris Hill-Scott
a592898eff Make radio select work w/ new checkboxes/radios
The visual appearance of radio and checkbox form inputs changed in
GOV.UK Elements here:

https://github.com/alphagov/govuk_elements/pull/296

This was subsequently reimplemented with different markup and no
Javascript here:
https://github.com/alphagov/govuk_elements/pull/406

This has meant making the following changes to our app:
- changing the markup in our radio/checkbox macros to match the example
  markup given by GOV.UK Elements
- removing the previous Javascript file because it’s no longer needed to
  make the radios appear visual selected
- making the buttons on the scheduled job picker look like links,
  because the grey button style looked weird with the new radio buttons
2017-04-10 14:18:12 +01:00
Chris Hill-Scott
31d03acc11 Remove external link styling
The external link icon, and associated mixin, were deprecated in
https://github.com/alphagov/govuk_frontend_toolkit/pull/293

This means we can’t and shouldn’t use them any more.
2017-04-10 14:16:45 +01:00
Chris Hill-Scott
e62bd2a018 Remove override to make beta banner blue
Previously the beta bar was orange, which we didn’t want. So we wrote
some SASS to make it blue.

Now that GOV.UK Frontend Toolkit makes it blue, we can remove this SASS.

See https://github.com/alphagov/govuk_frontend_toolkit/pull/370
2017-04-10 14:14:53 +01:00
Chris Hill-Scott
80898e350e More tweaks to width of elements
- SMS message preview gets slightly wider so it lines up with a 4/8
  column
- Edit email box gets wider to match more closely the width of the
  previewed and delivered emails
2017-04-10 10:28:27 +01:00
Chris Hill-Scott
0ba7d11097 Fix alignment of edit letter links
Not sure how these got out of line (maybe when we brought the date into
the left-hand text area). But this commit updates the percentages to
match the comments.

This is so it’s clear from the position of the link which part of the
letter you’re editing.
2017-04-10 09:29:26 +01:00
Chris Hill-Scott
7904256bce Increase width of edit letter textbox
The textbox we use for editing letters is the same size as that for
email and text messages.

This is problematic because:
- it feels quite cramped – letters will often be longer than emails or
  text messages
- it has a narrower line length than the printed letters (which is a
  constant, unlike for emails and text messages)

The printed letters have a line length of 137.5mm and a font size of
12.5pt.

137.5mm = 5.41 inches = 389.7pt line length

389.7pt/12.5pt = 31.8em

So we could make the box 31.8em wide, but then it wouldn’t align to our
grid.

Our grid splits the page into quarters initially because this is how
wide the navigation is. So this means that we can use grid units of
1/multiples of four, eg 1/4, 1/8, 1/12, 1/16, etc. But the smaller the
denominator, the less effective the grid will be – it gets closer to no
grid at all.

After having a play around, 5/8 of the page looks closest to 31.8em.
Since the main column of the page is 3/4, we set a column of 5/6 width
inside that, which equals 5/8 of the total page.
2017-04-10 09:06:15 +01:00
Chris Hill-Scott
8a4c8526fa Use 19px not 16px type in more places
Making the navigation narrower means that we have more space on every
page. So on pages where we had to use 16px type just to fit stuff on the
page we can now bump the type size up to something less miserly. This is
mainly the team and settings pages.

We still need to use 16px on pages which list notifications or previews
of spreadsheets, because we’re still trying to fit a lot of information
onto these pages, so every little space-saving helps.
2017-03-20 11:59:12 +00:00
Chris Hill-Scott
89d3a116b9 Put versions at bottom of single template page
Like the template ID this is an infrequently-used action on a template
and doesn’t belong at the same level as ‘Upload recipients’ or
‘Send yourself’ a test. We don’t think it’s information that’s useful to
working out which template you want to interact with, so it shouldn’t be
on the choose template page any more.
2017-03-20 11:57:11 +00:00
Chris Hill-Scott
1bfa302fce Add a border around the email template
The email looks a lot like the normal content of a page (black on white
text, same font, rendered by the browser). It needed differentiating
visually.

This commit adds a border and spacing around the email to separate it
from the things on the page that you’re supposed to be interacting with.
2017-03-20 11:53:49 +00:00
Chris Hill-Scott
cf4a19e979 Add a loading indicator to the letter preview
Letter previews take a few seconds to load.

Good to let the user know that something is happening and that they
should wait.
2017-03-20 11:49:58 +00:00
Chris Hill-Scott
846f9913fa Remove the cheesy skeumorphism from letter preview
This isn’t needed any more because:

- we’re moving toward not clicking the letter to preview it, so there’s
  no need for a (not very intuitive) indication that it’s clickable

- we’re not showing letter templates on the same page as email and text
  message templates, so there’s less need to visually differentiate them
  (which also worked to limited effect)
2017-03-20 11:48:56 +00:00
Chris Hill-Scott
05fca0536c Make letter full-height and increase resolution
Previously we only showed the top half of a letter template, in order
to conserve space and fit multiple letter templates on one page. Now
that we have only one template per page there is space to spare. So
this commit changes the letter preview to show the full height of the
A4 page.

This also requires increasing the resolution at which the preview is
rendered so that it still looks clean at the bigger size.
2017-03-20 11:47:31 +00:00
Chris Hill-Scott
dfcfe6a91e Add multiple ‘edit’ links for letter templates
Letter templates have (or will have) multiple different editable
regions. I think that the most intuitive way for this to work is to have
- an edit link for each of these areas
- positioned next to the thing to be edited

Again, this isn’t fully hooked up, but since no-one is using letters
live yet this is a good way of getting research feedback and pointing
towards where we want the feature to go.

Uses percentages for the positioning so that the alignment is maintained
on mobile.
2017-03-20 11:45:27 +00:00
Chris Hill-Scott
f3c7a167df Add find-as-you-type on the choose template page
Not everyone knows how to use `ctrl` + `f`, and it’s not scoped to
just the list of templates.

The template you want to work with is often not the first one in the
list, but ordering by created at is useful for other reasons (mainly
around first time use).

This commit adds a find as you type control which aims to give users a
quick way of getting to the template they want to work with.
2017-03-20 11:40:19 +00:00
Chris Hill-Scott
a762e8173f Merge pull request #1196 from alphagov/remove-unwanted-sass
Remove unwanted SASS
2017-03-20 11:28:09 +00:00
Chris Hill-Scott
84ef532b9a Remove unwanted SASS
None of this SASS is used by the app any more. But we’re still shipping
it to every user. Let’s save some filesize by not doing so.
2017-03-20 10:20:09 +00:00
Chris Hill-Scott
4a226a7a29 Show template usage broken down by month
This follows on from:
- https://github.com/alphagov/notifications-admin/pull/1094
- https://github.com/alphagov/notifications-admin/pull/1109

It depends on:
- [ ] https://github.com/alphagov/notifications-api/pull/829

A year is too long. Month-by-month is a better timeframe for making
decisions or seeing patterns in your usage.
2017-03-16 14:04:37 +00:00
Chris Hill-Scott
494b6958b5 Make ‘by month’ heading bold on usage
So that it has the same visual weight as the other headings of the same
level (ie ‘Emails’ and ‘Text messages’).
2017-03-06 14:56:41 +00:00
Chris Hill-Scott
8913a7be13 Fix button spacing on mobile
The buttons overlapped. Got picked up in the service assessment design
review.
2017-03-03 14:25:15 +00:00
Chris Hill-Scott
f53127c54f Fix spacing with heading/banner combination
Our CSS adjusts the spacing for the first `.heading-large` on the page
so that it aligns with the navigation. This doesn’t work when something
else comes first on the page, like a notification banner.

But since we only ever user `.heading-large` for the `<h1>`, and there
should only be one `<h1>` on the page we can just change the spacing
for _all_ `<h1>`s.
2017-02-23 10:39:26 +00:00
Chris Hill-Scott
e3dd8fd018 Make proposition image meet colour contrast
The message text in our previous illustration was white on light blue,
which didn’t meet WCAG AA colour contrast. WCAG AA requires a contrast
ratio of 4.5:1. The text in our image was only 3.8:1.

The text in this new image has a contrast ratio of 19.8:1, so easily
passes WCAG AAA.

Required a slight tweak to the positioning of the image because it’s
dimensions weren’t exactly the same as the previous one.
2017-02-20 09:32:49 +00:00
Chris Hill-Scott
008b9b4cef Make template usage graph take up 100% of width
The bars were sitting in a table cell with some right padding, so they
never extended all the way to the right. Making it right-aligned removes
this padding, then setting the text to left aligned keeps things looking
the same.
2017-02-15 13:24:21 +00:00
Chris Hill-Scott
562a93b9b1 Merge pull request #1129 from alphagov/aria-tabs-pill-navigation
Mark up ‘pill’ component as being tabs
2017-02-15 13:16:30 +00:00
Chris Hill-Scott
f64c241a97 Merge pull request #1127 from alphagov/skiplink-product-page
Fix missing skiplink target on product page
2017-02-15 13:16:07 +00:00
Chris Hill-Scott
2ecfc2bb80 Fix invalid nesting of HTML elements
In HTML you generally can’t nest an inline level element inside a block
level one, if you want your HTML to validate.

There were a couple of places where we were using a `<span>` as a
containing element:
- inside every table cell (think we inherited this from Digital
  Marketplace)
- in the ‘pill’ navigation component for the selected tab

This meant that when we put components like big number inside these,
the resulting HTML was invalid, because big number is built with a bunch
of `<div>`s, which are block level.

This commit removes the use of a `<span>` tag in these places, and
replaces it with a `<div>`. Nesting block level elements in fine in
HTML.
2017-02-14 15:19:08 +00:00
Chris Hill-Scott
3e89baf117 Mark up ‘pill’ component as being tabs
Currently it’s not possible for a screen reader user to know which
financial year they’re looking at. From the accessibility report:

> The financial year links are contained in a navigation region -
> tabbing or arrowing through only reads out the links, not the main
> information of "2016 to 2017 financial year" - that information is
> vital for understanding the page content.

This problem also applies to other pages which use the `pill` component,
which is effectively tabbed navigation (that reloads the page rather
than showing or hiding content on the page).

There are specific ARIA attributes that can be used to mark up a
navigation as being tabbed. This commit:

- adds those attributes
- makes the selected ‘tab’ visible to screenreaders and keyboard
  focusable
- adds a visual focus indicator to the selected tab
- adds `id`s to the parts of the page that are controlled by the tabs so
  that they are labelled as such

This also means changing the pill component from being a `<nav>` to a
`<ul>` because `tablist` is not a valid `role` for a `nav`.

Mostly follows the example here:
http://accessibility.athena-ict.com/aria/examples/tabpanel2.shtml
2017-02-14 15:18:37 +00:00
Chris Hill-Scott
d1b53682cd Remove <h2> tag around service name in nav
The heading structure of most pages is incorrect (`<h2>` followed by
`<h1>`). The `<h1>` indicates the main purpose of the page, the service
name (currently the first `<h2>`) doesn't need to be a heading.
2017-02-14 11:53:53 +00:00
Chris Hill-Scott
cd7cb8884c Send focus to error summary before single error
> If both sections of the page have errors and the page is submitted,
> focus moves to the mobile numbers section so screen reader users may
> not be aware of preceding errors - focus should move to a dedicated
> error summary at the top of the page.

Right now we use Javascript to focus the first error on a page (if any
errors are found). This commit adds more JS to then focus the error
summary, if there is one on the page. So this is where the focus will
rest.

It also makes some modifications to the ‘dangerous’ banner to make it
focusable, and to visually indicate that it is focused.
2017-02-14 11:51:19 +00:00
Chris Hill-Scott
5c98f87572 Fix colour contrast on confirmation banner
White on turquoise is not enough colour contrast to pass WCAG AA.
2017-02-14 11:50:57 +00:00
Chris Hill-Scott
c3a564cfcb Fix colour contrast of ‘×’ on team page
The grey doesn’t pass colour contrast.

This commit darkens it to the point where it does.
2017-02-14 11:50:36 +00:00