Commit Graph

6548 Commits

Author SHA1 Message Date
Chris Hill-Scott
e5f22a3fc2 Merge pull request #2520 from alphagov/pyup-update-whitenoise-4.1.1-to-4.1.2
Update whitenoise to 4.1.2
2018-11-27 10:22:56 +00:00
Chris Hill-Scott
d03b3b3d67 Merge pull request #2537 from alphagov/pyup-update-pyexcel-ods3-0.5.2-to-0.5.3
Update pyexcel-ods3 to 0.5.3
2018-11-27 10:15:26 +00:00
Chris Hill-Scott
dfc3821e96 Merge pull request #2536 from alphagov/pyup-update-pyexcel-io-0.5.9.1-to-0.5.10
Update pyexcel-io to 0.5.10
2018-11-27 10:15:17 +00:00
Chris Hill-Scott
9a589ff98b Merge branch 'master' into pyup-update-whitenoise-4.1.1-to-4.1.2 2018-11-27 10:09:31 +00:00
Chris Hill-Scott
ab9273b215 Freeze requirements 2018-11-27 10:08:26 +00:00
Chris Hill-Scott
98822638d7 Freeze requirements 2018-11-27 09:56:57 +00:00
pyup-bot
ff3be89b8e Update pyexcel-ods3 from 0.5.2 to 0.5.3 2018-11-27 08:03:16 +00:00
pyup-bot
9c74a935b9 Update pyexcel-io from 0.5.9.1 to 0.5.10 2018-11-27 08:03:12 +00:00
Chris Hill-Scott
0000ca6629 Merge pull request #2535 from alphagov/launch-first-class
Launch first class postage feature
2018-11-26 16:33:21 +00:00
Chris Hill-Scott
d5c4c7590c Merge pull request #2531 from alphagov/search-within-folders
Make template search work across folders
2018-11-26 16:30:54 +00:00
Chris Hill-Scott
84a3c80eb4 Launch first class postage feature
This commit makes it available to everyone. Available just means they
can select 1st class for all their letters, if they want it.
2018-11-26 15:53:14 +00:00
Katie Smith
6e56a4d517 Merge pull request #2533 from alphagov/bump-utils-3.7.0
Bump notifications-utils to 30.7.0
2018-11-26 14:57:50 +00:00
Katie Smith
c48f54aba4 Bump notifications-utils to 30.7.0
Bumped the notifications-utils version. The `gmt_timezones` function in
this repo and the `utc_string_to_aware_gmt_datetime` in
notifications-utils are the same, so have updated the code to always use
the version in utils.
2018-11-26 14:43:42 +00:00
Chris Hill-Scott
7d20846d94 Render selected links with box shadow not outline
Because there’s a mystery 2px gap between the outline and the element in
Firefox.
2018-11-26 11:33:27 +00:00
Chris Hill-Scott
adcd699712 Maintain full width for items without a path 2018-11-26 10:56:48 +00:00
Chris Hill-Scott
ee991d0142 Allow any sub-items to be moved from a folder
Since you can now see them when searching you should also be able to
select and move them. Which means that they needed to be included in
the `Form`’s list of possible choices of things to move.
2018-11-23 16:29:21 +00:00
Chris Hill-Scott
cdb03d1eeb Only live search on template or folder name
If you have a folder structure like this:

> FA / FB / FC

and you search for ‘FA’, it’s very noisy to see:

> FA / FB
> FA / FB / T1
> FA / FB / T2
> FA / FB / FC
> FA / FB / FC / T3
> …

It’s clearer to just show:

> FA / FB

This also has the benefit of, if you type ‘template’ (for example) you
don’t get every item any more, because it’s only looking at the name of
the thing. It used to look at the entire description, ie:

> A / B / C / Example
> Text message template

Now it only searches on the name:

> A / B / C / *Example*
> Text message template
2018-11-23 14:39:45 +00:00
Chris Hill-Scott
ecdd605bca Allow wrapping within folder/template names
It takes up a lot of vertical space if folders and templates can only
break on the path separator (the `/`).
2018-11-23 14:38:47 +00:00
Chris Hill-Scott
d7e6e6ae90 Make live search restore items to default state
At the moment live search works by either setting something to hidden
or displayed. When the search term is empty, it sets everything to
visible.

This doesn’t work with folders because some of them should be hidden by
default (the ones not at the current level).

We can account for this special case (empty search term) by removing
the `display` CSS attribute when the search term is empty. This means
that each item’s visibility will be controlled by whatever is set in the
CSS file. Using jQuery Setting a property to `''` removes it.
2018-11-23 14:35:58 +00:00
Chris Hill-Scott
28ef6910a3 Hide templates and folders not at current level
Things in subfolders need to be in the page so we can search for them.
But the default view should be only the things are the current level.
So we can use CSS to hide items that are below the current level.
2018-11-23 14:34:25 +00:00
Chris Hill-Scott
148492a635 Put all nested items on page
So that the live search can filter things, they need to be on the page
when it loads. We want to make search work across folders, so all the
things in subfolders need to be in the page.

They also need the full path appending to them, so that you can tell
which ones are in which folders.

This won’t show items that are in a folder above the one you’re
currently in – my reckon is that when you’re narrowing down by clicking
into a folder that you only want to search for things in that folder.
2018-11-23 14:31:05 +00:00
Chris Hill-Scott
82d8207612 Refactor template list logic into one place
The Jinja template for the ‘choose templates’ page is now pulling in
data from a lot of diparate places in order to work out what to show. As
we add more logic about what to show (in order to make the live search
work) it’s going to get harder to have all this logic in the Jinja
template.

This commit refactors it back into Python where we have more language
features for managing complex logic.

It’s a bit weird to call this file a model, in that it’s dealing with
some presentational logic, rather than just data. Conceptually it’s more
like a view model[1].

1. https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93viewmodel
2018-11-23 14:00:40 +00:00
Chris Hill-Scott
1cc2a529d5 Merge pull request #2530 from alphagov/plymouth.gov.uk
Mark agreement signed by Plymouth City Council
2018-11-23 12:58:25 +00:00
Chris Hill-Scott
d8a0a192c3 Mark agreement signed by Plymouth City Council 2018-11-22 17:24:00 +00:00
Chris Hill-Scott
5df1978c62 Merge pull request #2529 from alphagov/download-pdf-footer
Put download PDF link in the sticky footer on the sent letter page
2018-11-22 13:23:10 +00:00
Chris Hill-Scott
fe5112a4c3 Merge pull request #2528 from alphagov/dont-wrap-users
Don’t wrap users onto multiple lines
2018-11-22 13:23:02 +00:00
Chris Hill-Scott
741a8856fa Remove the word ‘printable’
Don’t think it’s necessary. Makes things consistent with the sent letter
page, which only says ‘Download as a PDF’.

This inconsistency would be more glaring now these pieces of text appear
in the same place, in adjacent steps of a journey.
2018-11-22 12:36:29 +00:00
Chris Hill-Scott
b317bd7a0b Put download PDF in footer
This makes its positioning consistent with the previous page in the
one-off sending journey.

It gives us more space to put information about the status of the letter
above the preview of the letter.
2018-11-22 12:36:29 +00:00
Chris Hill-Scott
0ed66828fc Merge pull request #2526 from alphagov/stick-email-status
Stick email status to bottom of screen
2018-11-22 12:31:14 +00:00
Chris Hill-Scott
78f9505ad9 Merge pull request #2527 from alphagov/🏰
Mark agreement signed by Tower Hamlets council
2018-11-22 10:48:19 +00:00
Chris Hill-Scott
8b84bf27e3 Don’t wrap users onto multiple lines
It looks cleaner to truncate instead. You can always see the full email
address by clicking into ‘edit’.
2018-11-22 10:44:09 +00:00
Pete Herlihy
fb84dee4d9 Adding wmfs.net (West Midlands Fire Service) to the signed MOU list. 2018-11-22 10:39:12 +00:00
Chris Hill-Scott
d98d04844a Mark agreement signed by Tower Hamlets council 2018-11-22 10:29:48 +00:00
Chris Hill-Scott
c7118a80e2 Stick email status to bottom of screen
We’ve moved away from using the expand/collapse pattern on the page
where you click ‘send’. Instead we’re putting the send button in the
sticky footer.

So it’s a bit jarring to still have the expand/collapse on the page you
see after you’ve sent an email. This commit replaces it with the sticky
footer as well.

This is only relevant for emails because:

1. Text messages are generally short enough to fit on the screen
2. We don’t show the status of letters because they don’t really change
2018-11-22 10:20:39 +00:00
Chris Hill-Scott
4ac427c5ab Merge pull request #2525 from alphagov/inverclyde.gov.uk
Mark agreement signed by Inverclyde Council
2018-11-22 10:15:24 +00:00
Alexey Bezhan
82db6d7469 Merge pull request #2523 from alphagov/rename-staging-csv-uploads-bucket
Rename staging CSV uploads bucket to match other environments
2018-11-21 13:26:39 +00:00
Chris Hill-Scott
d55117e4d6 Mark agreement signed by Inverclyde Council 2018-11-21 12:33:28 +00:00
Alexey Bezhan
2f0abb9c7d Rename staging CSV uploads bucket to match other environments 2018-11-20 16:46:38 +00:00
pyup-bot
d6540211fe Update whitenoise from 4.1.1 to 4.1.2 2018-11-20 16:33:52 +00:00
Chris Hill-Scott
9147e187fb Merge pull request #2522 from alphagov/fix-search-hiding-logic
Fix logic around showing search box
2018-11-20 16:21:12 +00:00
Chris Hill-Scott
5d13c639b1 Fix logic around showing search box
It was looking at the count of items at the root level (because it was
passing `parent_folder_id=None` as an argument).

This changes it to look at the total count of items for a service (which
was the intended behaviour).
2018-11-20 16:12:50 +00:00
Chris Hill-Scott
8f2547b7a7 Merge pull request #2518 from alphagov/delete-folder-refinements
Make some refinements to the delete folder journey
2018-11-20 14:53:05 +00:00
Chris Hill-Scott
c8bb83ca3b Merge pull request #2521 from alphagov/new-orgs
Mark agreement signed by Northumberland and Lincolnshire
2018-11-20 14:30:06 +00:00
Chris Hill-Scott
c52dc8e972 Merge pull request #2488 from alphagov/copy-template-name
Put ‘copy’ at end of new template name
2018-11-20 14:14:09 +00:00
Chris Hill-Scott
7b3c04d0c2 Mark agreement signed by Northumberland and Lincolnshire 2018-11-20 14:13:02 +00:00
Chris Hill-Scott
7bbdb461b0 Merge pull request #2519 from fidejoseph/patch-4
Update email_domains.yml
2018-11-20 13:58:57 +00:00
Chris Hill-Scott
65389b0bb5 Merge pull request #2513 from alphagov/empty-folder-message
Improve the empty folder state
2018-11-20 13:50:53 +00:00
fidejoseph
d3fded694e Update email_domains.yml
Whitelisting UK SBS
2018-11-20 13:22:22 +00:00
Chris Hill-Scott
a5bbabcd7b Merge pull request #2511 from alphagov/sticky-send
Use sticky footer on the check one-off page
2018-11-20 13:15:32 +00:00
Chris Hill-Scott
400c25e15f Make search box appear based on all templates
We reckon it’s jarring to have the search box appear and disappear as
you navigate through the folders.

Instead it should appear whenever your service has more things
(templates or folders) than you can easily keep in your head (let’s go
with 7 for now).

This keeps the bahviour the same for current services that don’t have
any folders.
2018-11-20 12:29:39 +00:00