Commit Graph

47 Commits

Author SHA1 Message Date
Chris Hill-Scott
1e82b6f8b3 Use pseudo elements not borders
This is the technique that GOV.UK Frontend uses to make clickable areas
of buttons bigger.

See: 47407edcb5/src/components/button/_button.scss (L89)
2019-02-13 13:28:32 +00:00
Chris Hill-Scott
1f2cb07deb Make hit area bigger on settings ‘change’ links
Bigger hit areas are generally better (cf Fitt’s law[1]), as long as
they’re not ambiguous.

This commit enlarges the hit area of the edit links (using a border) so
they fill the same vertical space as the smallest possible row (going
to the full height might look weird because some of these rows get very
tall).
2019-02-11 13:12:34 +00:00
Katie Smith
0633af4e4a Truncate contact link text on settings page
The contact link on the settings page should be truncated instead of the
text being wrapped and overflowing on to multiple lines. This adds in an
option to the text_field macro to truncate long text fields. This
setting has been used to truncate the API callback URLs too on the
services/<service_id>/api/callbacks page.
2018-06-12 10:21:24 +01:00
Chris Hill-Scott
a4e6ef89a7 And fix spacing for inbound… 2018-01-26 16:08:48 +00:00
Chris Hill-Scott
b95a7403b4 Make clickable area of link bigger
Fitt’s law[1] states that bigger click areas are quicker and easier for
people to click. Therefore we should make click areas as big as
possible, without being ambiguous about what the outcome of clicking
will be or increasing the potential for accidental clicks.

The click areas of the row numbers in the table were very small – this
commits makes them as big as the containing table cells.

Uses this technique to achieve the bigger click areas without disrupting
the layout:
http://authenticff.com/journal/css-pro-tip-expanding-clickable-area

1. https://en.wikipedia.org/wiki/Fitts%27s_law
2018-01-15 14:45:37 +00:00
Chris Hill-Scott
c6f54966bf Change tables to scroll in-page, not full screen
There were three problems with showing tables fullscreen:
- it was over-optimised for very big spreadsheets, whereas most users
  will only have a few columns in their files
- it was jarring to go from full screen and back to the normal layout
- it was a bit change for existing users, where we prefer incremental
  changes that make things better without disrupting people’s work
  (where possible)

So this commit changes the big table to scroll horizontally in the page,
not take up the full width of the page.

From the fullscreen table it keeps:
- the shimming method to keep the horizontal scrollbar at the bottom of
  the screen at all times

It introduces some more refinements to make it nicer to use:
- fixing the first column, so you always know what row you’re on
- adding shadows indicate where there is content that’s scrolled outside
  the edges of the container
2017-12-20 12:09:18 +00:00
Chris Hill-Scott
45a0a767f4 Split settings page into multiple sections
There are quite a few more options that there used to be in the settings
page. This means it’s hard to find the thing you want to change.

Grouping options is a common way of making things easier to find.

Grouping by channel (text, email, letter) is something we do elsewhere
that seems to work pretty well.
2017-08-14 16:23:56 +01:00
Chris Hill-Scott
e373296bd9 Show inbound messages on the dashboard
This commit adds two things:

a section on the dashboard to show how many inbound messages the
service has received in the last 7 days, and how recently an inbound
message has been received
---

Doesn’t show the contents of any messages, just like how the rest of the
dashboard is an aggregation, never individual messages.

a page to show all the inbound messages the service has received in
the last 7 days
---

This shows the first line of the message. Eventually this will link
through to a ‘conversation’ page, where a service can see all the
messages it’s received from a given phone number.
2017-06-05 15:42:36 +01:00
Chris Hill-Scott
f425c5756d Make sure row numbers stay vertically aligned
Just looks tidier.
2017-05-23 14:36:27 +01:00
Chris Hill-Scott
a0cc792222 Make row numbers bold
They’re headings, not part of the data.
2017-05-23 14:36:26 +01: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
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
b760457ba9 Add monthly breakdown of usage
Basically:
- shows all the months from start of given financial year to now or end
  of given financial year (whichever is earliest)
- shows a breakdown of free and paid text messages for each of these
  months

Depends on:
- [x] https://github.com/alphagov/notifications-api/pull/699
2016-10-05 16:11:19 +01:00
Chris Hill-Scott
6bad0101c8 Merge pull request #939 from alphagov/platform-admin-reorg
Reorganise list of services on platform admin page
2016-09-13 12:06:14 +01:00
Chris Hill-Scott
2156085813 Fix right aligned table headings
The CSS for these wasn’t being set on the correct class.
2016-09-13 10:38:33 +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
17d5af1a6e Show delivery time even for failed notifications
We reckon it’s probably still useful.
2016-09-13 10:37:38 +01:00
Chris Hill-Scott
2d7ed4d34f Fix overlapping text on tables of notifications
This commit changes the tables of notifications from 3 columns to two
columns. This is so the text has more room, so it doesn’t start
overlapping.

It also makes sure that if the recipient gets really long that it will
be cut off with an ellipsis, rather than overlapping…

I hypothesize that if a notification fails you probably don’t care when
it failed, just that it failed.
2016-09-13 10:37:38 +01:00
Chris Hill-Scott
32b34ddb06 Fix top keyline on tables with hidden col headings
The way that we collapse column headings so that they don’t take up any
vertical space is by setting their `font-size` to zero. However this
seems to take them out of the flow of the document, so their top border
also disappears. This commit sets the `font-size` to the smallest
non-zero value to avoid this.
2016-09-01 16:13:51 +01:00
Chris Hill-Scott
4342b721f1 Show upcoming jobs on the dashboard
On the dashboard:
- adds a new ‘in the next 24 hours’ section to the dashboard which lists
  upcoming jobs
- tweaks some spacing on the dashboard so that it doesn’t look like too
  much of a mess
- don’t show scheduled jobs in the table of normal jobs

On the jobs page:
- don’t show scheduled jobs
2016-08-31 16:58:43 +01:00
Chris Hill-Scott
9c83d559f3 Fix wonky tables on dashboard and activity page
Tables with a `layout` of `fixed` determine column widths from the
width of the column headings.

We weren’t setting the width of the first column heading, so our tables
were getting out of alignment.
2016-07-13 16:56:28 +01:00
Chris Hill-Scott
ddef996f34 Rename ‘API keys’ page to ‘API integration’
Since this page is more than just your API keys, it should be named
something else.

Hopefully the word ‘integration’ will give non-techical users a clue
that it’s possible to use Notify without doing the CSV dance.
2016-07-06 10:12:20 +01:00
Chris Hill-Scott
5a95f4a7dd Tighten up spacing for better visual grouping 2016-06-17 16:30:02 +01:00
Chris Hill-Scott
4077e2860d Fix display of spreadsheet tables
a9f79bcf07 made all tables have a `fixed`
layout. This causes issues with the spreadsheet-looking tables.

This commit treats tables with half-width first columns as the
exception, not the rule, and makes other tables display as before.
2016-06-13 10:26:01 +01:00
Chris Hill-Scott
a9f79bcf07 Truncate items that don’t fit in the first column
The first column of a table is a heading, and will always be 50% wide.

It makes the table harder to scan when the information in the first
column breaks onto multiple lines, and introduces uneven whitespace in
the table.

This commit adds some CSS to force things in the first column to only
ever be one line. If they are too long to fit, they get truncated with
an ellipsis (`…`)
2016-06-09 11:36:22 +01:00
Chris Hill-Scott
2e8e650733 Put same info in both tables of notifications
We have tables listing notifications on:
- the job page
- the ‘activity’ page

Previously that had subtly different information, in a different order.
This commit makes them exactly the same.
2016-06-09 11:36:22 +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
50427ecd3f Add a page to show delivery rates week-by-week
Implements
https://github.com/alphagov/notifications-api/pull/286

Will always show weeks as Monday to Sunday.
2016-05-05 10:56:20 +01:00
Chris Hill-Scott
27ad1532e4 Make the flow of using templates better
For users who:
- want to send messages from a template
- want to edit templates

For developers:
- who need to get the ID of a template

This commit mainly cleans up the choose template page so there are less
options, and the options that are there are less wordy.

This means:
- moving ‘send yourself a test’ onto the send messages page, and making
  it button
- stripping a lot of stuff out of the ‘send from API’ page, so it’s more
  obvious what the template ID is
2016-04-19 15:31:19 +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
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
3a5b76ce2a Truncate previews of email messages to ~3 lines
Emails can get very long.

When you’re trying to do other things on the page this results in a lot
of scrolling.

This commit truncates email messages to about 3 lines, and adds a JS
toggle which reveal the full contents of the email.
2016-04-11 17:24:22 +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
eb3734f1d1 Give the user better error messages for CSV files
Makes uses of the additions to utils in https://github.com/alphagov/notifications-utils/pull/9

This commit strips out a lot of the complex stuff that the views and templates
in this app were doing. There is now a cleaner separation of concerns:

- utils returns the number and type of errors in the csv
- `get_errors_for_csv` helper in this app maps the number and type of errors
  onto human-friendly error messages
- the view and template just doing the glueing-together of all the pieces

This is (hopefully) easier to understand, definitely makes the component
parts easier to test in isolation, and makes it easier to give more specific
error messages.
2016-03-08 18:36:22 +00:00
Chris Hill-Scott
97a3bf9225 Remove the ‘manage templates’ page
The ‘manage templates’ page was almost identical to the ‘send text messages’
page.

This commit consolidates them into one and makes them all hang together.

Part of this means tweaks to the javascript so that files upload as soon as
you’ve chosen them.
2016-02-22 13:39:02 +00: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
efb2140bbb Check CSV files match the template
This commit adds a first stab at checking whether a CSV file has the right
data to fill the placeholders.

The UI is very much first bash, but I’d like to get this merged and see how it
feels. The main thing is that we’ve got all the bit in place now to do this
logic.
2016-02-18 15:07:14 +00:00
Chris Hill-Scott
3f365058ef Fix problems found by SASS Lint 2016-02-08 12:02:22 +00:00
Chris Hill-Scott
7e670d9662 Limit number of jobs on dashboard to 5
…and add a link to view the rest of the jobs if there are more than 5.
2016-02-04 17:25:29 +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
3e7bb42323 Replace message previews on check page with table
The first 3/last 3 messages didn’t test well, it wasn’t immediately obvious what
was going on.

This commit replaces it with just a preview of the first message, and a table
showing the details of the subsequent messages.
2016-02-04 10:44:20 +00:00
Chris Hill-Scott
4e158e203c Update styleguide 2016-01-26 16:20:57 +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
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