Commit Graph

30 Commits

Author SHA1 Message Date
Chris Hill-Scott
b8cc0de44e Use file list pattern for notifications
Most of our tables are now lists which have:
- a thing you click on
- some secondary info about that thing underneath
- some extra numbers/status on the right hand side

Since these are so similar, they should share the same pattern, which
this commit does (using the `file-list` pattern).

Visually this means:
- the secondary text on the inbox becomes grey not black, for
  consistency
- the status bit of the notifications tables bottom align like the
  status of messages in the inbox

These both seem like OK changes to make for the sake of consistency.
2017-06-21 17:57:20 +01:00
Chris Hill-Scott
f150e2be12 Refactor on/off table fields into component
There’s a lot of repeated code in our Jinja templates for the settings
page.

We already have a `boolean_field` component, but it’s not used anywhere
(it was just lifted from Digital Marketplace).

So this commit changes the `boolean_field` component to be useful for
our on/off use case, and wires it into the settings page.
2017-06-07 15:07:20 +01:00
Chris Hill-Scott
ad5fc9a583 Put error flag on whole row
We’ve seen people miss errors if they’re in the right-hand columns of
the spreadsheet because people’s eyes scan down the left edge of the
table.
2017-05-23 14:33:22 +01:00
Chris Hill-Scott
ec33f843ef Use small font sizes in tables by default
GOV.UK Elements changed tables to be a larger font size here:
https://github.com/alphagov/govuk_elements/pull/185

This is good in principle (and a lot of our tables are 19px already).
However, the ones that aren’t are still 16px because there’s a lot of
info to fit on the page (eg when previewing someone’s CSV file).
2017-04-10 14:54:28 +01:00
Chris Hill-Scott
b0a995beb2 Handle lists as CSV field values
Brings in:
- [ ] https://github.com/alphagov/notifications-utils/pull/128

This means that `RecipientCSV` will sometimes return the value of a cell
in a spreadsheet as a `list`, not a `string`. So we need to handle that,
rather than putting a Python representation (`['one', 'two', 'three']`)
on the page.

This commit handles it by putting a bulleted list on the page instead.

This breaks our model of showing the spreadsheet as it appears in Excel
or whatever, because we’re showing the aggregation of the columns into a
list. However:
- this is the easier thing to do for now
- it might actually be more usable because it keeps the table narrower
2017-04-04 09:35:15 +01:00
Chris Hill-Scott
2f68dc613c Put template IDs back on the dashboard
Removed as part of refactoring the code to generate the graphs of
template usage on the dashboard:
4a226a7a29 (diff-cf78cb5c29a2d3c4d45b61d8617824b7L29)

Didn’t realise that they were used by the functional tests.

This commit puts them back while keeping the code reuse.
2017-03-20 12:27:37 +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
416bb4d934 Revert "Add extra text to label rows for screenreaders"
This reverts commit 549695de4e.

This was not the correct solution to the problem identified.
2017-02-23 16:03:50 +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
549695de4e Add extra text to label rows for screenreaders
This is mainly for the ‘check’ page where we show users the contents of
their spreadsheet.

> The structure of the table means that the first cell is treated as a
> column header, so moving through columns in row 2 for example
> associates the data 2 with 1 (column header) - this has no logical
> meaning
2017-02-14 11:51:38 +00:00
Imdad Ahad
eaa246bd26 Use SASS var for border colour and correct closing tbody tag 2016-11-14 16:00:45 +00:00
Imdad Ahad
7e269a454a Show more granular email & sms counts on platform admin page 2016-11-14 14:46:26 +00:00
Chris Hill-Scott
e9d230b9a4 Always show created time for sending state
When a notification is in `created` or `sending` the thing you care
about is how long it’s been sitting there.
2016-09-13 10:37:38 +01:00
Chris Hill-Scott
6c961cc792 Remove date table field type
No longer used anywhere.
2016-09-13 10:37:38 +01:00
Chris Hill-Scott
95506e7c3b Refactor notification status into its own field type 2016-09-13 10:37:38 +01:00
Leo Hemsted
816ba32b25 add id field containg obj id to table if available
useful for finding out a notification ID when investigating support issues
2016-09-09 15:50:55 +01:00
Chris Hill-Scott
036f2a8880 Allow text_fields to have an optional status
Status is used for making the text greyed-out or red, etc.
2016-08-24 15:09:36 +01:00
Chris Hill-Scott
fc93d9ff52 Add an ‘edit’ field type
Like the link field, but right aligns so that it sits nicely in the
last column of a table.
2016-08-24 15:09:05 +01:00
Chris Hill-Scott
d213e2cc67 Give each row in a table a heading
The first columns of our tables are always headings for the
subsequent columns, even though they go horizontally.

HTML has the `<th>` tag, which doesn’t just have to be used for headings
along the top of a table. So this commit changes the first column to be
a `<th>`.

This then allows us to style these elements differently, specifically
making them 50% wide. This makes pages like the dashboard align more
nicely.
2016-06-09 11:36:22 +01:00
Chris Hill-Scott
1a6bb37171 Tidy up the ‘Activity’ table
This table had a lot of columns, which meant that some of them became
very narrow, wrapping the text awkwardly.

This commit groups some of the data into a chunk, which occupies the
first column.
2016-04-13 16:17:09 +01:00
Chris Hill-Scott
39e94ac8ec Add row numbers to tables
When a table is showing the contents of a CSV file, it should look
something like a spreadsheet.

The minimally skeuomorphic way to do this is by adding row numbers.

This commit doesn’t
- make the row numbers monospace (it’s barely noticeable and doesn’t
  reflect what actual spreadsheets do)
- make the first column heading ‘Row’ (again, doesn’t reflect how actual
  spreadsheets work, and takes up more valuable space)
2016-04-06 11:31:37 +01:00
Chris Hill-Scott
17b99c9bf2 Add pages to invite, edit, and delete users
This takes the original prototype version of this page, and, using the same
fake data (ie nothing is wired up):
- adds an invite users page
- adds an edit (and delete) user page

Both these pages allow the user to set another user’s permissions.

This commit adds images for the ticks and crosses, so we have control over their
appearance.
2016-02-22 13:39:02 +00:00
Chris Hill-Scott
856296df5d Updates to display of jobs
This commit:
- adds the template to the jobs page (and puts it at the top of the send SMS
  page) so that it consistently appears in the same place throughout the
  journey
- put the real data about a job on the jobs page and on the dashboard
2016-02-04 10:59:03 +00:00
Chris Hill-Scott
b00f9d5821 Fix spcing on empty table 2016-01-22 13:14:50 +00:00
Chris Hill-Scott
9784a9936c Add pages for create/view/revoke API keys
Copying what they’ve done on GOV.UK Pay, we should let users:
- generate as many keys as they want
- only see the key at time of creation
- give keys a name
- revoke any key at any time (this should be a one way operation)

And based on discussions with @minglis and @servingUpAces, the keys should be
used in conjunction with some kind of service ID, which gets encrypted with the
key. In other words the secret itself never gets sent over the wire.

This commit adds the UI (but not the underlying API integration) for doing the
above.
2016-01-20 16:22:23 +00:00
Chris Hill-Scott
ba0c9ac6c1 Remove placeholder logs of notifications sent
From the:
- dashboard
- activity page

This info will be confusing for users at the hack day, because it will say
they’ve already sent messages when they first sign up.

This involved changing the table macro to have a nice ‘no rows’ message.
2016-01-19 12:04:18 +00:00
Chris Hill-Scott
3989d1b576 Add pages for ‘service settings’ flow
Adds the pages and wires them together, so that it’s possible to click
through them.

The wording is not quite English, but attempts to be an rough description of
what the consequences are for each of the four actions.
2016-01-08 14:56:14 +00:00
Chris Hill-Scott
2acf599c04 Add big number component…
…and count the messages to display some totals
2016-01-05 13:31:53 +00:00
Chris Hill-Scott
aa0663cad8 Add messages to the current job’s history
This mocks out a data structure for a job’s messages, and renders this data:
- on the notification page, as a table, which links through to…
- …the page for an indidivual message
2016-01-05 13:31:53 +00:00
Chris Hill-Scott
dbc55e76b0 Add table of recipients
Uses an adapted version of the 'summary table' pattern from Digital Marketplace
frontend toolkit:
http://alphagov.github.io/digitalmarketplace-frontend-toolkit/summary-table.html
2015-12-11 09:49:38 +00:00