Commit Graph

104 Commits

Author SHA1 Message Date
Andrew Shumway
f218c01244 Remove commented out code 2024-06-26 08:34:05 -06:00
Andrew Shumway
a9e4df0591 Todays data is only todays 2024-06-24 10:44:19 -06:00
Andrew Shumway
a401562735 Add report options 1/3/5-day 2024-06-10 10:15:22 -06:00
Beverly Nguyen
50dc153cd8 removed UTC text 2023-12-13 23:12:02 -08:00
Beverly Nguyen
6edc20df55 removed UTC text 2023-12-13 15:17:04 -08:00
Jonathan Bobel
b1c6a768ec Committing before merge 2023-08-30 11:07:38 -04:00
Jonathan Bobel
a4fc40bcba Renamed components folder, put failing tests back in to get some assistance with those 2023-08-22 12:40:53 -04:00
Jonathan Bobel
348e29fb40 - Removed links to the gov uk stylesheets
- Deleted /stylesheets folder
- Removed sass build from gulpfile
- Changed gov links to usa links
- Changed other govuk styles, like breadcrumbs
- Changed name of uk_components file to us_components
- Fixed a few tests that broke on account of the changes
2023-08-08 16:19:17 -04:00
Kenneth Kehl
d2d7a75a5f notify-536: accurately reflect delivery receipts in UI (#551) 2023-06-27 11:20:58 -04:00
Carlo Costino
92d25f5a69 Convert frontend display to be just UTC (#540)
This changeset converts the display of dates and times to be just UTC to match the recent changes in the backend.  This unwinds a bit of work that was done previously and allows us to start with a clean slate in how we want to approach displaying dates and times going forward. It also adds a bit of explanatory text to help users.

Signed-off-by: Carlo Costino <carlo.costino@gsa.gov>
Co-authored-by: stvnrlly <steven.reilly@gsa.gov>
2023-06-12 15:49:48 -04:00
Jonathan Bobel
e0d2d74067 Update dashboard and template flow (#514)
* Updated header and footer
* Moved files around and updated gulpfile to correct the build process when it goes to production
* Updated fonts
* Adjusted grid templating
* Adding images to assets
* Updated account pages, dashboard, and pages in message sending flow
* Updated the styling for the landing pages in the account section once logged in
2023-06-08 13:12:00 -04:00
stvnrlly
ac1d5f0983 move vendored uk components to templates 2022-12-14 11:55:21 -05:00
stvnrlly
6233e35902 more accurate css classes 2022-12-12 15:15:50 -05:00
stvnrlly
944715ac46 big commit with letters removal 2022-12-05 15:33:44 -05:00
Katie Smith
cdfe852d25 Add filetype to all links to download user reports / examples 2022-05-24 10:27:27 +01:00
Chris Hill-Scott
24b579418f Replace message count macros with formatters
We prefer formatters now. Removing uses of the aliasing macro lets
remove it entirely.
2021-01-07 14:53:12 +00:00
Chris Hill-Scott
4615c0ea3d Replace recipient macros with formatters
We prefer formatters now. Removing uses of the aliasing macro lets
remove it entirely.
2021-01-07 11:57:30 +00:00
Pea Tyczynska
2bdecbca6f Remove unused textbox imports
When we converted textboxes on Notify to govuk-frontend design system
style with @tombye , we did not remove the imports.
This work is now done in this commit.

Some things that will still stay in our repo for now:

textbox macro in our components folder and associated css
textboxes which are really textarea fields (🤷 how do they work)
textboxes on the styleguide page

We should revisit this when we convert textarea fields
to govuk-frontend.
2020-10-16 10:23:45 +01:00
Tom Byers
c6711a113c Update h1 on pill pages to work with new pill
Pill pages are:
- /notifications
- /template-usage
- /monthly
- /organisations/<organisation_id>
- /templates

Includes changes to:
- the folder-path component
- the page-header component

...all their h1s have the same id.
2020-09-04 09:02:36 +01:00
Tom Byers
d21b9475ba Convert SearchFields to GovukSearchFields
Changes those fields in the following forms:
- SearchByNameForm
- SearchUsersByEmailForm
- SearchUsersForm
- SearchNotificationsForm

Includes changes to templates that use this form
and associated tests.
2020-08-12 10:34:50 +01:00
Chris Hill-Scott
986f2752e0 Let users search for letters
Like we have search by email address or phone number, finding an
individual letter is a common task. At the moment users are having to
click through pages and pages of letters to find the one they’re looking
for.

Users of the API will also be able to search by reference, same as for
emails and text messages. But we only show this hint text to users who
have some API keys.
2020-04-23 16:44:41 +01:00
Chris Hill-Scott
a2929ad748 Delay AJAX calls if the server is slow to respond
By default our AJAX calls were 2 seconds. Then they were 5 seconds
because someone reckoned 2 seconds was putting too much load on the
system. Then we made them 10 seconds while we were having an incident.
Then we made them 20 seconds for the heaviest pages, but back to 5
seconds or 2 seconds for the rest of the pages.

This is not a good situation because:
- it slows all services down equally, no  matter how much traffic they
  have, or which features they have  switched on
- it slows everything down by the same amount, no matter how much load
  the platform is under
- the values are set based on our worst performance, until we manually
  remember to switch them back
- we spend time during incidents deploying changes to slow down the
  dashboard refresh time because it’s a nothing-to-lose change that
  might relieve some symptoms, when we could be spending time digging
  into the underlying cause

This pull request makes the Javascript smarter about how long it waits
until it makes another AJAX call. It bases the delay on how long the
server takes to respond (as a proxy for how much load the server is
under).

It’s based on the square root of the response time, so is more sensitive
to slow downs early on, and less sensitive to slow downs later on. This
helps us give a more pronounced difference in delay between an AJAX call
that is fast (for example the page for a single notification) and one
that is slow (for example a dashboard for a service with lots of
traffic).

*Some examples of what this would mean for various pages*

Page | Response time | Wait until next AJAX call
---|---|---
Check a reply to address | 130ms | 1,850ms
Brand new service dashboard | 229ms | 2,783ms
HM Passport Office dashboard | 634ms | 5,294ms
NHS Coronavirus Service dashboard | 779ms | 5,977ms
_Example of the kind of slowness we’ve seen during an incident_ | 6,000ms | 18,364ms
GOV.UK email dashboard | `HTTP 504` | 😬
2020-04-09 12:05:18 +01:00
Chris Hill-Scott
aba5e19805 Drop frequency of AJAX updates on notifications page
This is another page that puts load on the database, so let’s treat it
the same as the dashboard.
2020-03-23 12:56:26 +00:00
Katie Smith
a85f7fa2c1 Replace the .column-... classes in _grids.scss
We had 7 classes in _grids.scss named `.column-...` which were being
used to give a certain column width. These worked by using `@include
grid column()`, which is now deprecated.

`.column-whole` and `.column-three-quarters` can be removed and replaced
with `govuk-grid-column-full` and `govuk-grid-column-three-quarters`
respectively. The other column classes don't have a direct replacment in
GOV.UK Frontend. To get round this, we overwrite the `$govuk-grid-width`
SASS map in `extensions.scss` to add in extra widths, then use this with
the `govuk-grid-column` mixin to create new classes in for our custom
widths in `_grids.scss`
2020-03-06 11:11:41 +00:00
Katie Smith
b0d714f313 Replace column-one-quarter with govuk-grid-column-one-quarter 2020-03-06 11:11:41 +00:00
Katie Smith
b9b9a138f9 Replace grid-row with govuk-grid-row
Replaced all instances of `grid-row` in the HTML and JavaScript with
`govuk-grid-row`, which is the new GOV.UK Frontend class.
2020-03-06 11:11:41 +00:00
Tom Byers
ee9f348ce4 Update all links to use GOVUK Frontend style
Includes:
- turning off :visited styles to match existing
  design
- swapping heading classes used to make links bold
  for the GOVUK Frontend bold override class
- adding visually hidden text to some links to
  make them work when isolated from their context

We may need to revisit whether some links, such as
those for documentation and features, may benefit
from having some indication that their target has
been visited.
2020-02-25 10:47:24 +00:00
Tom Byers
5b306dde4d Revert "Convert all links to govuk frontend" 2020-02-24 11:56:38 +00:00
Tom Byers
cd36182ea6 Update all links to use GOVUK Frontend style
Includes:
- turning off :visited styles to match existing
  design
- swapping heading classes used to make links bold
  for the GOVUK Frontend bold override class
- adding visually hidden text to some links to
  make them work when isolated from their context

We may need to revisit whether some links, such as
those for documentation and features, may benefit
from having some indication that their target has
been visited.
2020-02-20 09:11:26 +00:00
Katie Smith
7ff8b73088 Update buttons that are inline with search box
There were 3 pages where we had a search button inline with a text box.
This replaces the search button with a button from govuk-frontend and
updates the way we style this button to use BEM, which is the style we
now want to use.
2020-02-17 08:05:05 +00:00
Chris Hill-Scott
4da9c44919 Tell users that they can search by reference
Users who have an API integration (and therefore have a way of passing
in a reference for each notification) can now search by that reference
(see https://github.com/alphagov/notifications-api/pull/2682)

This commit changes the label on the search box to tell these users that
this is possible, without changing the label for users without an API
integration, who might get confused by what ‘reference’ means.

It also makes the label consistently say ‘email address or phone number’
(ie email address is first) because this is our content style.
2019-12-17 10:19:19 +00:00
Pea Tyczynska
9f99ebd53b notifications page title for failed letters is titled 'Failed letters' 2019-01-10 15:27:05 +00:00
Chris Hill-Scott
d9da219b7e Use a macro for form tags
This will stop us repeatedly forgetting to add `novalidate` and
`autocomplete='off'` to our forms (which is how most of them are set
up).

It uses sensible defaults, based on how we most-commonly configure
forms:
- most of our forms are `post`ed (but this can be overridden)
- `autocomplete` should only be enabled where it makes sense, otherwise
  it’s more annoying than useful (but this can be overriden)
- we should never be using HTML5 form validation because our own error
  styles and messages are better
2018-09-19 12:43:15 +01:00
Alexey Bezhan
e3a0adc293 Use per-service data retention period to display notifications page
Uses the configured service data retention page to display retention
period length, notification counts and fetch notifications from the
API on the notifications page.
2018-08-13 17:07:49 +01:00
Chris Hill-Scott
d2fc613270 Put counts back on notifications page
We think there is some need for users who don’t need to see the
dashboard to quickly find out which messages have failed.

So this commit brings back the status filters for all users (previously
those with ‘basic view’ wouldn’t have had them).

This makes it less of a drastic change when the `view_activity`
permission is removed from a user.
2018-08-09 11:56:16 +01:00
Chris Hill-Scott
b946a6008d Add H1 to sent messages page
> Suggest making the H1 visible here for consistency, but also to make
> it clear to users what they’re looking at.

> This screen is similar to – but not exactly the same as – the
> individual text, email and letter dashboard screens from Admin view,
> so the H1 could help to distinguish it from them for users who may
> have interacted with both.
2018-07-13 17:02:27 +01:00
Chris Hill-Scott
3902d0a05c Hide ‘7 days’ paragraph from basic view
It looks too prominent as a paragraph on the page. This commit moves
the info about how long we keep data for into the ‘empty’ message we
show when there are no results (ie the message people will see if they
search for something that was sent more than 7 days ago).
2018-07-10 17:08:02 +01:00
Chris Hill-Scott
199c699e11 Hide download all link in basic view
Can’t think of a good reason why someone who is only sending messages
would need a download of all the messages their entire team has sent.

Most of the ‘caseworking’ teams have been getting on fine without this
link; it’s only recently we brought it back.
2018-07-10 15:59:24 +01:00
Chris Hill-Scott
883f51b823 Fix page title on sent messages 2018-07-05 11:53:42 +01:00
Chris Hill-Scott
e3e9333840 Remove counts from sent
Counts of sending/failed/delivered are ‘management information’ or
‘reporting’. We don’t think that caseworkers need to see this
information.

The idea of the caseworking view is to remove stuff that caseworkers
don’t need to see.
2018-07-05 11:53:42 +01:00
Chris Hill-Scott
b0cb9ff58e Add sent notifications page for caseworkers
The other task that caseworkers have to do (much less often than sending
messages) is look at the messages which they’ve sent. The reason for
doing this is usually to find a specific message which someone has
complained about.

This commit adds:
- a page where they can do that
- a navigation item so they can get to that page

We reckon that because this is about finding specific messages, not
reporting that it’s fine to mush all the channels (email, text, letter)
into one table.
2018-07-05 11:53:42 +01:00
Rebecca Law
72b0637f92 Add the download activity link for notifications.
This works locally for a long running request and a large number of messages. However I suspect that nginx may be timing out the request. I'd like to try this on staging.
2018-06-25 16:29:40 +01:00
Chris Hill-Scott
9aa4a7267a Use <button> not <input>s for form submission
Both `<button type='submit'>Submit<button>` and
`<input type='submit' value='Submit'>` can be used to submit a form.

We have historically[1] used `<input>` because it’s better-supported by
IE6 in that:
- the `submit` attribute is mandatory on `<button>`, not on `<input>`
- the `innerHTML` of a button will be submitted to the server, not the
  value (as in other browsers)

Reasons to now use `<button>` instead:
- IE6/7 support is no longer a concern (especially with deprecation of
  TLS 1.0 on the way)
- Because an `<input>` element can’t have children, the pseudo-element
  hack[2] used to ensure the top edge of the button is clickable doesn’t
  work. We’re seeing this bug[3] affect real users in research.

1. We inhereted our buttons from Digital Marketplace, here is me making
   that change in their code:  8df7e2e79e (diff-b1420f7b7a25657d849edf90a70ef541)
2. 24e1906c0d (diff-ef0e4eb6f1e90b44b0c3fe39dce274a4R79)

3. https://github.com/alphagov/govuk_elements/issues/545
2018-02-01 13:53:45 +00:00
Rebecca Law
86d1df2a31 Gunicorn will timeout a process after 30 seconds.
The marshmallow schema takes too long, we need to fix the performance of that first.
2018-01-17 12:47:15 +00:00
Rebecca Law
8a026dfdeb The downloading of the CSV is working for as many as 190, 000 notifications.
This PR re-enables the download link and filters the notifications by templates type.
2018-01-15 12:29:03 +00:00
Katie Smith
7386d5ec1c Fix 500 error from notifications/letter.json page
The letters notification page makes ajax calls to update the status - these
were failing because it's making a POST request without a CSRF token.
(The email and SMS notification pages contain a search form that includes
the hidden CSRF input, so this was only occurring with the letters
page.)

This commit adds a hidden form for the letters page which just contains
the CSRF token.
2018-01-15 09:21:12 +00:00
Rebecca Law
135b0ad131 Revert download link.
There is some inconsistencies about how it is working, that needs to be solved.
2018-01-12 16:15:53 +00:00
Rebecca Law
259db9c271 Put the download csv link on the activity page.
Still needs some tests, probably some refactoring as well.
2017-12-30 16:54:39 +00:00
Chris Hill-Scott
57ca2b48ee Add extra letter spacing to phone number search
This is another place where you might be transcribing a phone number and
having it spaced out will make it easier for you to spot errors.
2017-10-31 17:54:22 +00:00
chrisw
43395bc9d9 Added letters info to service / admin dashboard & activity page 2017-10-03 10:28:34 +01:00