Commit Graph

58 Commits

Author SHA1 Message Date
Jonathan Bobel
765920ef0a Change to the table width on overflow to have less wrapping text 2024-07-26 10:38:00 -04:00
Jonathan Bobel
dfcd71a6d3 Updates to table wrappers across the application
Grid update to dashboard
Small style updates
2024-07-25 15:36:31 -04:00
Jonathan Bobel
2c57d0d373 1213 - Removed the Usage page and updated the Dashboard Landing page 2024-03-28 15:58:02 -04:00
Jonathan Bobel
026ed52ce5 When resizing the viewport for the header, I noticed other responsive issues and addressed them here 2024-03-05 09:51:25 -05:00
Jonathan Bobel
d9875ef287 Content updates for Pricing, Trial Mode, and various areas of changing "message parts" 2024-01-25 14:55:17 -05:00
Jonathan Bobel
06a15c5afc 927 - Updates to math in Dashboard area 2023-11-16 12:02:59 -05:00
Jonathan Bobel
0a11211c81 Changing the layout of the page to a table view 2023-10-31 14:22:00 -04:00
Jonathan Bobel
0cc91b43a9 800 - combining and updating the wording around messages remaining 2023-10-31 12:03:21 -04:00
Jonathan Bobel
c7e05246b1 808 - formatted annual usage section 2023-10-02 15:12:36 -04:00
Jonathan Bobel
412fad89ff Changing the govuk grid to USWDS 2023-08-23 16:18:25 -04:00
Jonathan Bobel
bad2fd5fe4 Adjusted styles to *not* break tests 2023-08-15 16:45:48 -04:00
Jonathan Bobel
27a193160f 619 - Removing all mention of emails from the pilot (#615) 2023-07-28 11:03:37 -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
Ryan Ahearn
73a3511ef2 Remove uses of inline-styles 2023-03-08 09:08:07 -05:00
stvnrlly
de30221ae3 more dashboard rearrangment 2022-12-02 09:29:12 -05:00
stvnrlly
f49e2a9e6e more gray for dashboard 2022-12-01 10:18:12 -05:00
stvnrlly
3e28baa733 deemphasize non-sms elements 2022-12-01 08:53:50 -05:00
Steven Reilly
3cabdf4f38 Merge branch 'main' into stvnrlly-hide-letters 2022-10-14 15:33:01 -04:00
stvnrlly
a2c6c2f08c remove letters from dashboard 2022-10-13 20:51:45 +00:00
stvnrlly
067b4b3742 swap dollar symbols for pound symbols 2022-10-12 20:16:22 +00:00
Ben Thorner
4abb6110c8 Fix keys used to render monthly usage
These were out-of-sync with the API.
2022-05-11 13:28:33 +01:00
Ben Thorner
3449ccd923 Support multiple SMS rates per month on usage page 2022-05-03 16:01:13 +01:00
Ben Thorner
d798a0d60f Replace manual SMS monthly calculations with API
This starts using the sms_{cost, charged, free_allowance_used}
fields in the new API to replace the "get_free_paid_breakdown"
function we had before, which could not support multiple rates.

In order to use "get_free_paid_breakdown" the calling method had
to store a "cumulative" variable to calculate the free allowance
used so far, which is now done by the API.

To calculate the data for conftest.py, I had to start from the
bottom ("April") and manually calculate the free allowance used
to emulate the API - this is what "cumulative" used to do.
2022-05-03 16:01:06 +01:00
Ben Thorner
246356649f Rename monthly usage attributes to match API
This should make the subsequent changes to use the new API fields
a bit clearer, and also matches the annual usage attributes [^1].

[^1]: 3a1ac189ff/app/main/views/dashboard.py (L343-L350)
2022-05-03 16:01:01 +01:00
Ben Thorner
e6c04ef556 Support variable rates for annual usage stats
Note: I've removed the pricing assertion in the "0_free_allowance"
test as it's covered elsewhere - the value of the test is really to
check that we don't show the remainder if there never was any.
2022-04-27 17:06:17 +01:00
Ben Thorner
715a3c137f Rename ambiguous "sms_chargeable" Jinja variable
Now that we have the term "charge*able*_units" we should clarify
this variable is the number we will actually charge for.
2022-04-27 17:06:16 +01:00
Ben Thorner
e0aa51c306 Use new "cost" field in usage APIs
The previous, manual calculation could be incorrect depending on
which SMS rates the free allowance was attributed to.

The new field also supersedes the old "letter_total" bolt-on so we
can get cost information consistently for both types.
2022-04-27 17:06:12 +01:00
David McDonald
2706ec4c73 Take sms_rate from monthly usage data
At the moment, we put the sms rate on the usage page for each
months billing data by taking the single sms rate for the year.

The assumption that there will be a single sms rate for the year is
no longer going to be true. Therefore, instead we take the sms
rate from the monthly data itself which tells us the rate for
a months worth of sent SMS.
2022-04-26 10:38:10 +01:00
David McDonald
d18c787a02 Give better names to usage page variables
`free` becomes `sms_free_count`
`paid` becomes `sms_paid_count`

This small change is just to help with readability for this
complex area of code
2022-04-25 11:27:03 +01:00
Chris Hill-Scott
d11beee5b6 Hide remaining free allowance if it starts at 0
If your free allowance starts a 0 (which we have done for some services
this year) it’s redundant to say ‘0 of 0 remaining’.
2022-04-20 10:53:05 +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
Rebecca Law
7cae303104 Fix unit tests for changes to the pill component. 2020-09-08 10:12:23 +01:00
Katie Smith
756a17f8db Add filter for formatting a number as currency
This is used on the usage page, but is likely to become useful in other
places now that letter rates can be greater than £1.
2020-07-15 14:09:49 +01:00
Katie Smith
355e981028 Show international letters on the usage page
The api returns letter details split by postage, so international
letters are returned with a postage of `europe` or `rest-of-world` not
`international` and these rows need to be added together when the rate
is the same before they are displayed on the usage page.

To do this, we need to replace the postage of `europe` and
`rest-of-world` with `international`. The data then needs to be sorted
by postage and rate before the letter units for rows which are
international and have the same rate are added together.
2020-07-15 14:09:49 +01:00
Katie Smith
2a6691f665 Refactor letters code for usage page
No functional changes, but this changes the letter details that are
used for the usage page from a tuple to a named tuple since this makes
it easier to understand.
2020-07-15 14:09:49 +01:00
Katie Smith
bf949044bc Replace column-two-thirds with govuk-grid-column-two-thirds 2020-03-06 11:11:41 +00:00
Katie Smith
07bcb4220e Replace column-one-third with govuk-grid-column-one-third
Also replaces `column-third`, with `govuk-grid-column-one-third`, since
this appears to be an alias of `column-one-third`.
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
Chris Hill-Scott
220da2e5be Rename usage with letters template
It’s the only usage template now.
2019-10-29 16:29:33 +00:00
Chris Hill-Scott
7e699c93ca Always show letters on the usage page
Even if your service doesn’t send letters now, it might have done
previously.

The original reason for hiding letters was because it wasn’t a mature
feature. But now that it is, we should make it discoverable even for
existing teams. So that means not conditionally hiding it.

This is the same thing we do for emails/texts, where even if you switch
them off they still show up on the dashboard and usage page.
2019-10-29 16:17:14 +00:00
Chris Hill-Scott
d9da63401f Normalise heading sizes
Since we added template folders the templates page has had a ‘medium’
sized heading, where other pages have stuck with a ‘large’ size.

This commit rationalises the decision around which pages have which
heading size:
- ‘navigation’ pages (eg templates, team members, email reply to
  addresses) have medium sized headings
- transactional pages (ie ones which have a green button) keep the
  larger heading size
2019-04-30 15:30:31 +01:00
Katie Smith
0d842d3700 Pluralize notification type correctly on usage page
This change makes sure that we display '1 letter' instead of '1 letters',
and '1 text message' instead of '1 text messages' on the usage page.
2018-10-03 15:15:19 +01:00
Rebecca Law
e7f94bd007 Add a template to show letter usage if the service has the letter permission 2017-12-20 16:28:40 +00:00
Rebecca Law
b7db7debc5 Add letters to usage page.
Before this goes live need to only show letters on usage if the service has the permission.
2017-12-19 14:35:10 +00:00
Rebecca Law
43747bd1ea Add letter usage to usage page.
Still need to add the summary info.
2017-12-15 17:28:52 +00:00
Chris Hill-Scott
6445879a36 Fix heading level on all template stats page
It’s the heading for the whole page, should be a `<h1>`.
2017-02-23 16:32:26 +00:00
Chris Hill-Scott
3e89baf117 Mark up ‘pill’ component as being tabs
Currently it’s not possible for a screen reader user to know which
financial year they’re looking at. From the accessibility report:

> The financial year links are contained in a navigation region -
> tabbing or arrowing through only reads out the links, not the main
> information of "2016 to 2017 financial year" - that information is
> vital for understanding the page content.

This problem also applies to other pages which use the `pill` component,
which is effectively tabbed navigation (that reloads the page rather
than showing or hiding content on the page).

There are specific ARIA attributes that can be used to mark up a
navigation as being tabbed. This commit:

- adds those attributes
- makes the selected ‘tab’ visible to screenreaders and keyboard
  focusable
- adds a visual focus indicator to the selected tab
- adds `id`s to the parts of the page that are controlled by the tabs so
  that they are labelled as such

This also means changing the pill component from being a `<nav>` to a
`<ul>` because `tablist` is not a valid `role` for a `nav`.

Mostly follows the example here:
http://accessibility.athena-ict.com/aria/examples/tabpanel2.shtml
2017-02-14 15:18:37 +00:00