Commit Graph

483 Commits

Author SHA1 Message Date
Chris Hill-Scott
1fba5d186d Highlight selected navigation item
In research I’ve sometimes seen people click the wrong nav item. I
reckon that people’s concept of which pages live behind which navigation
items isn’t very strong.

We can reinforce this relationship by showing, for every page, which is
the corresponding nav item. The conventional way of doing this is either
with some kind of emphasis, typically colour or bold. I’ve gone for bold
because colour would be weird.

---

The implementation of this is quite loosely coupled to our application
code because:
- our application code is not well structured (eg we don’t make any use
  of blueprints)
- spreading this change across lots of files in our application would
  make it harder to test without actually hitting each endpoints; such
  tests would be slow and verbose

So I’ve gone for more of a meta approach. Rather than testing that each
endpoint has a specific navigation item selected, I’ve gone for
validating that:
- all endpoints being mapped to are real
- all endpoints have _a_ selected navigation item (or are specifically
  excluded)

This means that it’s impossible to add, change or remove an endpoint
without also updating which navigation item should be selected. And the
actual mapping is so declarative that it testing it would be redundant.
2018-04-25 09:37:35 +01:00
Chris Hill-Scott
fccd4367e4 Even out spacing on templates page
…when search box is present
2018-04-05 14:55:02 +01:00
Chris Hill-Scott
51d3277fde Stop shims from blocking clicks on lower elements
https://developer.mozilla.org/en-US/docs/Web/CSS/pointer-events
2018-03-29 14:19:33 +01:00
Chris Waszczuk
59803348a4 Merge pull request #1974 from alphagov/org-links-dont-show-if-user-doesnt-have-permissions
Org links don't show if user doesn't have permissions
2018-03-21 16:15:42 +00:00
chrisw
c47a4ab830 org links don't show if user doesn't have permissions 2018-03-21 15:23:01 +00:00
Chris Hill-Scott
ca26db14d4 Make email branding logo backgrounds higher contrast
So you can see both white and black foreground on transparent backgrounds.
2018-03-20 13:30:44 +00:00
Leo Hemsted
90c40075c8 Merge pull request #1954 from alphagov/choose-accounts
Choose accounts
2018-03-19 15:26:06 +00:00
Chris Hill-Scott
290424c4eb Put checkered background behind email branding
This will stop images which are white with a transparent background
being invisible in the admin app (and accidentally getting overwritten).
2018-03-19 13:11:32 +00:00
chrisw
7e4c5c97b0 adjusted lists for choose accounts page 2018-03-14 15:39:55 +00:00
Chris Hill-Scott
9435f69a6e Remove warning banner from dashboard (and app)
We have teams who are using the dashboard every day, and being
confronted with this alarming yellow banner. There’s no action they need
to do since they’re only looking at the messages sent.

So this commit removes that banner from the dashboard. It also removes
the CSS and HTML for it from the app entirely because this is the last
remaining place we were using this style of banner.
2018-03-12 16:04:27 +00:00
Chris Hill-Scott
9838c3908b Add line to template page if you can’t do anything
If someone has no permissions but needs permissions the thing they’re
probably going to need is to send a message or edit a template.

The place they will probably come to is the place where the buttons
would be – users with these permissions are finding the thing they need
to do on this page.

So this commit adds a line to this page which (hopefully) makes it clear
they’re in the right place, but need to go and speak to someone.
2018-03-12 16:02:33 +00:00
Athanasios Voutsadakis
440f1bdc7c assets' 413.html is not used anymore 2018-03-09 10:51:48 +00: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
Chris Hill-Scott
152b1f5256 Fix border around letter images
Things in CSS stack top to bottom like this:
- image
- `box-shadow`
- `background`

We are drawing the border around the letter using `box-shadow`. This was
working fine because the images of our letters had a transparent
background, so you could see the border through them.

At some point our letters have changed to have a white background. So
you can no longer see the border.

This commit:
- adds a new pseudo element which stacks above the image of the letter
- moves the border from the image itself to said pseudo element
2018-03-06 15:50:56 +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
2435a29672 Merge pull request #1838 from alphagov/beta-banned
Remove beta badge from header
2018-02-26 10:02:53 +00:00
chrisw
9ad4435d94 Change organisations to email branding 2018-02-07 17:41:23 +00:00
Chris Hill-Scott
6c3ee7a6ea Remove beta badge from header
We have found repeatedly in research that our users don’t know what
‘beta’ means. In this situation they come up with their own
interpretation of what it means, for example that:
- certain features are not available to them
- Notify as a whole is not available to them
- they are using a ‘different’ version of Notify to those using it for
  real

In the most severe cases this ambiguity actively dissuades users from
adopting Notify. We know this from support tickets and user research;
there are probably a host of other teams we haven’t spoken to.

Here’s a quote from a user research session just last week:

> Once we’ve got the facility to receive inbound messages […] that’s not
> available to us at the moment with a beta account

From support tickets:

> We see that the service is still in beta mode – can we assume
> uninterrupted service reliability and performance?

> we do not have a .gov.uk email address any longer but I was wondering
> if we would be able to utilize the notify system which is currently in
> beta

> We are currently using the BETA version, are we able to switch to the
> TEST version so we can add other numbers to send SMS to?

> I have previously enquired about this option [receiving text messages],
> but thought it was still at Beta stage. If we can set it up so that
> notify handles the responses that would be great.

> [after going live] Should I see the wording LIVE on the login screen
> as I still see BETA.,....

> Also I note that you are a BETA service just now and that to use the
> service we would need a .gov.uk email address. We don't have this, is
> there any way that [redacted] could use the service as I note that one
> of the teams have an account?

---

This commit removes the beta badge from Notify, and hopefully with it
the confusion it’s causing our users.
2018-02-05 15:31:47 +00:00
Chris Hill-Scott
29c31c45f2 Merge pull request #1815 from alphagov/add-letters-to-product-page
Update product page to talk about letters
2018-01-30 11:09:06 +00:00
Chris Hill-Scott
61ca391575 Merge pull request #1766 from alphagov/fix-table-show-more-spacing
Fix spacing of table footers
2018-01-26 16:13:45 +00:00
Chris Hill-Scott
a4e6ef89a7 And fix spacing for inbound… 2018-01-26 16:08:48 +00:00
Chris Hill-Scott
9ac2c49d4e Fix spacing of ‘only showing […] rows’ message
It was too far apart.

Can’t be fixed by reducing the margin on the table because this would
bring the table too close to other elements when the ‘only showing’
thing isn’t present.
2018-01-26 15:52:07 +00:00
Chris Hill-Scott
f332c9af7c Fix spacing between spreadsheet and download link
It was too far apart.
2018-01-26 15:51:23 +00:00
Chris Hill-Scott
25ad3037aa Allow page headings to word-wrap
This is mostly for template names, which can be very long, unbroken
strings, especially if developers have been naming them.
2018-01-26 14:47:56 +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
chrisw
e6690c8a78 Updated email preview to mimic sent emails 2018-01-17 16:54:35 +00:00
Chris Hill-Scott
784f577c4d Improve redraw performance
It’s noticeable when clicking from row to row in the spreadsheet that
the page jumps around a fair bit on load because there are a couple of
Javascript-powered components.

This commit makes sure:
- the radio select component doesn’t change height when rendering for
  the first time
- the scrollable table doesn’t show parts of the table that should be
  hidden by overflow for a fraction of second before all the JS has
  run
- the right-hand shadow on horizontally scrollable tables doesn’t fade
  in on initial page load but shows at 100% opacity immediately
2018-01-15 14:45:38 +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
17ea920be4 Update previous/next navigation to match GOV.UK
The pagination pattern on GOV.UK changed in:
https://github.com/alphagov/static/pull/1051

We should update ours to match because:
- consistency
- the new icons looks better
2018-01-08 15:59:55 +00:00
Chris Hill-Scott
aa22568c64 Fix bug horizontal scrollbar being pushed off page
We weren’t calculating the height quite right; we were trying to
compensate for something that should have been compensated for in the
`stick-at-top-when-scrolling` code.

Add the 5px to the shim there is required because we’re adding it to the
element that the shim in replacing.
2017-12-20 15:37:34 +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
e3be2522f4 Fix jumpy cancel button 2017-12-20 12:09:18 +00:00
Chris Hill-Scott
a58cb75b88 Force scrollbar always visible on OS X 2017-12-20 12:09:18 +00:00
Chris Hill-Scott
8bfb67c702 Go fullscreen for row-level errors in spreadsheets
Two bits of context:

1. As we start dealing with letters, which have more columns, it’s more
   likely that people’s spreadsheets won’t fit in our current layout.

2. We already removed the view of the template from the page that shows
   row-level errors (eg bad phone number or missing personalisation) in
   spreadsheets because you don’t need to know about the content of the
   message in order to fix the errors.

This commit goes further by removing anything that isn’t to do with
the errors, including the normal GOV.UK header and the service’s
navigation.

This means the content can go the width of the page, which means it can
be allowed to scroll horizontally without being a usability car
crash. Which means that the layout doesn’t break with a spreadsheet that
has lots of columns.
2017-12-20 12:09:18 +00:00
chrisw
90e18e04ee Updated support views to represent new url structure 2017-11-29 13:58:12 +00:00
chrisw
ebb7275158 Added styling for sub-navigation 2017-11-28 11:53:24 +00:00
Chris Hill-Scott
2bf2b4b460 Merge pull request #1619 from alphagov/remove-references-to-computed-column
Remove references to computed column
2017-11-20 10:27:30 +00:00
Chris Hill-Scott
7d1cf2169d Show text message sender in send one-off flow
If you’ve chosen a text message sender then it’s good to see
confirmation of your choice.

This replicates what we do when you choose an email reply-to address.
2017-11-16 16:43:44 +00:00
Chris Hill-Scott
1412933356 Make dashboard totals smaller if numbers are big
Numbers over a billion overflow the two column layout. Numbers over one
hundred thousand overflow the three column layout.

This commit makes the type size smaller in these cases, so that the
numbers still fit in the boxes.
2017-11-09 17:50:19 +00:00
chrisw
c6ea90a7d8 Email auth for inviting members and editing permissions 2017-11-02 12:38:01 +00:00
Chris Hill-Scott
aaad23d895 Merge pull request #1583 from alphagov/add-ga-settings
Standardise Google Analytics tracking across GaaP
2017-10-27 13:05:07 +01:00
Chris Hill-Scott
62fcc2429f Standardise Google Analytics tracking across GaaP
These are the settings that our analytics person has said we should be
using across all the GaaP products.

This commit also makes sure our tracking code is identical across all
the templates that have it in (including the obsfucation of UUIDs). We
may want to remove the ID obsfucation later on, but for now let’s make
sure it’s happening consistently in all the places.
2017-10-26 11:11:05 +01:00
Chris Hill-Scott
127c381d22 Tidy up layout of letter contact blocks
Linebreaks are an important part of the letter contact block, and make
it easier to read.

Bold text works for short pieces of info like email addresses or phone
numbers, but is too heavy for the letter contact blocks because they
tend to be longer.
2017-10-25 11:46:12 +01:00
Chris Hill-Scott
e49693281a Right-align reply link in conversation view
So that it lines up with the outbpund messages.

Also the ‘send’ button is usually right-aligned when using Whatsapp,
iMessage, etc.
2017-10-24 12:00:51 +01:00
Chris Hill-Scott
5fe3bfc550 Merge pull request #1547 from alphagov/download-inbound
Let users download a CSV of inbound messages
2017-10-18 17:27:54 +01:00
Chris Hill-Scott
4582e95576 Merge pull request #1550 from alphagov/focus-fix
Fix invisible focused item text
2017-10-18 12:34:02 +01:00
Chris Hill-Scott
c096397390 Truncate inbound message content
Inbound text messages can run over multiple lines. This makes the page
harder to scan. Your phone, and the outbound messages page, only show
the first line of the text message, and truncate the rest with an
ellipsis.

This commit does the same for inbound text messages.

It also stops the timestamp for the inbound messages being squashed and
wrapping over multiple lines, which looks messy.

We couldn’t do this before, because it would have stopped people from
being able to copy/paste the full message content from this page.
2017-10-18 10:27:57 +01:00