Commit Graph

298 Commits

Author SHA1 Message Date
Chris Hill-Scott
2f0cc99610 Make URLs for assets cache-proof
https://www.pivotaltracker.com/story/show/113448149

This commit adds a query string to assets URLs which is generated from a hash
of the file contents. When asset files are changed they will now be served from
a different URL, which means they wont be loaded from browser cache.

This is similar to how GOV.UK template adds its version number as a querystring
parameter for its assets.

This is mostly copied from Digital Marketplace utils:
https://github.com/alphagov/digitalmarketplace-utils/pull/102

They have it in a shared codebase, we only have one frontend app so don’t need
to do that.

Usage in a template:
``` jinja
{{ asset_fingerprinter.get_url('stylesheets/application.css') }}
```

Output:
```
static/stylesheets/application.css?418e6f4a6cdf1142e45c072ed3e1c90a
```
2016-02-10 16:00:29 +00:00
NIcholas Staples
5fd8ca492d Merge pull request #168 from alphagov/mask-phone-number-jobs-page
Make job page more realistic for demo
2016-02-10 12:19:47 +00:00
Chris Hill-Scott
bd33fa3c26 Use tablular numbers for ‘big number’ pattern
> Tabular numbers have numerals of a standard fixed width. As all numbers have
> the same width, sets of numbers may be more easily compared. We recommend
> using them where different numbers are likely to be compared, or where
> different numbers should line up with each other, eg in tables.

The big number pattern is good candidate for tabluar numbers, especially if
we ever have these numbers update dynamically (in that case tabular numbers
won’t jump around like lining ones would).
2016-02-10 11:03:56 +00:00
Chris Hill-Scott
fd052d5667 Make message sent, not queued, for realism 2016-02-10 09:46:02 +00:00
Chris Hill-Scott
d7ac0fd12e Mask phone number on jobs page
The phone number on the job page is hard coded at the moment. This is not good
for the demo, and showing it is probably not good because we don’t want to be
storing it forever. So this commit:

- masks it out with bullets • because they’re nicer than asteriks
- adds a ‘row number’ column, which I think is good for users uploading CSVs
  to reconcile the job run with their data (if we’re not showing the data any
  more)
2016-02-10 09:40:05 +00:00
NIcholas Staples
25f74b79bf Merge pull request #164 from alphagov/swap-3fa-fields
Swap order of fields of three factor page
2016-02-09 10:58:23 +00:00
Chris Hill-Scott
ff400d7857 Swap order of fields of three factor page
Most people seem to get the text message before the email, so it makes sense
for this to be the first field on the page.
2016-02-09 10:49:28 +00:00
Chris Hill-Scott
7e8046be47 Add syntax highlighting to code examples in docs
Uses the Pygments[1] package.

1. http://pygments.org/
2016-02-09 10:33:49 +00:00
Adam Shimali
3b7d1f9d12 Merge pull request #160 from alphagov/front-end-lint
Add linting for SASS and Javascript
2016-02-08 13:37:45 +00:00
Chris Hill-Scott
3f365058ef Fix problems found by SASS Lint 2016-02-08 12:02:22 +00:00
Chris Hill-Scott
382cfa2907 Make page titles consistent
This commit modifies the HTML `<title>` tags for all the pages. It makes two
main changes:
- make the title tag match the `<h1>` of the page, for better or worse
- put the service name after the page title, seperated by an en dash, as per
  GOV.UK
2016-02-08 09:23:51 +00:00
NIcholas Staples
7854617453 Merge pull request #155 from alphagov/fixes-to-front-end-patterns
Fixes to front end patterns
2016-02-05 11:39:46 +00:00
Chris Hill-Scott
7dc5d76b98 Use banners appropriately
We’ve fiddled around with the banners quite a lot in the last few days. This
commit reviews some of the older examples and makes sure that they’re:

a) not broken
b) using the most appropriate banner for the context
2016-02-05 10:43:49 +00:00
Chris Hill-Scott
9c1e47d594 Fix wrapping of API key 2016-02-05 10:43:49 +00:00
Chris Hill-Scott
0fc927b458 Review usage of secondary/back links
This commit examines all the pages that use the page footer component, and
determines whether they should have a back button, a secondary link, both or
neither.
2016-02-05 10:43:49 +00:00
Chris Hill-Scott
f5807d939a Add secondary link pattern to page footer
This commit brings back the ‘link under the green button’ bit of the page footer
component.

Previous it had been changed to be a grey button. But there are use cases for
both, maybe even simultaneously.
2016-02-05 10:34:26 +00:00
Chris Hill-Scott
eba03d0bb5 Remove job ID from jobs table
Don’t think it’s something we need to surface to users.
2016-02-04 17:26:58 +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
NIcholas Staples
cf08f4ef2a Merge pull request #150 from alphagov/send-text-flow-revised
Send text flow revised
2016-02-04 14:57:43 +00:00
Chris Hill-Scott
a7d6d85d8b Make first page of ‘send texts’ use links not form
This doesn’t need to be a form—it’s not changing any data.

And having the primary action on the page as ‘Use this template’ it makes it
clear what the page is for.
2016-02-04 14:13:57 +00:00
Chris Hill-Scott
7516ec6aba Fake phone number on job page
To show what kind of data we want to surface here.
2016-02-04 14:08:57 +00:00
Chris Hill-Scott
26adcc64c1 Updates to ‘send SMS’ page
Based on discussion with Pete.

Make the blue banner an ‘important’ banner (copied from Register to Vote, used
because it’s not as boxy and fits on the page better).

Remove the back button because you haven’t changed any data yet. If you need to
go back you can just press back or start again.

Make the filename stand out more.

Remove the ‘download example’ link. Will need to revist the best way of doing
this.

Make text messages consistently 2/3rd width.
2016-02-04 14:06:19 +00:00
Chris Hill-Scott
e37123f083 Make textboxes wider on create account 2016-02-04 12:41:39 +00:00
Adam Shimali
6c5dfcddb1 Merge pull request #149 from alphagov/add-manage-users
Populate manage users page with fake data
2016-02-04 12:12:26 +00:00
Chris Hill-Scott
51208a9eb2 Make banner on template page real 2016-02-04 11:31:33 +00:00
Chris Hill-Scott
54cad9cf24 Remove dummy content 2016-02-04 11:07:33 +00:00
Chris Hill-Scott
48df622aba Add two steps to onboarding banner
It’s not obvious what the first steps are when you’ve just signed up.

This commit changes the banner on the dashboard to make it obvious.
2016-02-04 10:59:18 +00:00
Chris Hill-Scott
28f700366c Fix spacing of first page headers
This commit customises the margins of the first header on each page so that it
lines up with the navigation.
2016-02-04 10:59:18 +00:00
Chris Hill-Scott
4280c21b23 Updates to send and check SMS pages
Adds a back button instead of a back link (more prominent, you’re likely to
go back on these pages if you’ve made a mistake)

Tweaks to wording
2016-02-04 10:59:18 +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
0b47656ebc Add custom file upload to the send SMS page
This is the only place we’re doing file upload at the moment.
2016-02-03 17:16:29 +00:00
Chris Hill-Scott
4447af3fec Add custom file upload component
The default browser file upload control is difficult to style, but looks totally
out of place.

This commit replaces it with one that has a GOV.UK style button, as a first
step.

Based heavily on this example:
http://tympanus.net/codrops/2015/09/15/styling-customizing-file-inputs-smart-way/
2016-02-03 17:16:17 +00:00
Henry Hadlow
091694415b Add manage users page 2016-02-03 17:08:58 +00:00
Adam Shimali
44045b2d09 Merge pull request #147 from alphagov/split-sms
Split ‘send SMS’ page into two pages
2016-02-03 17:08:45 +00:00
Chris Hill-Scott
c774b82ba9 Don’t allow user to send texts without template 2016-02-03 13:38:55 +00:00
Chris Hill-Scott
9bdce7007d Merge pull request #146 from alphagov/ph-nav-labels
Updated main nav to group things more sensibly
2016-02-03 11:33:40 +00:00
Chris Hill-Scott
8d3e3e6943 Change wording on the banner
We can ignore any mention of trial/test/mode if we just talk about ‘not live’.

It also feels sensible to link through to the page where you can make that
change, rather than dig through the navigation.
2016-02-03 11:18:02 +00:00
Chris Hill-Scott
394a9db3f7 Split ‘send SMS’ page into two pages
This commit just splits the existing page into two. It doesn’t do any
substantive changes to how the two parts of the page work.
2016-02-03 11:14:20 +00:00
Pete Herlihy
808d8d507f Updated main nav to group things more sensibly
Adding more verbs than nouns too.... so it's clear what you do at each view.

No ticket for this, as off-piste.

Naughty.
2016-02-03 10:53:22 +00:00
Chris Hill-Scott
2d1af953ed Add autofocus module to two factor page 2016-02-02 16:39:28 +00:00
Chris Hill-Scott
776539462e Make autofocus textbox module
This commit adds a very small Javascript module to autofocus a textbox on page
load. It should only be used once per page.

It also adds a parameter to the textbox macro which adds the attribute to
trigger autofocus.
2016-02-02 16:38:10 +00:00
Chris Hill-Scott
9767ee1511 Make two factor textbox consistent with verify textboxes
- make the field the same width (5em to match length of code)
- move ‘haven’t received…’ link underneath the textbox instead of underneath
  the button
2016-02-02 16:36:11 +00:00
Chris Hill-Scott
335cc160fa Fix wording 2016-02-02 15:59:41 +00:00
Chris Hill-Scott
9c856af789 Allow textboxes to have width set, default to 2/3
For entering 2 or 3fa codes, we want a textbox that’s just over 6 characters
wide.

To do this, a width can now be passed to the textbox macro. The possible widths
are the same as those provided by GOV.UK Elements, and in the same format (eg
1-4, 1-2, 2-3…)

This commit also adds a new width (5em) which is suitable for 3fa codes, and
adds it to the verify page.
2016-02-02 15:59:41 +00:00
Chris Hill-Scott
71fd7f98a7 Reduce spacing between textbox and ‘I have’t rec…’
The grouping on this page was weird because these links were two far away from
the associated textbox, and too close to the next textbox.

This commit adds them as parameters to the textbox macro, which means their
relative spacing can be controlled exactly, and thus reduced.
2016-02-02 15:59:41 +00:00
Chris Hill-Scott
686c4127cd Various tweaks
- remove black border from banner
- make banners have internal columns
- make nav 2/3rd width, 19px text and more spaced out
- only show the ‘restricted mode’ banner where it’s needed
- rename ‘restricted mode’ to ‘trial mode’
2016-02-02 15:01:17 +00:00
Henry Hadlow
c4023bf0fb Make headings .heading-large instead of .heading-xlarge 2016-02-02 14:06:07 +00:00
Chris Hill-Scott
acc13feddb Add prompt to add first template to dashboard
https://www.pivotaltracker.com/story/show/112814667

> As you need to have templates to send any notifications, we should be nudging
> people to do that when they sign in.
>
> This should be in the dashboard, with a link to manage templates.
>
> Should be bright and shiny and only show if the service has no templates.

This commit adds the above.

It also rationalises the language (some places used ‘create template’, others
used ‘add template’, this changes everything to the latter).
2016-02-02 10:14:04 +00:00
Chris Hill-Scott
46db79c421 Add a new style of banner—‘tip’
This banner is meant for onboarding users and giving them prompts about what
they should do next.
2016-02-02 09:44:24 +00:00