Commit Graph

19 Commits

Author SHA1 Message Date
Jonathan Bobel
1be305d045 Reworking checkboxes to adhere to USWDS styling 2023-08-14 10:35:11 -04:00
Jonathan Bobel
e0d2d74067 Update dashboard and template flow (#514)
* Updated header and footer
* Moved files around and updated gulpfile to correct the build process when it goes to production
* Updated fonts
* Adjusted grid templating
* Adding images to assets
* Updated account pages, dashboard, and pages in message sending flow
* Updated the styling for the landing pages in the account section once logged in
2023-06-08 13:12:00 -04:00
Katie Smith
82318387de Add hidden text for pills on job page
The links in the blue boxes on the job page needed hidden text so that
they work out of context. This changes the text from "10 sending" to "10
sending text messages" (with the message type hidden text).
2021-02-24 14:36:21 +00:00
Tom Byers
ddf54d5ce3 Give selected pill item an id 2020-09-10 23:11:13 +01:00
Tom Byers
7589ee1cd5 Revert "Fix aria on jobs page" 2020-09-10 17:34:05 +01:00
Tom Byers
af369fd5a2 Give selected pill item an id 2020-09-09 22:31:11 +01:00
Tom Byers
58ad6fe4c7 Remove pill-item__label--selected class
It was used to mark labels of selected items when
we thought they might need extra styling but is
now redundant.
2020-09-08 11:46:32 +01:00
Tom Byers
452e253e2c Make the selected pill item a link
All other navigations have their selected item as
a link so we should match this.

Includes changes to the pill CSS so:
1. it doesn't use elements in the selectors
2. all the selectors use BEM

I did 2. because I had to change the
classes/selectors anyway, they might as well match
the style GOVUK Design System uses.
2020-09-04 16:17:04 +01:00
Tom Byers
9598d3a97b Change pills from tabs to navigation
Changes the HTML to do the following:
- remove all tabs semantics
- give the list a role of navigation
- label the navigation with the h1
- mark the selected item with aria-current
2020-09-04 09:02:36 +01:00
Tom Byers
ee9f348ce4 Update all links to use GOVUK Frontend style
Includes:
- turning off :visited styles to match existing
  design
- swapping heading classes used to make links bold
  for the GOVUK Frontend bold override class
- adding visually hidden text to some links to
  make them work when isolated from their context

We may need to revisit whether some links, such as
those for documentation and features, may benefit
from having some indication that their target has
been visited.
2020-02-25 10:47:24 +00:00
Tom Byers
5b306dde4d Revert "Convert all links to govuk frontend" 2020-02-24 11:56:38 +00:00
Tom Byers
cd36182ea6 Update all links to use GOVUK Frontend style
Includes:
- turning off :visited styles to match existing
  design
- swapping heading classes used to make links bold
  for the GOVUK Frontend bold override class
- adding visually hidden text to some links to
  make them work when isolated from their context

We may need to revisit whether some links, such as
those for documentation and features, may benefit
from having some indication that their target has
been visited.
2020-02-20 09:11:26 +00:00
Chris Hill-Scott
867143e871 Center-align pill text when there’s no big number
When the text is left aligned it looks messy because the spacing is so
uneven and there are no big numbers to give it some rhythm.
2017-06-23 13:49:27 +01:00
Chris Hill-Scott
358edf7f20 Make list of templates filterable by type
When users are trying to find a template there’s a fair chance that they
know whether or not it’s an email/text message/(letter) that they’re
looking for.

Making them scroll past a whole bunch of templates of a different type
means it will take them longer to find the template they are looking
for.

We already have search on the templates page, but this is only good for
where they can remember the name of the template. This will be
sometimes but not always.

This commit adds some navigation to filter down the list of templates to
only show one type at a time. By default it will show all templates. It
adapts the pattern we use for filtering notifications by
sending/failed/delivered, but without the counts of how many things are
in each bucket (I don’t think there’s any value in knowing you have X
text message templates; on this page you only really care
about the one template you’re looking for).

_Note: required re-arranging the functions in `templates.py`. The route
for `/template/:uuid` needs to come before the route for
`template/:string` otherwise Flask tries to interpret a template’s ID
as its type.
2017-06-23 13:49:24 +01: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
2a502753a4 Filter and navigate usage by financial year
Right now we tell people that the usage page is for the current
financial year. This is a lie – it’s for all time.

So this commit calls through to the API to get the stats for (by
default) the current financial year.

We already do this for the monthly breakdown, this just does the same
thing for the yearly totals.

It also adds navigation to show the data for other financial years:
- previous so you can go back and see your usage and verify that the
  bill you’re about to pay is correct
- next so that you can check what your SMS allowance is going to be
  before you actually get into it
2017-02-06 12:25:48 +00:00
Chris Hill-Scott
e7e0b2f227 Put counts into the notification filters
We can filter notifications on the activity page by state.

This commit adds counts to those filters.

This is mainly so that we can consistently do the same thing on the job
page later on.
2016-06-14 11:00:56 +01:00
Chris Hill-Scott
e282ca2109 Allow filter links to be used in combination
Means you can see, for example emails that have failed.

Means adding:
- logic to generate links which can have a type parameter, a status
  parameter, or both
- a ‘pill’ UI component for seeing which filters you currently have
  applied
- some logic to change the page title based on which filters you have
  applied
2016-04-13 16:17:09 +01:00