Skip to content

Commit

Permalink
GN-115 Mega nav production ready (#145)
Browse files Browse the repository at this point in the history
* GN-95 Move NavLinks to own component

* GN-95 Get button in if dropdown

* GN-95 Skip links and click behaviour

* GN-95 Skip links

* GN-95 Styling

* GN-95 Styling, aria controls, chevron

* GN-95 Active text on button

* GN-95 Refactoring styling

* Ignore netlify file

* GN-95 Chevrons and revised services list

* GN-95 Link styling

* GN-95 More services dropdown and styling

* GN-95 Missed commit with dropdownComponent

* Comment out test to get build

* Attempt fix for $RefreshReg$ issue

See https://github.com/pmmmwh/react-refresh-webpack-plugin/blob/main/docs/TROUBLESHOOTING.md#usage-with-indirection-like-workers-and-js-templates

* Focus trap plugin

* GN-95 Focus trap around all of nav when active

* Remove tests for alpha

* GN-95 Focus trap no initial focus

* GN-95 Z-index for pathways and guidance fix

* GN-95 Escape by clicking search or acccount

* GN-95 Replacing with nds components

* GN-95 Config fix for grid css issue

* GN-101 Issues (#122)

* Scrim

* GN-101 Move focus to search when clicked

* GN-101 Close MyAccount Dropdown on meganav click

* GN-101 Close MyAccount Dropdown on meganav click

* GN-95 Now click scrim to close

* GN-101 Fix list styling variation

* GN-101 Code review fixes

Co-authored-by: w@rren <[email protected]>

Co-authored-by: w@rren <[email protected]>

* GN-102 Bnf content (#125)

* Scrim

* GN-101 Move focus to search when clicked

* GN-101 Close MyAccount Dropdown on meganav click

* GN-101 Close MyAccount Dropdown on meganav click

* GN-95 Now click scrim to close

* GN-101 Fix list styling variation

* GN-102 Add BNF content

* GN-102 BNFc content

* GN-102 BNF content update

* GN-101 Code review fixes

Co-authored-by: w@rren <[email protected]>

* GN-102 Nitpicking css

* GN-102 Pull url from services

* GN-102 Spacing

* GN-101 Fix failing tests

* GN-102 Update snapshot

* GN-102 Fix letters and dancing button

Co-authored-by: w@rren <[email protected]>

* GN-103 Bnfc content (#126)

* Scrim

* GN-101 Move focus to search when clicked

* GN-101 Close MyAccount Dropdown on meganav click

* GN-101 Close MyAccount Dropdown on meganav click

* GN-95 Now click scrim to close

* GN-101 Fix list styling variation

* GN-102 Add BNF content

* GN-102 BNFc content

* GN-102 BNF content update

* GN-103 BNFC content

* GN-103 Revert nav text to abbreviation

* GN-103 Use var for url

* GN-103 Spacing

* GN-101 Fix failing tests

* GN-103 Update snapshot

* GN-103 Button fix and letter link fix

* GN-103 Button dancing fix

* GN-103 Another dancing button fix attempt

Co-authored-by: w@rren <[email protected]>

* GN-105 Standards and indicators content (#128)

* GN-105 Content for standards and indicators

* GN-105 Update links

* GN-105 Remove standards and indicators from more

* GN-101 Fix failing tests

* GN-105 Update snapshot

* GN-105 Amend S&I base link

Co-authored-by: w@rren <[email protected]>
Co-authored-by: John Davey <[email protected]>

* GN-106 About us content (#130)

* GN-101 Move focus to search when clicked

* GN-101 Close MyAccount Dropdown on meganav click

* GN-101 Close MyAccount Dropdown on meganav click

* GN-101 Styling issues across applications

* GN-101 Use bundled design system css

* GN-101 Loose grid

* GN-98 Initial guidance content

* GN-98 Content update

* GN-106 About us content

* GN-101 Fix failing tests

* GN-106 Update snapshot

* GN-98 Snapshot updated

* GN-106 Content link issue

* Start guidance content

* AW/21 Colour Scheme

* GN-98 Guidance content

* GN-106 About us content update

* GN-108 Remove e.preventDefault on mega menu click handler to enable links to work

* GN-108 Fix scrim

* GN-108 Add canUseDOM state to control display of dropdown menus in main nav

* Prettier

* Reset root about us URL

Co-authored-by: w@rren <[email protected]>
Co-authored-by: John Davey <[email protected]>
Co-authored-by: John Davey <[email protected]>

* GN-98 Guidance content (#129)

* GN-101 Move focus to search when clicked

* GN-101 Close MyAccount Dropdown on meganav click

* GN-101 Close MyAccount Dropdown on meganav click

* GN-101 Styling issues across applications

* GN-101 Use bundled design system css

* GN-101 Loose grid

* GN-98 Initial guidance content

* GN-98 Content update

* GN-101 Fix failing tests

* GN-98 Snapshot updated

* Start guidance content

* AW/21 Colour Scheme

* GN-98 Guidance content

* GN-108 Remove e.preventDefault on mega menu click handler to enable links to work

* GN-108 Fix scrim

* GN-108 Add canUseDOM state to control display of dropdown menus in main nav

* Url updates

* Prettier

Co-authored-by: w@rren <[email protected]>
Co-authored-by: John Davey <[email protected]>

* GN-104 Cks content (#127)

* Scrim

* GN-101 Move focus to search when clicked

* GN-101 Close MyAccount Dropdown on meganav click

* GN-101 Close MyAccount Dropdown on meganav click

* GN-101 Styling issues across applications

* GN-101 Use bundled design system css

* GN-101 Loose grid

* GN-98 Initial guidance content

* GN-95 Now click scrim to close

* GN-101 Fix list styling variation

* GN-102 Add BNF content

* GN-102 BNFc content

* GN-102 BNF content update

* GN-103 BNFC content

* GN-104 CKS content

* GN-104 Revert nav text to abbreviation

* GN-103 Revert nav text to abbreviation

* GN-101 Code review fixes

Co-authored-by: w@rren <[email protected]>

* GN-102 Nitpicking css

* GN-104 Rename var

* GN-102 Pull url from services

* GN-103 Use var for url

* GN-98 Content update

* demo stuff

* GN-104 Url var

* GN-102 Spacing

* GN-103 Spacing

* GN-105 Content for standards and indicators

* GN-106 About us content

* GN-105 Update links

* GN-105 Remove standards and indicators from more

* GN-101 Fix failing tests

* GN-102 Update snapshot

* GN-103 Update snapshot

* GN-105 Update snapshot

* GN-106 Update snapshot

* GN-104 Update snapshot

* GN-98 Snapshot updated

* GN-000 Alpha services. May want renaming for UR.

* GN-000 Renamed for UR. DO NOT DEPLOY TO LIVE.

* GN-000 Snapshot updated

* GN-000 Links for UR. DO NOT DEPLOY TO LIVE

* GN-000 Prettier issue

* GN-102 Fix letters and dancing button

* GN-103 Button fix and letter link fix

* GN-103 Button dancing fix

* GN-103 Another dancing button fix attempt

* GN-106 Content link issue

* GN-105 Amend S&I base link

* Start guidance content

* AW/21 Colour Scheme

* GN-98 Guidance content

* GN-106 About us content update

* GN-109 More content

* GN-107 Pathways content

* GN-108 Remove e.preventDefault on mega menu click handler to enable links to work

* GN-108 Fix scrim

* GN-108 Add canUseDOM state to control display of dropdown menus in main nav

* Duplicate css removed

* Remove duplicate CSS

* Remove duplicate css

* Remove duplicate export

* Links to live

* Tidy up

* GN-104 Snapshot update

* Snapshot update

Co-authored-by: w@rren <[email protected]>
Co-authored-by: John Davey <[email protected]>

* GN-109 More dropdown content (#133)

* Scrim

* GN-101 Move focus to search when clicked

* GN-101 Close MyAccount Dropdown on meganav click

* GN-101 Close MyAccount Dropdown on meganav click

* GN-101 Styling issues across applications

* GN-101 Use bundled design system css

* GN-101 Loose grid

* GN-98 Initial guidance content

* GN-95 Now click scrim to close

* GN-101 Fix list styling variation

* GN-102 Add BNF content

* GN-102 BNFc content

* GN-102 BNF content update

* GN-103 BNFC content

* GN-104 CKS content

* GN-104 Revert nav text to abbreviation

* GN-103 Revert nav text to abbreviation

* GN-101 Code review fixes

Co-authored-by: w@rren <[email protected]>

* GN-102 Nitpicking css

* GN-104 Rename var

* GN-102 Pull url from services

* GN-103 Use var for url

* GN-98 Content update

* demo stuff

* GN-104 Url var

* GN-102 Spacing

* GN-103 Spacing

* GN-105 Content for standards and indicators

* GN-106 About us content

* GN-105 Update links

* GN-105 Remove standards and indicators from more

* GN-101 Fix failing tests

* GN-102 Update snapshot

* GN-103 Update snapshot

* GN-105 Update snapshot

* GN-106 Update snapshot

* GN-104 Update snapshot

* GN-98 Snapshot updated

* GN-000 Alpha services. May want renaming for UR.

* GN-000 Renamed for UR. DO NOT DEPLOY TO LIVE.

* GN-000 Snapshot updated

* GN-000 Links for UR. DO NOT DEPLOY TO LIVE

* GN-000 Prettier issue

* GN-102 Fix letters and dancing button

* GN-103 Button fix and letter link fix

* GN-103 Button dancing fix

* GN-103 Another dancing button fix attempt

* GN-106 Content link issue

* GN-105 Amend S&I base link

* Start guidance content

* AW/21 Colour Scheme

* GN-98 Guidance content

* GN-106 About us content update

* GN-109 More content

* GN-107 Pathways content

* GN-108 Remove e.preventDefault on mega menu click handler to enable links to work

* GN-108 Fix scrim

* GN-108 Add canUseDOM state to control display of dropdown menus in main nav

* Duplicate css removed

* Remove duplicate CSS

* Remove duplicate css

* Remove duplicate export

* Links to live

* Tidy up

* Snapshot update

Co-authored-by: Eleanor Mollett <[email protected]>
Co-authored-by: John Davey <[email protected]>

* GN-110 Life sciences content (#137)

* Scrim

* GN-101 Move focus to search when clicked

* GN-101 Close MyAccount Dropdown on meganav click

* GN-101 Close MyAccount Dropdown on meganav click

* GN-101 Styling issues across applications

* GN-101 Use bundled design system css

* GN-101 Loose grid

* GN-98 Initial guidance content

* GN-95 Now click scrim to close

* GN-101 Fix list styling variation

* GN-102 Add BNF content

* GN-102 BNFc content

* GN-102 BNF content update

* GN-103 BNFC content

* GN-104 CKS content

* GN-104 Revert nav text to abbreviation

* GN-103 Revert nav text to abbreviation

* GN-101 Code review fixes

Co-authored-by: w@rren <[email protected]>

* GN-102 Nitpicking css

* GN-104 Rename var

* GN-102 Pull url from services

* GN-103 Use var for url

* GN-98 Content update

* demo stuff

* GN-104 Url var

* GN-102 Spacing

* GN-103 Spacing

* GN-105 Content for standards and indicators

* GN-106 About us content

* GN-105 Update links

* GN-105 Remove standards and indicators from more

* GN-101 Fix failing tests

* GN-102 Update snapshot

* GN-103 Update snapshot

* GN-105 Update snapshot

* GN-106 Update snapshot

* GN-104 Update snapshot

* GN-98 Snapshot updated

* GN-000 Alpha services. May want renaming for UR.

* GN-000 Renamed for UR. DO NOT DEPLOY TO LIVE.

* GN-000 Snapshot updated

* GN-000 Links for UR. DO NOT DEPLOY TO LIVE

* GN-000 Prettier issue

* GN-102 Fix letters and dancing button

* GN-103 Button fix and letter link fix

* GN-103 Button dancing fix

* GN-103 Another dancing button fix attempt

* GN-106 Content link issue

* GN-105 Amend S&I base link

* Start guidance content

* AW/21 Colour Scheme

* GN-98 Guidance content

* GN-106 About us content update

* GN-109 More content

* GN-107 Pathways content

* GN-108 Remove e.preventDefault on mega menu click handler to enable links to work

* GN-108 Fix scrim

* GN-108 Add canUseDOM state to control display of dropdown menus in main nav

* Duplicate css removed

* Remove duplicate CSS

* Remove duplicate css

* Remove duplicate export

* Links to live

* Tidy up

* GN-110 Life Sciences dropdown content

* Snapshot update

Co-authored-by: Eleanor Mollett <[email protected]>
Co-authored-by: John Davey <[email protected]>

* GN-107 Pathways content (#134)

* Scrim

* GN-101 Move focus to search when clicked

* GN-101 Close MyAccount Dropdown on meganav click

* GN-101 Close MyAccount Dropdown on meganav click

* GN-101 Styling issues across applications

* GN-101 Use bundled design system css

* GN-101 Loose grid

* GN-98 Initial guidance content

* GN-95 Now click scrim to close

* GN-101 Fix list styling variation

* GN-102 Add BNF content

* GN-102 BNFc content

* GN-102 BNF content update

* GN-103 BNFC content

* GN-104 CKS content

* GN-104 Revert nav text to abbreviation

* GN-103 Revert nav text to abbreviation

* GN-101 Code review fixes

Co-authored-by: w@rren <[email protected]>

* GN-102 Nitpicking css

* GN-104 Rename var

* GN-102 Pull url from services

* GN-103 Use var for url

* GN-98 Content update

* demo stuff

* GN-104 Url var

* GN-102 Spacing

* GN-103 Spacing

* GN-105 Content for standards and indicators

* GN-106 About us content

* GN-105 Update links

* GN-105 Remove standards and indicators from more

* GN-101 Fix failing tests

* GN-102 Update snapshot

* GN-103 Update snapshot

* GN-105 Update snapshot

* GN-106 Update snapshot

* GN-104 Update snapshot

* GN-98 Snapshot updated

* GN-000 Alpha services. May want renaming for UR.

* GN-000 Renamed for UR. DO NOT DEPLOY TO LIVE.

* GN-000 Snapshot updated

* GN-000 Links for UR. DO NOT DEPLOY TO LIVE

* GN-000 Prettier issue

* GN-102 Fix letters and dancing button

* GN-103 Button fix and letter link fix

* GN-103 Button dancing fix

* GN-103 Another dancing button fix attempt

* GN-106 Content link issue

* GN-105 Amend S&I base link

* Start guidance content

* AW/21 Colour Scheme

* GN-98 Guidance content

* GN-106 About us content update

* GN-109 More content

* GN-107 Pathways content

* GN-108 Remove e.preventDefault on mega menu click handler to enable links to work

* GN-108 Fix scrim

* GN-108 Add canUseDOM state to control display of dropdown menus in main nav

* Duplicate css removed

* Remove duplicate CSS

* Remove duplicate css

* Remove duplicate export

* Links to live

* Tidy up

* Snapshot update

Co-authored-by: Eleanor Mollett <[email protected]>
Co-authored-by: John Davey <[email protected]>

* GN-000 All content (#132)

* Scrim

* GN-101 Move focus to search when clicked

* GN-101 Close MyAccount Dropdown on meganav click

* GN-101 Close MyAccount Dropdown on meganav click

* GN-101 Styling issues across applications

* GN-101 Use bundled design system css

* GN-101 Loose grid

* GN-98 Initial guidance content

* GN-95 Now click scrim to close

* GN-101 Fix list styling variation

* GN-102 Add BNF content

* GN-102 BNFc content

* GN-102 BNF content update

* GN-103 BNFC content

* GN-104 CKS content

* GN-104 Revert nav text to abbreviation

* GN-103 Revert nav text to abbreviation

* GN-101 Code review fixes

Co-authored-by: w@rren <[email protected]>

* GN-102 Nitpicking css

* GN-104 Rename var

* GN-102 Pull url from services

* GN-103 Use var for url

* GN-98 Content update

* demo stuff

* GN-104 Url var

* GN-102 Spacing

* GN-103 Spacing

* GN-105 Content for standards and indicators

* GN-106 About us content

* GN-105 Update links

* GN-105 Remove standards and indicators from more

* GN-101 Fix failing tests

* GN-102 Update snapshot

* GN-103 Update snapshot

* GN-105 Update snapshot

* GN-106 Update snapshot

* GN-104 Update snapshot

* GN-98 Snapshot updated

* GN-000 Alpha services. May want renaming for UR.

* GN-000 Renamed for UR. DO NOT DEPLOY TO LIVE.

* GN-000 Snapshot updated

* GN-000 Links for UR. DO NOT DEPLOY TO LIVE

* GN-000 Prettier issue

* GN-102 Fix letters and dancing button

* GN-103 Button fix and letter link fix

* GN-103 Button dancing fix

* GN-103 Another dancing button fix attempt

* GN-106 Content link issue

* GN-105 Amend S&I base link

* Start guidance content

* AW/21 Colour Scheme

* GN-98 Guidance content

* GN-106 About us content update

* GN-109 More content

* GN-107 Pathways content

* GN-108 Remove e.preventDefault on mega menu click handler to enable links to work

* GN-108 Fix scrim

* GN-108 Add canUseDOM state to control display of dropdown menus in main nav

* Duplicate css removed

* Remove duplicate CSS

* Remove duplicate css

* Remove duplicate export

* Links to live

* Tidy up

* GN-110 Life Sciences dropdown content

* Snapshot update

Co-authored-by: w@rren <[email protected]>
Co-authored-by: John Davey <[email protected]>

* GN-108 Snag list (#138)

* Scrim

* GN-101 Move focus to search when clicked

* GN-101 Close MyAccount Dropdown on meganav click

* GN-101 Close MyAccount Dropdown on meganav click

* GN-101 Styling issues across applications

* GN-101 Use bundled design system css

* GN-101 Loose grid

* GN-98 Initial guidance content

* GN-95 Now click scrim to close

* GN-101 Fix list styling variation

* GN-102 Add BNF content

* GN-102 BNFc content

* GN-102 BNF content update

* GN-103 BNFC content

* GN-104 CKS content

* GN-104 Revert nav text to abbreviation

* GN-103 Revert nav text to abbreviation

* GN-101 Code review fixes

Co-authored-by: w@rren <[email protected]>

* GN-102 Nitpicking css

* GN-104 Rename var

* GN-102 Pull url from services

* GN-103 Use var for url

* GN-98 Content update

* demo stuff

* GN-104 Url var

* GN-102 Spacing

* GN-103 Spacing

* GN-105 Content for standards and indicators

* GN-106 About us content

* GN-105 Update links

* GN-105 Remove standards and indicators from more

* GN-101 Fix failing tests

* GN-102 Update snapshot

* GN-103 Update snapshot

* GN-105 Update snapshot

* GN-106 Update snapshot

* GN-104 Update snapshot

* GN-98 Snapshot updated

* GN-000 Alpha services. May want renaming for UR.

* GN-000 Renamed for UR. DO NOT DEPLOY TO LIVE.

* GN-000 Snapshot updated

* GN-000 Links for UR. DO NOT DEPLOY TO LIVE

* GN-000 Prettier issue

* GN-102 Fix letters and dancing button

* GN-103 Button fix and letter link fix

* GN-103 Button dancing fix

* GN-103 Another dancing button fix attempt

* GN-106 Content link issue

* GN-105 Amend S&I base link

* Start guidance content

* AW/21 Colour Scheme

* GN-98 Guidance content

* GN-106 About us content update

* GN-109 More content

* GN-107 Pathways content

* GN-108 Remove e.preventDefault on mega menu click handler to enable links to work

* GN-108 Fix scrim

* GN-108 Add canUseDOM state to control display of dropdown menus in main nav

* Duplicate css removed

* Remove duplicate CSS

* Remove duplicate css

* Remove duplicate export

* Links to live

* Tidy up

* GN-108 Primary to CTA buttons

* GN-108 Add column gap

* GN-108 Consistent URLs

Co-authored-by: Eleanor Mollett <[email protected]>
Co-authored-by: John Davey <[email protected]>

* GN-112 New simplified pathways content (#139)

* GN-112 New simplified pathways content

* GN-112 Remove pathways dropdown

* GN-113 Alpha snag list (#140)

* Settings

* GN-113 Alpha snag list

* Config typo

* GN-000 Merge npm release (#144)

* GN-116 Publishing to npm (#142)

* GN-116 Pin Node version with Volta

* GN-116 Update readme

* GN-56 Footer logo and remove IE8 support for SVG fallback (#141)

Co-authored-by: Ian Routledge <[email protected]>

Co-authored-by: Ian Routledge <[email protected]>
Co-authored-by: Ian Routledge <[email protected]>

* GN-119 BNF CSS scoping (#146)

* GN-138 Shorten nav copy (#147)

* GN-140 Standards and indicators content (#151)

* GN-116 Publishing to npm (#142)

* GN-116 Pin Node version with Volta

* GN-116 Update readme

* GN-56 Footer logo and remove IE8 support for SVG fallback (#141)

Co-authored-by: Ian Routledge <[email protected]>

* GN-140 Standards removal

Co-authored-by: Ian Routledge <[email protected]>
Co-authored-by: Ian Routledge <[email protected]>

* GN-118 Add non-JS dropdown (#149)

* GN-118 Add non-JS dropdown

* GN-118 More link fallback

* Removed redundant nesting

* GN-117 Remove need to assert on dom (#148)

* context experiments

* basic context setup

* tidy up debugging

* uncommen event listener for expected closing behaviour

* make debug clearer

* clean up console logging for clarity

* move globalnavcontext provider up to header component

* GN-117 add useCallback to clickOutside hook to maintain reference to id of open dropdown

* GN-117 Refactor Nav component to class. Add custom hook and context for open dropdown state and nav area click outside detection

* GN-117 Begin conversion of Account class component to functional component

* GN-117 Remove commented out lines

* GN-117 Reinstate propTypes for Naccount placeholder component

* Side effect sideline (#150)

* side effect shenanigans

* Magical useRef()

* update key event to use e.key rather than e.keycode for better cross platform

* Move myAccount isExpanded state into GlobalNavContext

* Remove redundant event binding

* Make megamenu click detection more 'reacty'

* Manage context of opened menus

* Rename Naccount component to Account

Co-authored-by: John Davey <[email protected]>

* Tests needed

* GN-117 Tidy up redundant arguments and commented out logic for useClickOutside hook

* GN-117 Change directory structure for hooks and react context. Make useClickOutside re-useable.

* GN-117 Import GlobalNavContextProvider from new location for Account tests

* GN-117 Fixing broken unit tests

* GN-117 Fixing broken tests

* GN-117 Fixing broken tests

* Replace simulate click

* GN-117 Revert some tests to shallow rendering after adding defaults to context

* GN-117 Revert to shallow mounting for a previously failing unit test

* GN-117 Convert unit test from shallow to mount due to issues around enzyme support of useContext 'enzymejs/enzyme#2176'

* GN-117 Rename GlobalNavContext to HeaderContext

* GN-117 remove unused dependencies from account test

* GN-117 Tidy up unit tests

* testing custom hook useClickOutside

* basic setup

* Custom hook test

* Update test

* Rename test

Co-authored-by: w@rren <[email protected]>

* Set base high z-index (#152)

* Snapshot update

* Remove nerv

* GN-146 Data tracking attributes

* GN-146 Data tracking attributes (#153)

* Update snapshot

* GN-115 Add additional data-tracking attributes

* GN-115 Update test snapshot

* GN-145 Implement self contained grid system (#155)

* Replace find with filter (#154)

* GN-148 Fix content overflow

* Move focus trap to deps

* GN-149 Skip x route (#157)

* GN-149 Reinstate ids for top level links to make them focussable upon closing dropdown

* GN-149 Refactor

Co-authored-by: w@rren <[email protected]>

Co-authored-by: w@rren <[email protected]>

* GN-130 Fix invisible white close button

* Scrim flicker fix

Co-authored-by: John Davey <[email protected]>

* GN-115 Add IE11 compatible e.key string for escape key

* GN-115 Fix bug in copy

* GN-115 Add Esc to ESCAPE_KEYS for IE11 support

* Communities link update

* Fix concatenated links

* Correct public involvement link (again)

* GN-137 Add tests (#158)

* Uncommented tests

* GN-137 Add unit tests for dropdown component

* Updated browserslist & caniuse

* NavLinks test WIP

* Trying to test WIP

* GN-137 Fix tests for tracked link

* GN-137 Update 'Proposed' to 'Awaiting development'

* GN-137 Skip failing test - enzyme mocking hooks issue

* GN-137 Fix or skip failing tests due to enzyme react hooks testing issues

Co-authored-by: w@rren <[email protected]>

* GN-154 Button styling

Including GN-155 GN-153

* GN-115 Add data-tracking attrs for Standards and Indicators dropdown

* Alpha current style override

Co-authored-by: John Davey <[email protected]>

Co-authored-by: Eleanor Mollett <[email protected]>
Co-authored-by: John Davey <[email protected]>
Co-authored-by: John Davey <[email protected]>
Co-authored-by: Ian Routledge <[email protected]>
Co-authored-by: Ian Routledge <[email protected]>
Co-authored-by: John Davey <[email protected]>
  • Loading branch information
7 people authored Dec 2, 2021
1 parent 23ed7af commit 161c20f
Show file tree
Hide file tree
Showing 61 changed files with 3,759 additions and 1,200 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,4 @@ lib
.DS_Store
.idea
.idea/Global Nav.iml
.netlify/state.json
13 changes: 8 additions & 5 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
{
"editor.defaultFormatter": "esbenp.prettier-vscode",
"prettier.prettierPath": "./node_modules/prettier",
"editor.codeActionsOnSave": {
"source.fixAll": true
},
"editor.formatOnSave": true,
"editor.rulers": [80, 120],
"files.eol": "\n",
"sasslint.enable": false,
"css.validate": false,
"less.validate": false,
"scss.validate": false,
Expand All @@ -22,10 +24,11 @@
"lib": true
},
"workbench.colorCustomizations": {
"activityBar.background": "#493657",
"activityBar.foreground": "#FFFFFF",
"titleBar.activeBackground": "#493657",
"titleBar.activeForeground": "#FFFFFF"
"activityBar.background": "#8f4e4d",
"activityBar.foreground": "#000",
"activityBar.inactiveForeground": "#FFFDE1",
"titleBar.activeBackground": "#8f4e4d",
"titleBar.activeForeground": "#FFFDE1"
},
"omnisharp.autoStart": false
}
512 changes: 441 additions & 71 deletions package-lock.json

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
"@babel/plugin-transform-runtime": "^7.14.2",
"@babel/preset-env": "^7.14.2",
"@babel/preset-react": "^7.13.13",
"@nice-digital/design-system": "^1.2.30",
"@nice-digital/eslint-config": "^1.0.3",
"@pmmmwh/react-refresh-webpack-plugin": "^0.4.3",
"autoprefixer": "^10.2.5",
Expand Down Expand Up @@ -88,8 +89,6 @@
"jest": "^26.6.3",
"jest-teamcity-reporter": "^0.9.0",
"mockdate": "^3.0.5",
"nerv-devtools": "^1.5.7",
"nervjs": "^1.5.7",
"npm-audit-reporter-teamcity": "^0.3.1",
"postcss": "^8.2.15",
"postcss-loader": "^5.2.0",
Expand All @@ -116,13 +115,14 @@
"dependencies": {
"@babel/runtime": "^7.14.0",
"@nice-digital/browserslist-config": "^2.0.1",
"@nice-digital/icons": "^2.2.3",
"@nice-digital/nds-core": "^1.2.4",
"@use-it/event-listener": "^0.1.6",
"accessible-autocomplete": "^2.0.3",
"classnames": "^2.3.1",
"es5-polyfill": "0.0.6",
"focus-trap-react": "^8.7.0",
"js-cookie": "^2.2.1",
"prop-types": "^15.7.2",
"react-shadow-root": "^6.1.0",
"unfetch": "^4.2.0"
},
"files": [
Expand Down
4 changes: 3 additions & 1 deletion src/Common.module.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@import 'Header/header-settings';

.link .tooltip {
clip: rect(1px 1px 1px 1px);
clip: rect(1px, 1px, 1px, 1px);
Expand All @@ -18,7 +20,7 @@
padding: rem(0 $nds-spacing-x-small);
position: absolute;
width: auto;
z-index: 1;
z-index: $base-z-index;
}

.visuallyHidden {
Expand Down
2 changes: 1 addition & 1 deletion src/Footer/Footer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { footerClickEventAction } from "../tracker";
export class Footer extends Component {
render() {
return (
<footer className={styles.footer}>
<footer className={styles.footer} data-tracking="Global footer">
<div className={styles.container}>
<TrackedLink
eventAction={footerClickEventAction}
Expand Down
2 changes: 2 additions & 0 deletions src/Footer/Footer.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
content-visibility: auto; /* stylelint-disable-line */
font-family: unquote($nds-font-family-sans);
margin: rem($nds-spacing-large 0 0 0);
position: relative;
z-index: 1;

*,
*:before,
Expand Down
68 changes: 42 additions & 26 deletions src/Footer/Services/Services.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,32 +12,14 @@ export default class Services extends Component {
<nav className={styles.wrapper} aria-label="Our services">
<ul className={styles.list}>
{links.external.map(
function ({ href, id, text, abbreviation, title }) {
return (
<li key={id}>
<TrackedLink
href={href}
eventAction={footerClickEventAction}
eventLabel={text}
aria-current={id == this.props.service ? "true" : null}
className={styles.link}
>
{abbreviation ? (
<>
<abbr title={title}>
{text}{" "}
<span className={styles.visuallyHidden}>{title}</span>
</abbr>
<span aria-hidden="true" className={styles.tooltip}>
{title}
</span>
</>
) : (
text
)}
</TrackedLink>
</li>
);
function (link) {
if (link.nestedLinks) {
return link.nestedLinks.map((nestedLink) => {
return <FooterLink key={nestedLink.id} {...nestedLink} />;
});
} else {
return <FooterLink key={link.id} {...link} />;
}
}.bind(this)
)}
</ul>
Expand All @@ -46,6 +28,40 @@ export default class Services extends Component {
}
}

FooterLink.propTypes = {
href: PropTypes.string,
id: PropTypes.string,
text: PropTypes.string,
abbreviation: PropTypes.string,
title: PropTypes.string,
};

function FooterLink({ href, text, abbreviation, title }) {
return (
<li>
<TrackedLink
href={href}
eventAction={footerClickEventAction}
eventLabel={text}
className={styles.link}
>
{abbreviation ? (
<>
<abbr title={title}>
{text} <span className={styles.visuallyHidden}>{title}</span>
</abbr>
<span aria-hidden="true" className={styles.tooltip}>
{title}
</span>
</>
) : (
text
)}
</TrackedLink>
</li>
);
}

Services.propTypes = {
service: PropTypes.string,
};
Loading

0 comments on commit 161c20f

Please sign in to comment.