Commit Graph

408 Commits

Author SHA1 Message Date
Chris Hill-Scott
82233340b6 Track errors when uploading spreadsheets
Uses the new javascript event tracking stuff so that we can see what
errors people are getting when they upload spreadsheets.
2017-07-20 12:06:15 +01:00
Chris Hill-Scott
eb264f34b7 Add a little JS module to track events
Google analytics lets you send:
- pageviews
- events

Page views are used by default. But sometimes you wanna count something
which isn’t the user navigating to a new page, or you wanna track
something which isn’t just what page they were looking it. This is where
events are useful.

This commit adds a small JS module that lets us fire off an event when
the presence of an element with the right data attributes are present on
the page.
2017-07-20 12:06:15 +01:00
Chris Hill-Scott
5b4a15495e Fix remove button keyboard focus on whitelist
Replicates @pcraig3’s work here:
https://github.com/alphagov/digitalmarketplace-frontend-toolkit/pull/333
2017-07-17 09:55:11 +01:00
Chris Hill-Scott
5fea26c7f7 Fix alignment and spacing of page footer on mobile
SASS pinched from here:
696ce451a7/source/pay-product-page/stylesheets/modules/_footer-categories.scss
2017-07-12 15:23:09 +01:00
Chris Hill-Scott
ef45a1d83f Merge pull request #1343 from alphagov/show-template-as-first-step-of-tour
Change step 1 of tour to only show the template
2017-07-04 08:55:16 +01:00
Chris Hill-Scott
4b74493b0d Fix redacted placeholder style on orange BG
Also does a tiny bit more tweaking of the vertical position to get it
looking aligned correct.
2017-06-30 14:04:12 +01:00
Chris Hill-Scott
37b710b57f Style redacted placeholders
The visual convention for redaction is heavy black crossing-out.

Our text colour isn’t always black exactly though (usually it’s very
dark grey, sometimes just dark grey). `currentColor` is a magical CSS
value that let’s us set the background colour to whatever the text
colour is. So both the text and redaction look like they are part of the
same thing.

Couple of subtle visual things here:
- opacity to make the colour better match the text colour – a filled box
  naturally looks darker than thin text, so this knocks it back a bit
- an inset shadow to take a few pixels of the bottom edge – the visual
  weight of text is biased upwards because text has ore capital letters
  and ascenders than descenders – this make it look aligned visually
2017-06-30 14:04:12 +01:00
Chris Hill-Scott
9f20ea4b7e Revert "Merge pull request #1336 from alphagov/revert-show-notifications"
This reverts commit 7e354ff341, reversing
changes made to 6f3bcff32f.
2017-06-30 14:01:18 +01:00
Chris Hill-Scott
480a57bba4 Change step 1 of tour to only show the template
We’ve made a few changes to the tour recently, without changing the
help text on the left hand side of the screen. So the stuff you see on
the right side of the screen doesn’t quite sync up any more.

This commit adds an extra, introductory page that just shows the
template and a next button, which better matches the ‘every message
starts with a template’ help text.
2017-06-29 12:16:47 +01:00
Chris Hill-Scott
6e48dc7689 Add a message saying a template has been redacted
This is useful if it’s been redacted by someone who isn’t you.
2017-06-28 15:27:09 +01:00
Chris Hill-Scott
9569521142 Add feature to mark a template as redacted
Works similarly to the delete template flow, because it’s a destructive,
one-way action.

Not on the edit template page, because it’s not something you want to be
considering every time you’re editing a template. And we saw that people
couldn’t find the delete button when it was on this page.

Adds a bit more CSS for the `dangerous` banner type, because the content
here is quite complicated. Breaking it into a list helps, but the
spacing didn’t look right, so needed some tweaking.

Can ship independently of the code that shows the redaction, but needs
the API first.
2017-06-28 15:27:07 +01:00
Chris Hill-Scott
4b212fbc76 Add logo for Enterprise Europe Network 2017-06-26 11:21:19 +01:00
Chris Hill-Scott
b450a349a3 Revert "Merge pull request #1328 from alphagov/notification-page-reworked"
This reverts commit 1797162248, reversing
changes made to 95b4d9eb31.
2017-06-23 15:56:25 +01: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
1797162248 Merge pull request #1328 from alphagov/notification-page-reworked
Add a page for each notification and start linking to it
2017-06-23 10:16:54 +01:00
Chris Hill-Scott
95b4d9eb31 Merge pull request #1326 from alphagov/bigger-dar-logo
Increase resolution of the TFL DAR logo
2017-06-23 10:16:47 +01:00
Chris Hill-Scott
010886e5be Make clickable areas bigger on tables with links
Generally, bigger click areas are better[1], as long as they don’t cause
ambiguity or accidental clicks.

This commit expands the clickable area of tables where the left-hand
column is a link to include the meta information under the link.

We can’t make the whole row clickable, because sometimes we have links
in the right hand column which go to a different place

This commit also removes the CSS for `.spark-bar-label`, because these
elements are visually identical to `file-list`s now.

1. https://en.wikipedia.org/wiki/Fitts%27s_law
2017-06-21 17:57:21 +01:00
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
b578c3589b Put status under message
Since we’ve removed the table of notifications from the single
notification page there’s no way of knowing the status of a
notification.

This re-adds it in a way that’s similar to how it looks on inbound
messages.
2017-06-21 15:15:13 +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
02f8e4e14b Remove unused CSS
This stuff if leftover from when we used to have the sidebar of links
next to each template.
2017-06-20 10:06:15 +01:00
Chris Hill-Scott
18e8b570d7 Make click areas bigger on template picker
Generally, bigger click areas are better[1], as long as they don’t cause
ambiguity.

This commit expands the clickable area of links to templates to include
hint text underneath which states the type of template.

1. https://en.wikipedia.org/wiki/Fitts%27s_law
2017-06-20 10:05:21 +01:00
Chris Hill-Scott
2ae80b5039 Add TFL Dial-A-Ride logo 2017-06-15 12:11:27 +01:00
Chris Hill-Scott
84ee8b8327 Stop fixed position elements flying about
Normally, fixed position elements are positioned at `top: 0`.

The code that stops them from overlapping the footer does so by:
- setting the position to absolulte
- setting `top` to a calculated value (eg `1500px`) which makes it sit
  above the footer

The problem is caused because we’re animating `top`, so when scrolling
back up the page elements are getting animated from `1500px` to `0px`,
ie flying up from the bottom of the screen.
2017-06-15 11:47:32 +01:00
Chris Hill-Scott
cbeade0380 Ease fixed-position elements into place
The transition between something being static in the page and fixed to
the top of the viewport is a bit jarring.

This commit adds a bit of animation so that, as elements become fixed,
they appear to catch up with the scrolling of the page.
2017-06-15 11:14:30 +01:00
Chris Hill-Scott
c60917d0e4 Merge pull request #1291 from alphagov/two-way
Add page to show two-way conversation
2017-06-14 16:42:46 +01:00
Chris Hill-Scott
681cea1d34 Make AJAX requests on activity page POST not GET
See parent commit for the reason we’re doing this.

Currently our AJAX requests only work as `GET` requests. So this commit
does a bit of work to make them work as `POST` requests. This is
optional behaviour, and will only happen when the element in the page
that should be updated with AJAX has the `data-form` attribute set. It
will take the form that has the corresponding `id`, serialise it, and
use that data as the body of the post request. If not form is specified
it will not do the serialisation, and submit as a `GET` request as
before.
2017-06-13 12:15:04 +01:00
Chris Hill-Scott
085f5f9b22 Stick H1 at top of page on conversation view
You’ll quite often be landing half way down this page. So the context
afforded by being able to see the phone number gives you some
reassurance that you’ve landed in the right place.
2017-06-10 12:03:10 +01:00
Chris Hill-Scott
e7ed1c1cfe Line up linked message in viewport
We anchor link to the relevant message in a thread. Which is good, but
it leaves the messages hard against the top edge of the viewport. This
looks sloppy. So this commit:

- makes each message focusable
- shifts the focused message with CSS to sit away from the viewport
2017-06-10 12:03:10 +01:00
Chris Hill-Scott
f6d8e55579 Add two-way messaging view
> Once an inbound message has been received, there should be a way to
> see the other messages in the system from the same service to the same
> number. Both in and outbound. Nice inbox/whatsapp stylee view or some
> such. This way the context of the reply is understood.
>
> Initially will only see the outbound template, not the actual message,
> but we’re going to change this for the rest (soon), so that you can
> always see the full message for all outbound.
2017-06-10 12:03:10 +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
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
80f0b4b2a2 Merge pull request #1297 from alphagov/search-outbound
Add search box to filter notifications by recipient
2017-06-01 16:09:20 +01:00
Chris Hill-Scott
43f6d21e1d Replace test with one-off
It’s a confusing proposition to have two features which are almost
identical. Even differentiating between them in the template menu would
be tricky.

I think the better thing to do is rename the whole feature to ‘send
one-off message’.

Then if someone wants to use there own phone number or email address,
give them a quick shortcut to doing that, once they’re in the flow.
In the background this reuses the ‘send yourself a test’ code, but
the user is never aware that they’re going through a different route
to send an individual message. So the proposition stays nice and clean.
2017-06-01 14:26:49 +01:00
Chris Hill-Scott
b9bf18b936 Add a form to filter notifications by recipient
Because manually editing the URL isn’t a great user interface, this
commit adds a search field to do this on the user’s behalf.

For this pass at the story it doesn’t do any validation – the user will
just get no results if they search by something which isn’t a phone
number or email address.

If the user navigates to a different ‘bucket’ of notifications (eg
delivered, failed) then the search term is reset, because they’ve
changed the filter which is at a level above the search term.
2017-05-30 15:11:34 +01:00
Chris Hill-Scott
47c55ccb2b Add tail to SMS message
Because:
- drawing things in CSS is fun
- when we have inbound messages, having a tail pointing the other way
  will help differentiate which messages are inbound
2017-05-24 16:14:02 +01:00
Chris Hill-Scott
217e975ae9 Clean up unused SCSS in SMS message component
Things we don’t do with SMS messages any more:
- put paragraphs in them (we use `<br>` tags instead, to allow for
  multiple linebreaks)
- pick them using radio buttons
- render the template’s name as part of the template
- render the phone number that the message will be sent from as part of
  the template
2017-05-24 14:18:23 +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
3106ea0e15 Make send yourself a test form stay at top of page
You might need to scroll this page quite a lot to see where a
placeholder appears in your template – especially if you have a long
email or letter.

One of the things I’m trying to stop happening so much is a lot of
scrolling back and forth. This would happen if you were scrolling down
to see the placeholder, then back up to fill in its value.

So this commit makes the textbox ‘sticky’, ie it always stays at the top
of the viewport, even when you scroll down. This lets you see the
placeholder and the textbox side by side, no matter how long the
template is.

The code to do this mostly comes from the GOV.UK Frontend Toolkit
(documented here: d9489a9870/docs/javascript.md (stick-at-top-when-scrolling)).
I had to add some extra CSS to make it look good when it overlaps the
content of the page, which the GOV.UK Frontend Toolkit implementation
doesn’t really anticipate.
2017-05-22 10:50:41 +01:00
Chris Hill-Scott
c32dbae8e9 Remove icons
We don’t use them anywhere, and removing this include should save a bit
of file size in the compiled CSS.
2017-05-17 08:56:11 +01:00
Chris Hill-Scott
fe5343e2c6 Remove duplicate include
This file is included again two lines below.
2017-05-17 08:55:50 +01:00
Chris Hill-Scott
3829002d65 Merge pull request #1261 from alphagov/wrap-email-meta
Make meta email preview meta info wrap nicely
2017-05-05 14:10:42 +01:00
Chris Hill-Scott
9be17bd728 Make meta email preview meta info wrap nicely
Because the email addresses can get pretty long, and have no spaces in
them, they sometimes break out of their containing box. This looks messy
and causes horizontal scrolling.
2017-05-03 15:12:25 +01:00
Chris Hill-Scott
d1cd74daa8 Update utils with to make letters unclickable
Brings in:
- [ ] https://github.com/alphagov/notifications-utils/pull/159

Means:
- renaming a bunch of things
- removing any CSS that targeted the link, and making it target the
  containing element too
2017-05-03 12:20:45 +01:00
Chris Hill-Scott
38eac48e7d Merge pull request #1248 from alphagov/fix-ghost-radio
Fix ghost radio button on API key page
2017-04-27 09:52:12 +01:00
Chris Hill-Scott
e247de6b00 Fix ghost radio button on API key page
I think the `opacity: 0.5` is a hangover from when the browser default
radio buttons were visible on the page – before the new radios and
checkboxes.
2017-04-26 13:04:35 +01:00
Chris Hill-Scott
e9754e92df Add a back button to the scheduler
We’ve seen in research a user getting stuck playing with the
scheduler. They picked a day, but then didn’t want to choose one of the
options for that day. There’s no way to do this except pick a day and
then un-pick it.

What they ended up doing was clicking the grey back button, which took
them back to the previous page, making them upload their file again.

This commit adds a ‘back’ link for the scheduler. ‘Back’ seems like
sensible naming because that’s the thing that the user tried to click,
and the UI of a link matches the thing they clicked to get into this
situation.
2017-04-26 11:36:45 +01:00
Chris Hill-Scott
d731de6edf Fix the focus handling on the scheduler
This got broken when we removed the old GOV.UK Selection Buttons
javascript in a592898eff
2017-04-26 11:34:39 +01:00
Chris Hill-Scott
cf80d0da26 Make position of letter edit links absolute
Previously they were relative (ie percentages). This made sure that they
worked on mobile, when the letter might be narrower.

However it broke when the preview was more than one page, because
13% of the height of 2 pages is different to 13% of the height of one
pages.

This commit changes the positions to be pixel values, which match the
calculated percentage values when the preview is one page.
2017-04-25 16:01:14 +01:00