Commit Graph

51 Commits

Author SHA1 Message Date
Chris Hill-Scott
6824eeebf5 Allow people to see the full precompiled letter
Sometimes people print stuff under where we’re folding the letter. It’s
annoying to not be able to see it.

This commit adds a little detail where, once you’ve sent the letter
you can unfolds the corner to see what’s underneath.

It’s better that we do this for all letters for discoverability.
2019-02-07 16:19:13 +00:00
Chris Hill-Scott
cd70355db8 Display postage everywhere we display a letter
To avoid the problem of having confusing defaults, the postage is now
set explicitly on every template.

Putting the postage ‘inside’ the letter template makes the interaction
for changing it consistent with how other parts of the template are
added.

Plus everyone loves skeumorphism.
2019-02-06 14:37:16 +00:00
Chris Hill-Scott
e0d28cf1dd Fix hover folder icon in IE10/11
Duplicates e0ecc95ac6

Copies the code from the normal folder icon, and manually tweaks the
colour, to also get the benefits of minification.

***

IE 10 supports using SVG[1] but has some buggy behaviour when they’re
used as background images.

Without an explicit width/height it stretches the viewBox of the SVG to
fill the containing element. This causes the content of the file to
display centered within the viewBox.

Explicitly setting the width and height seems to be the thing that fixes
this. Out of the suggested fixes on Stackoverflow[2] this one seems to
be the most straightforward.

1. https://caniuse.com/#feat=svg
2. https://stackoverflow.com/questions/17944354/svg-background-image-position-is-always-centered-in-internet-explorer-despite-b
2019-02-05 13:50:39 +00:00
Chris Hill-Scott
bba22b056f Remove unused assets 2019-02-01 10:28:29 +00:00
Chris Hill-Scott
88ad982bf7 Improve display of folder path when deeply nested
It’s a bit rudimentary to only show the current place in the hierarchy
and the parent. You lose a sense of how deep you are.

But we can’t just show the full path, because it can be arbitrarily
long. So what this commit does is show the full path, but truncates the
display of any items. Further-up than the current folder or its parent.

This also helps disambiguate between folders and templates, because
folders are always shown with the folder icon.

This probably won’t affect many teams, because we don’t anticipate a lot
of deep nesting.
2019-02-01 10:28:29 +00:00
Chris Hill-Scott
ee1c8ccf53 Don’t put folder icon on templates ‘folder’
After showing this to a few people the consensus seems to be that
‘Templates’ isn’t itself a folder. Therefore it shouldn’t have a folder
icon.

This has the advantage of disambiguating between being in a folder:
> [screenshot]

…and being in a subfolder:
> [screenshot]
2018-12-07 11:12:32 +00:00
Chris Hill-Scott
9a884a38d7 Add PNG versions of the folder icons for IE8 users
IE8 doesn’t support SVG images as CSS backgrounds. We still have users
on IE8, as I saw yesterday.

This commit adds fallback PNG images for these users. The images are
rendered at 1x (because no-one is using IE8 on a retina screen) and
have been run through `pngcrush -brute` for the smallest possible file
size.
2018-12-07 10:32:08 +00:00
Chris Hill-Scott
66cf12ba65 Run folder-blue.svg through SVGOMG
Does the same optimisations we’ve done for the other SVGs.

https://jakearchibald.github.io/svgomg/
2018-11-13 14:15:38 +00:00
Chris Hill-Scott
e0ecc95ac6 Fix folder icon in IE 10
IE 10 supports using SVG[1] but has some buggy behaviour when they’re
used as background images.

Without an explicit width/height it stretches the viewBox of the SVG to
fill the containing element. This causes the content of the file to
display centered within the viewBox.

Explicitly setting the width and height seems to be the thing that fixes
this. Out of the suggested fixes on Stackoverflow[2] this one seems to
be the most straightforward.

1. https://caniuse.com/#feat=svg
2. https://stackoverflow.com/questions/17944354/svg-background-image-position-is-always-centered-in-internet-explorer-despite-b
2018-11-13 13:57:03 +00:00
Chris Hill-Scott
c8801bd905 Add thinner version of the blue icon
This is needed for when the icon is displayed at a larger size. The
thicker blue icon looks too big if it’s displayed at over 20px high
(the use case for this is displaying it at 30px high).
2018-10-18 16:28:26 +01:00
Chris Hill-Scott
8ee9e2a675 Rename blue folder as bold
To prepare for having a non-bold (same thickness as the black) blue
version of the icon
2018-10-18 16:27:52 +01:00
Chris Hill-Scott
ed3381e81c Add folder icons
These are copied from the prototype but with the following changes:
- redrawn to snap exactly to pixels
- slightly thicker border for the blue version, and a thinner border for
  the black version, so they look better in situ
- run through https://jakearchibald.github.io/svgomg/ for optimal file
  size

This commit doesn’t do anything with the images yet, it just adds them
to the repo.
2018-10-12 17:01:17 +01:00
Chris Hill-Scott
79314de817 Add page where users can say they want branding
At the moment branding is an undocumented feature. We get a bunch of
support tickets from teams asking its possible.

This commit:
- lets people know it’s possible, and what the options are
- is the first step towards making this process as self-service as
  possible

In some cases we will be able to infer a user’s organisation from there
email address, and Google image search their logo. So the experience for
them is that they press a button and government just sorts it out for
you (also known as "the dream").

In other cases we will have to get back to people asking for a copy of
their logo, or to find out about their service, but this is what we have
to do at the moment anyway.
2018-05-18 16:24:20 +01:00
Ken Tsang
4628b99445 Refactor to move preview logic to API
* Moved the notifications code to go to admin to get the the template

preview document rather than go to template preview.

This will remove the logic from admin and place it in api so it is
easier to expand on later when there are precompiled PDFs

* Added some error handling if API returns an API error.

Caught the error and displayed an error PNG so it is obvious something
failed. Currently it displayed a thumbnail of a png over the top of the
loading page, and therefore it wasn't obvious of the state.
2018-03-08 12:25:07 +00:00
Rebecca Law
bc731ec54d Revert "Letter preview use api not template preview" 2018-03-06 13:47:43 +00:00
Ken Tsang
ff457b8407 Refactor to handle API errors for preview 2018-03-01 23:50:55 +00:00
Ken Tsang
c6285ed68b Improve preview_error.png image 2018-03-01 15:24:26 +00:00
Richard Chapman
1f69d882c2 Added some error handling if API returns an API error.
Caught the error and displayed an error PNG so it is obvious something
failed. Currently it displayed a thumbnail of a png over the top of the
loading page, and therefore it wasn't obvious of the state.
2018-03-01 15:24:26 +00:00
Chris Hill-Scott
893d9deb7c Update product page to talk about letters
Letters is now a mature enough feature that we should:
- be raising awareness amongst our users that it’s a thing we offer
- not have letters be a surprise to anyone creating a Notify account for
  the first time

Shouldn’t be merged until:
- [ ] https://github.com/alphagov/notifications-api/pull/1600
2018-01-24 16:34:05 +00:00
Pete Herlihy
b09564b337 Adding new message sending flow diagram 2017-08-31 13:57:25 +01:00
Pete Herlihy
83d491bc1e Delete the old sending flow image... 2017-08-31 13:56:38 +01:00
Pete Herlihy
347023d1da Adding the image of sending flow for using notify page 2017-08-31 11:10:40 +01:00
Chris Hill-Scott
4b212fbc76 Add logo for Enterprise Europe Network 2017-06-26 11:21:19 +01:00
Chris Hill-Scott
7a07252854 Increase resolution of the TFL DAR logo
We’re showing these kinds of logos bigger as of this PR:
https://github.com/alphagov/notifications-utils/pull/170

If we don’t increase the resolution of the asset to be bigger then it
will look blurry.

New image is `108px` high, which is `2 * 54px`, in order for it to look
as good as possible on retina screens.
2017-06-21 10:53:32 +01:00
Chris Hill-Scott
2ae80b5039 Add TFL Dial-A-Ride logo 2017-06-15 12:11:27 +01:00
Chris Hill-Scott
6a716ef162 Add DATA.GOV.UK logo as email branding option 2017-06-06 11:02:11 +01: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
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
Chris Hill-Scott
e56433e1f8 Fix ticks and crosses on team page in IE8
The ticks and crosses on the team page are served bigger than actual
size (128×128px). They are then resized using CSS3 `background-size`
to their displayed size (19px).

The reason for doing this is so they display crisply on retina screens.

IE8 doesn’t support `background-size` (see
http://caniuse.com/#feat=background-img-opts). This means that the ticks
and crosses get show at their original size (way too big).

This commit adds resized versions of the ticks and crosses which are
then served to these older browsers only.
2017-01-23 13:02:36 +00:00
Chris Hill-Scott
69d986ddfa Outline text in HM Government logo
Non-outlined text requires the correct font to be installed to display
properly.

Outlined text is the shapes of the letters converted to vector, so it
doesn’t need any font installed to display.

Since we don’t have the right fonts installed on the boxes yet, this
will make things look better.
2016-12-19 14:47:48 +00:00
Chris Hill-Scott
54d7306d77 Add assets for letter previews 2016-12-09 11:26:32 +00:00
Chris Hill-Scott
9ec2f2b5d0 Add a ‘team’ section
This addresses part of the ‘is Notify dependable’ group of needs.

The ones it specifically and partially addresses are:
- is it reliable
- how is it supported

There’s more to come in this section, we’re doing this bit now because
it’s a nice conclusion to the page.
2016-12-07 16:14:32 +00:00
Chris Hill-Scott
63e13836b0 Add illustration to the ‘what is Notify’ section
Compliments the new tagline. Illustration by Stephen.

Only shown where there is space (ie on desktop).
2016-12-07 16:14:32 +00:00
Chris Hill-Scott
6072ec1e19 Add a grid of features to the home page
This is the first step towards a fully-fledged ‘product’ page.

The needs for the top, blue section of the page are:
- what is Notify?
- can I use it?
- can I test it out?
- how do I create a log in

The needs for the next section of this page (which is the only one added
by this commit) are:
- how will Notify help me work?
- will it work with my service?

This commit shows 4 features of Notify on the home page which address
those needs. They are illustrated because:

1. We want to catch people’s attention – users are reluctant to scroll
   on this page because they just want to click the ‘create account
   button’. But we hypothesize that they will get on better
   with Notify if they look at some of this stuff first.

2. The concepts that they’re talking about are hard to explain with just
   words because they’re quite abstract. The illustrations help us be
   more specific.

3. Feedback we got from user research was that the product page didn’t
   give users any sense of what it was like to actually use Notify.
2016-12-07 16:14:31 +00:00
Chris Hill-Scott
bc0c620fa1 Delete spacer.png
Depends on:
- [ ] https://github.com/alphagov/notifications-utils/pull/63
- [ ] https://github.com/alphagov/notifications-api/pull/587

The utils fix needs to be deployed to live on the API before this can be merged/deployed
2016-08-08 12:00:00 +01:00
Chris Hill-Scott
aed10f711c Add spacer image for email template
Forgot to include this before.

The template expects it in `./images` but it should probably live in
`./images/email-template`.

This commit puts it in both places; we can clean up later.
2016-08-08 11:12:01 +01:00
Chris Hill-Scott
776299c26f Add department crests for email sub branding
We need to host these images somewhere. Let’s start off doing it in
the admin app, like we do for other email assets.

Eventually we should have a CDN in front of this.

Images lifted from
76ff2e0b6d/app/assets/images/crests
2016-08-03 14:42:13 +01:00
Chris Hill-Scott
f9ebb337e3 Tidy layout of team page
The team page was a bit of a mess:

- invited and active tables didn’t line up
- lots of things were wrapping onto two lines
- the empty fields for when a user didn’t have permissions looked broken

This commit splits each row of the table (not actually a table any more)
onto two lines. First line has the user’s info, second has their
permissions and any associated actions.
2016-07-07 12:43:35 +01:00
Chris Hill-Scott
c41944080c Make the tour interactive
_The code for this is quite hacky and light on tests. But I’d really like to get
it in the app for the research tomorrow to see how well the feature works._

This commit changes the tour from being a set of static screens to some help
which guides you through the process of sending your first test message.

The theory behind this is that what users are really struggling with is the
concept of a variable, rather than the relationship between the placeholders and
the column headers. And like learning to program, the best way to learn is by
taking an example and modifying it to your own needs.

This means that when someone adds their first service we set them up an
example email template and an example text message template. Then there is a
guided, three step process where _all_ the user can do is send a test message to
themselves.

Once the message is sent, the user still has the example templates which they
can edit, rather than having to remember what they’re supposed to be doing.
2016-05-25 13:14:09 +01:00
catherineheywood
d4c77f3164 Resize image file 2016-05-03 10:42:31 +01:00
catherineheywood
e11879ede7 Change JWT to JSON Web Tokens 2016-05-03 10:20:53 +01:00
Chris Hill-Scott
e89063e285 Move the image so the app can serve it 2016-04-15 12:15:30 +01:00
Chris Hill-Scott
66506d18bb Host image used in email template in app
Right now the crown logo in email templates is hosted on Github. Github
is not a CDN.

For now, hosting it in the app is a better solution. At some point we
should have a CDN for all assets on the app, which would be even better.

https://www.pivotaltracker.com/story/show/116952911
2016-04-07 09:29:05 +01:00
Chris Hill-Scott
47b86e70df Use SVG images for tour
SVG images will look sharper and scale more cleanly. However they are
not supported on older browsers[1]

> The <picture> element allows for fallback images when the browser
> doesn't support a specified image format.

`<picture>` is supported in the latest versions of Chrome, Firefox, IE
(Edge), Safari and Android, so all these browsers will get the SVG
version.

Older browsers will fall back to the PNG version.

[1] http://caniuse.com/#feat=svg
[2] https://css-tricks.com/a-complete-guide-to-svg-fallbacks/#fallback-svg-as-img-picture
[3] http://caniuse.com/#feat=SVG
2016-04-04 16:55:06 +01:00
Chris Hill-Scott
5d873bdc45 Show a tour when users first create a service
This commit adds a 3 screen tour, similar to those used on GOV.UK Verify
and Passports.

We guerilla tested this on Friday, and it really helped users to build a
mental model of how Notify works, so that when they’re playing around
with it they have a greater sense of what they’re aiming to do. This
makes concepts like templates and placeholders click more quickly.

https://www.pivotaltracker.com/story/show/116710119
2016-04-04 09:25:34 +01:00
Chris Hill-Scott
b38ae08ad6 Put some statistics on the dashboard
This commit adds two new sections to the dashboard

1. A banner telling you about trial mode, including a count of how many messages
   you have left today, which is a restriction of trial mode

2. Panels with counts of how many emails and text messages have been sent in a
   day, plus the failure rates for each

It does **not**:
- link through to any further information about what trial mode is (coming
  later)
- link through to pages for the failure rates (coming later)
- change the ‘recent jobs’ section to ‘recent notifications’
2016-03-17 14:06:12 +00:00
Chris Hill-Scott
bf3f6d7d3e Fix users page for research
For the lab sessions, users should just see themselves as the only user, not
all the fake users (it might confuse 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
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
5ebeec08ae Use a Node-based tools for handling assets
…or how to move a bunch of things from a bunch of different places into
`app/static`.

There are three main reasons not to use Flask Assets:
- It had some strange behaviour like only
- It was based on Ruby SASS, which is slower to get new features than libsass,
  and meant depending on Ruby, and having the SASS Gem globally installed—so
  you’re already out of being a ‘pure’ Python app
- Martyn and I have experience of doing it this way on Marketplace, and we’ve
  ironed out the initial rough patches

The specific technologies this introduces, all of which are Node-based:
- Gulp – like a Makefile written in Javascript
- NPM – package management, used for managing Gulp and its related dependencies
- Bower – also package management, and the only way I can think to have
  GOV.UK template as a proper dependency

…speaking of which, GOV.UK template is now a dependency. This means it can’t be
modified at all (eg to add a global `#content` wrapper), so every page now
inherits from a template that has this wrapper. But it also means that we have a
clean upgrade path when the template is modified.

Everything else (toolkit, elements) I’ve kept as submodules but moved them to a
more logical place (`app/assets` not `app/assets/stylesheets`, because they
contain more than just SASS/CSS).
2016-01-05 13:12:35 +00:00