Commit Graph

901 Commits

Author SHA1 Message Date
Kenneth Kehl
5c3b5790ae try overriding default govuk-frontend font weight 2024-09-23 07:50:52 -07:00
Jonathan Bobel
d66ff27bae Merge branch 'main' of https://github.com/GSA/notifications-admin into 686-remove-uk-styles
# Conflicts:
#	app/assets/stylesheets/main.scss
#	app/templates/views/find-users/user-information.html
#	app/templates/views/two-factor-webauthn.html
#	app/templates/views/user-profile/manage-security-key.html
#	app/templates/views/user-profile/security-keys.html
#	gulpfile.js
2023-08-15 13:29:39 -04:00
Carlo Costino
9e609efa1c Remove webauthn hooks
This changeset removes webauthn from the Notify.gov admin app.  We are not using webauthn at all in our implementation and will be looking at an entirely different authentication system in the near future.

Signed-off-by: Carlo Costino <carlo.costino@gsa.gov>
2023-08-14 16:59:38 -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
Steven Reilly
13d0e46b52 blunt rename of org (#620) 2023-07-12 12:09:44 -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
Jonathan Bobel
f342e0fb6c Updating site to use USWDS styles (#509)
* Updated header and footer
* Updated fonts
* Moved files around and updated gulpfile to correct the build process when it goes to production
* Adjusted grid templating
* Added images to assets
* Update app/templates/components/uk_components/footer/template.njk

Co-authored-by: Steven Reilly <stvnrlly@users.noreply.github.com>
2023-06-06 15:28:24 -04:00
Steven Reilly
454b778582 Cookie streamlining (#493)
* remove cookie banner
* remove form from cookies.html
* move cookie content to privacy page
2023-05-03 15:33:27 -04:00
Ryan Ahearn
bb77086342 Put default spark-bar-bar css in table.scss file 2023-03-08 09:17:31 -05:00
Ryan Ahearn
73a3511ef2 Remove uses of inline-styles 2023-03-08 09:08:07 -05:00
stvnrlly
8a415bc31b remove leaflet - it was for broadcasts 2022-12-14 13:30:27 -05:00
stvnrlly
944715ac46 big commit with letters removal 2022-12-05 15:33:44 -05:00
stvnrlly
f16b5dd1c4 remove broadcast-related code 2022-10-04 03:04:13 +00:00
Ryan Ahearn
f5775de3fe Updates to get pa11y passing 2022-08-31 09:01:11 -04:00
James Moffet
c3541ddcb5 UI tweaks 2022-07-29 15:28:10 -07:00
James Moffet
c782d5d80b images and overrides 2022-07-21 18:25:23 -07:00
Tom Byers
65d337959d Fix alignment regression error with area lists
When we changed the layout for each alert on the
current/past/rejected alerts pages to use flexbox,
we added a fallback for older browsers that set
text-align: justify on the container:

https://github.com/alphagov/notifications-admin/pull/4171

This has led to items in the list of areas an
alert will be sent to being laid out as justified
content when they were left-aligned.

These changes set the correct alignment.
2022-05-05 14:49:52 +01:00
Ben Thorner
7f333ba5fe Rewrite SMS ratio form to cope with 3 providers
This replaces the slider with an integer input for each provider.
Unfortunately showing a variable number of inputs isn't easy to
achieve in WTForms [^1], but we think this is the least worst way
to do it vs e.g. not using WTForms at all.

[^1]: https://github.com/wtforms/wtforms/issues/736
2022-04-07 14:05:00 +01:00
Ben Thorner
3a6ceac910 Merge pull request #4198 from alphagov/service-history-link
Show link to service history in the settings page
2022-03-25 09:49:00 +00:00
Ben Thorner
808f248782 Rename "page-footer-delete-link" class
This doesn't set any deletion-specific attributes so it's valid to
just call it "page-footer-link".
2022-03-24 12:58:08 +00:00
Tom Byers
848ee72e3f Strip underline from focused + hovered nav links
Our CSS for links in the navigation, which makes
the underline appear on hover is overriding the
GOVUK focus styles, making it look like there are
2 underlines. This adds some extra CSS to reset
it.

The new CSS is further down the stylesheet to the
hover styles. This gives them a higher specificity
meaning they override them when these links are
hovered over while in focus.
2022-03-17 16:11:56 +00:00
Tom Byers
e28d7cbb05 Fix comments, remove flex-grow and unused margin
Based on comments on the associated pull request,
(and my realisation that I was using flexbox
wrong):

https://github.com/alphagov/notifications-admin/pull/4171

Removal of flex-grow

I added `flex-grow: 1` to make the description and
status flex items grow to fill the container, at
least until they hit their `max-width`. They
already have `width: 100%` which achieves the same
thing so this removes it.
2022-03-11 14:54:24 +00:00
Tom Byers
9d32316a67 Fix spacing for alert description and status
Using `width` doesn't work for flex-items with
flex-grow set above 0 because they will expand to
fill the space, whatever its value.

The intention for this line was always to
constrain how much these ones can grow to half the
space minus the gap between. `max-width`, which is
still honored by flex-items with `flex-grow` above
0, meaning they will expand up to that size.
2022-03-11 14:54:23 +00:00
Tom Byers
cbcac14e7c Remove grid from alerts file-list
Having a grid in the click target stops the hint
and status text being clickable. This removes it
in favour using flexbox to position the elements
in a similar way.

Includes fallback styles for browsers that don't
support flexbox that positions the child elements
inline, laid out justified, to mimic the flexbox
positioning of justify-content: space-between.

Note: display is overriden on child items under
flexbox so setting display: inline-block is
ignored.
2022-03-11 14:53:55 +00:00
Tom Byers
1d69f7ab61 Fix focus style gap at top in keyline-block
File-list items contained by div.keyline-block's
are pushed down 3px more than elsewhere which
creates a gap between the top of the focus style
and the keyline above. This extends the part of
the focus style made up by a box-shadow by 3px so
it covers the gap.
2022-02-15 13:02:39 +00:00
Tom Byers
d76648b67b Mark focus of link on parent heading in file-list
Includes:
- JS to add a class to the heading when the link
  is focused
- CSS to apply the enlarged focus style via a
  selector which uses that class
- changes to the partial to hook in the JS to
  track focus on links and to tell the
  updateContent JS to persist the classes added
  between updates to the HTML
2022-02-09 12:25:14 +00:00
Tom Byers
73cc034676 Merge pull request #4141 from alphagov/refactor-current-alerts-html
Fix current alerts focus styles - part 1
2022-02-09 11:23:07 +00:00
Katie Smith
f9c551a558 Add and use textarea component from GOV.UK Frontend
For the "Something else" branding form we want the form label to be the
title. This brings in the textarea component from GOV.UK Frontend in
order to do this since that contains code to set a the textarea label as
the page heading in an accessible way.

The rest of the textarea fields have not been switched to use the new
component yet.
2022-02-03 09:59:21 +00:00
Tom Byers
10ab1dfe72 Fix focus bug in Safari
Most browsers apply the focus style when a link is
clicked but Safari just applies the active style.
This meant our large links, with expanded click
areas, didn't get the focus style themselves but
their psuedo-elements (which create the expanded
click area) did.

This adds the focus styles to the active state of
links with the expanded click area, to ensure all
of their click area gets the focus style.
2022-02-02 20:24:14 +00:00
Tom Byers
5ad8f41123 Add large link, no hint variant to file-list
At present the file-list pattern assumes each
item has hint text below the link and so increases
the hit area to overlap the hint. This adds a
variant for items without one and uses it on the
page for choosing an alert sub-area.
2022-02-02 20:23:58 +00:00
Tom Byers
4f10272b00 Add styles and Jinja for component
Most of these are cut-and-paste'd from the GOVUK
metadata component:

https://components.publishing.service.gov.uk/component-guide/metadata

...but stripped back to only include what we need
and a optional suffix paragraph added.

Links to styles and ERB template
https://github.com/alphagov/govuk_publishing_components/blob/master/app/assets/stylesheets/govuk_publishing_components/components/_metadata.scss
https://github.com/alphagov/govuk_publishing_components/blob/master/app/views/govuk_publishing_components/components/_metadata.html.erb

Also adds it to the accessibility statement as an
example and updates the test that checks any
updates bump the date.
2022-01-05 15:21:37 +00:00
Tom Byers
301480a732 Make SVG icon in alert mock up inline
Making the icon an inline SVG lets it inherit
colours from the page styles. This helps in forced
colour modes, like Windows high contrast mode,
where it will match the colour of the text next to
it, whatever it is set to.

Making it inline requires some changes to the CSS
to allow its position to match that of the current
background image.

This also sets `forced-color-adjust` to `auto` on
the `<svg>` element, which tells the browser it
can control its colours in forced colour modes.
This is required because the browsers that support
forced colour mode set it to `none` for the
`<svg>` element by default.
2021-12-09 10:23:49 +00:00
Tom Byers
bc22c206b9 Make images in key of map SVGs
At the moment, the icons in the key of the map
showing what each type of area drawn on the map
means change colour in high contrast mode. This
causes a mismatch between the areas on the map and
the key.

These changes remake the images in SVG to prevent
the colours changing in high contrast modes. They
also add a white background to the icons, to make
sure they match the areas they refer to in the
map.
2021-11-18 11:40:36 +00:00
Tom Byers
0971c0a3d8 Fix enhancedTextbox styles in high contrast mode
The enhancedTextbox component has an element that
sits in front of the textbox and draws the
highlights over the text. This element has a 2px
border so it's dimensions match those of the
textbox. This border has a colour of 'transparent'
by default, to hide it from view but this is
overridden in high contrast modes to match the
text colour.

This adds some CSS targeting high contrast modes
which sets it to match the colour of the
background, making it invisible again.
2021-11-10 12:23:25 +00:00
Tom Byers
58d80f5097 Give link-buttons an outline in high contrast
The link-buttons we use in our pill component
have a blue background which shows the area they
occupy by default. In high contrast mode,
backgrounds are hidden so the link-button text
looks like it is floating because you can't see
the edge of their area.

These changes use the trick of adding a
transparent border. This is hidden by default but
displays in high contrast mode to show the edges
of the link-button. I've reduced the padding to
accommodate the extra space it takes up.
2021-11-10 12:23:24 +00:00
Tom Byers
d915beef89 Show alert mock up in high contrast mode
The mock up component, shown in all
current/past/rejected alert pages, doesn't show
fully in high contrast modes because it uses its
background colour to show its shape and
backgrounds are hidden in high contrast modes.

This uses a technique from design system which
adds a transparent border to these elements to
show their shapes. This works because borders of
any colour (even transparent) are rendered as the
foreground colour.
2021-11-10 12:23:23 +00:00
Chris Hill-Scott
8576b4a6f0 Fix spacing on send one-off SMS
Previous the text input on the send one off SMS page was wrapped in
an element with a class of `form-group`. We overrode the spacing on this
element to make the links under the textbox move closer to the textbox,
so that visually they group together.

This was broken when we moved to GOV.UK frontend, which uses a class of
`govuk-form-group`. This commit changes the CSS to account for both
possibilities, because the send-a-one-off-letter page is still using a
textbox, not a text input, and textboxes haven’t moved to GOV.UK
Frontend yet.
2021-11-04 12:04:32 +00:00
Tom Byers
7e2bd45c73 Stop 'remove' button depression when active
Noticed by @quis in
https://github.com/alphagov/notifications-admin/pull/4053#issuecomment-957702649

The 'top' position from the GOVUK Frontend button
styles is overriding our 'top' position.

This adds some extra CSS to repeat the 'top'
position in the :active state.
2021-11-02 15:11:43 +00:00
Tom Byers
b1ab167e1d Tweak spacing, size and hover state when focused
The size and position of the 'X' has deviated a
bit from the design intentions of the original.

The original shared the x-height of the area text
and has positioned to be vertically and
horizontally centered.

These changes assume an x-height of 11px and use
flexbox to center the new 'X' horizontally and
vertically.

This also tweaks the visual state when focused and
then hovered so matches other buttons without
breaking the design.
2021-11-02 11:51:54 +00:00
Tom Byers
c34fd4de6e Make remove ('x') links buttons
The text never had underlines like our other
link-button components so always looked like
buttons. If they look like buttons, they should
act like them too and have those semantics.

This give them a role of button and uses the class
and data attribute for the button component from
GOVUK Frontend to make them work like one.

These changes include a fair amount of styles to
override those the govuk-button class brings in.
I've tried to mark those ones to at least make
that obvious.
2021-11-02 11:51:53 +00:00
Tom Byers
9d59edb3ce Replace 'x' psuedo element with SVG
The current link button for removing an area is
created using a psuedo element with an 'x' as
content.

The inline box for the 'x' overlapped its parent.
This is visible in high contrast mode, breaking the
parent's border. Despite existing in CSS, the 'x'
is also announced by screen readers, which is not
what we want.

This changes it to be an inline SVG with a role of
image. It doesn't require as large an inline box
so doesn't cause visual issues in high contrast
modes. It also means we can set it's label similar to
how you would an image's alt text, giving us
control over what is announced by screen readers.

This commit also includes some extra CSS,
targeting high contrast modes, giving the
link button the following when viewed in those
modes:
- a complete border so it is
  distinguishable from the list item
- a focus style
2021-11-02 11:51:44 +00:00
Tom Byers
0987787df6 Give map attribution links an underline
Makes them identifiable as links based on
something other than just colour.
2021-10-19 11:09:40 +01:00
Chris Hill-Scott
975088308a Put media query after default CSS
Specificity means that the media query will always override, but this is
more obvious with the order this way around.
2021-09-30 15:07:22 +01:00
Chris Hill-Scott
eee4cdd0a7 Rewrite media queries to be mobile-first
Also adds height: 100% which forces the SVG to scale, rather than just
setting width which widens the viewbox.
2021-09-30 14:19:27 +01:00
Chris Hill-Scott
c63313e839 Give WebAuthn illustration a fixed size
The browser uses the `width` and `height` attributes of the image tag to
allocate space on the page for the image.

If these aren’t provided then the browser will assume the image takes up
no space, until it’s downloaded it and had a look at what the file’s
dimensions are. This causes the layout of the page to jump once the
image downloads.

`149 × 150px` is the native size of the image. But we don’t want it to
display at that size, so this commit also adds some extra CSS which
keeps it looking the same, namely:
- the full width of the 1/4 page column on desktop
- the full width of the column minus a `40px` gutter either side on
  mobile (by using `box-sizing: border-box` the `40px` of padding is
  subtracted from the 100% width, rather than added to it)
2021-09-30 14:19:27 +01:00
Chris Hill-Scott
bc5745c77b Fix styles for API key value not being applied
When the component was renamed from ‘API key’ to ‘Copy to clipboard’ the class for the thing to be copied changed from `api-key__key` to `copy-to-clipboard__value`. While the CSS was updated to reflect the change from `api-key` to `copy-to-clipboard` the change from `__key` to `__value` was not made.

Before: 4921e6d46e/app/templates/components/api-key.html
After: 85f6881a56/app/templates/components/copy-to-clipboard.html

This commit changes updates the CSS to reflect the latter change, so that the styles get applied properly.
2021-09-28 15:30:44 +01:00
Leo Hemsted
a231738a16 Merge pull request #3989 from alphagov/update-pricing-pages
Add a billing details page
2021-09-08 16:31:38 +01:00
Leo Hemsted
85f6881a56 rename api key component to copy_to_clipboard
does what it says on the tin, and is also consistent with prior art:
https://components.publishing.service.gov.uk/component-guide/copy_to_clipboard
2021-09-08 10:18:17 +01:00
Tom Byers
c6ecbf647a Change comment about turning part of focus style off
Co-authored-by: Ben Thorner <benthorner@users.noreply.github.com>
2021-09-07 10:10:05 +01:00
Tom Byers
87674aef08 Fixes for the comments in the map CSS
Based on a range of comments made in the
associated pull request:
- 7c2f4adfd5 (r701234728)
- 7c2f4adfd5 (r701235330)
- 7c2f4adfd5 (r701235586)
- 7c2f4adfd5 (r701242035)
- 7c2f4adfd5 (r701241659)

Co-authored-by: Ben Thorner <benthorner@users.noreply.github.com>
2021-09-03 12:13:15 +01:00