Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GN-106 About us content #130

Merged
merged 30 commits into from
Oct 11, 2021
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
78cbc72
GN-101 Move focus to search when clicked
emollett Sep 14, 2021
c9a3644
GN-101 Close MyAccount Dropdown on meganav click
emollett Sep 14, 2021
f3442d7
GN-101 Close MyAccount Dropdown on meganav click
emollett Sep 14, 2021
473e161
Merge branch 'GN-101-Issues' of https://github.com/nice-digital/globa…
emollett Sep 14, 2021
1fbcdbc
GN-101 Styling issues across applications
emollett Sep 15, 2021
8a11524
GN-101 Use bundled design system css
emollett Sep 15, 2021
6f01a8e
GN-101 Loose grid
emollett Sep 15, 2021
77d2e70
GN-98 Initial guidance content
emollett Sep 15, 2021
6ad3292
Merge branch 'GN-95-Add-meganav-mechanism' into GN-98-Guidance-content
emollett Sep 22, 2021
eb416a1
GN-98 Content update
emollett Sep 22, 2021
dfe7732
GN-106 About us content
emollett Sep 22, 2021
ed1511f
GN-101 Fix failing tests
emollett Sep 23, 2021
14b2339
Merge branch 'GN-101-Fix-failing-tests' into GN-106-About-us-content
emollett Sep 23, 2021
1eedcd7
GN-106 Update snapshot
emollett Sep 23, 2021
001206c
Merge branch 'GN-101-Fix-failing-tests' into GN-98-Guidance-content
emollett Sep 23, 2021
591d8f3
GN-98 Snapshot updated
emollett Sep 23, 2021
e00f431
GN-106 Content link issue
wa-rren-dev Sep 27, 2021
f0cf202
Start guidance content
wa-rren-dev Sep 27, 2021
bb65207
AW/21 Colour Scheme
wa-rren-dev Sep 27, 2021
cfde4af
GN-98 Guidance content
wa-rren-dev Sep 29, 2021
8e4dac6
Merge branch 'GN-95-Add-meganav-mechanism' into GN-98-Guidance-content
wa-rren-dev Sep 29, 2021
6bbee86
GN-106 About us content update
wa-rren-dev Sep 29, 2021
19dff6d
GN-108 Remove e.preventDefault on mega menu click handler to enable l…
johndavey72 Sep 30, 2021
470d011
GN-108 Fix scrim
wa-rren-dev Sep 30, 2021
0981a0d
GN-108 Add canUseDOM state to control display of dropdown menus in ma…
johndavey72 Sep 30, 2021
77acd56
Merge branch 'GN-95-Add-meganav-mechanism' into GN-106-About-us-content
johndavey72 Oct 1, 2021
b17cdf2
Merge branch 'GN-95-Add-meganav-mechanism' into GN-106-About-us-content
wa-rren-dev Oct 11, 2021
164ec0d
Merge branch 'GN-108-Snag-list' into GN-106-About-us-content
wa-rren-dev Oct 11, 2021
a7c951c
Prettier
wa-rren-dev Oct 11, 2021
dd3409c
Reset root about us URL
wa-rren-dev Oct 11, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions src/Footer/Services/__snapshots__/Services.test.jsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,20 @@ exports[`Services Matches snapshot 1`] = `
</span>
</TrackedLink>
</li>
<li
key="about-us"
>
<TrackedLink
aria-current={null}
className="link"
eventAction="Footer click"
eventCategory="TopHat and footer"
eventLabel="About us"
href="https://www.nice.org.uk/about/"
>
About us
</TrackedLink>
</li>
<li
key="more-nice-services"
>
Expand Down
167 changes: 167 additions & 0 deletions src/Header/Nav/Dropdown/Components/AboutUs.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
import React from "react";
import { Button } from "@nice-digital/nds-button";
import { Grid, GridItem } from "@nice-digital/nds-grid";
import styles from "./Components.module.scss";
import services from "../../../../services.json";
import classnames from "classnames";

export function AboutUs() {
const baseUrl = services.external.find(
(service) => service.text == "About us"
).href;

return (
<section aria-label="About us - dropdown navigation">
<h2 className="mt--0">About us</h2>
<p>
We provide national guidance and advice to improve health and social
care.
</p>
<Button variant="primary" to={baseUrl}>
View about us
</Button>
<Grid gutter="loose">
<GridItem cols={12} md={3}>
<h3 className="mt--d">Who we are</h3>
<ol className={classnames(styles.listUnstyled, "mt--d")}>
<li>
<a href={`${baseUrl}who-we-are/board`}>The board</a>
</li>
<li>
<a href={`${baseUrl}who-we-are/senior-management-team`}>
Executive team
</a>
</li>
<li>
<a href={`${baseUrl}who-we-are/guidance-executive`}>
Guidance executive
</a>
</li>
<li>
<a href={`${baseUrl}who-we-are/structure-of-nice`}>
Our structure
</a>
</li>
<li>
<a href={`${baseUrl}who-we-are/policies-and-procedures`}>
Policies and procedures
</a>
</li>
<li>
<a
href={`${baseUrl}who-we-are/corporate-publications/the-nice-strategy-2021-to-2026`}
>
The NICE strategy 2021 to 2026
</a>
</li>
</ol>
</GridItem>
<GridItem cols={12} md={3}>
<h3 className="mt--d">What we do</h3>
<ol className={classnames(styles.listUnstyled, "mt--d")}>
<li>
<a
href={`${baseUrl}what-we-do/our-programmes/evidence-standards-framework-for-digital-health-technologies`}
>
Digital health
</a>
</li>
<li>
<a href={`${baseUrl}what-we-do/nice-international`}>
NICE international
</a>
</li>
<li>
<a href={`${baseUrl}nice-communities/social-care`}>Social care</a>
</li>
<li>
<a href={`${baseUrl}what-we-do/life-sciences`}>Life sciences</a>
</li>
<li>
<a href={`${baseUrl}what-we-do/into-practice`}>Into practice</a>
</li>
<li>
<a
href={`${baseUrl}what-we-do/our-programmes/nice-guidance/nice-guidelines/shared-decision-making`}
>
Shared decision making
</a>
</li>
</ol>
</GridItem>
<GridItem cols={12} md={3}>
<h3 className="mt--d">Our programmes</h3>
<ol className={classnames(styles.listUnstyled, "mt--d")}>
<li>
<a href={`${baseUrl}what-we-do/our-programmes/nice-guidance`}>
Guidance
</a>
</li>
<li>
<a href={`${baseUrl}what-we-do/our-programmes/nice-advice`}>
Advice
</a>
</li>
<li>
<a href="https://www.nice.org.uk/standards-and-indicators">
Standards and indicators
</a>
</li>
<li>
<a href={`${baseUrl}what-we-do/our-programmes/topic-selection`}>
Topic selection
</a>
</li>
<li>
<a
href={`${baseUrl}what-we-do/our-programmes/cost-savings-resource-planning`}
>
Financial planning
</a>
</li>
<li>
<a href={`${baseUrl}what-we-do/our-programmes/patient-safety`}>
Patient safety
</a>
</li>
</ol>
</GridItem>
<GridItem cols={12} md={3}>
<h3 className="mt--d">Get involved</h3>
<ol className={classnames(styles.listUnstyled, "mt--d")}>
<li>
<a href="https://www.nice.org.uk/Get-Involved/stakeholder-registration">
Register as a stakeholder
</a>
</li>
<li>
<a href="https://www.nice.org.uk/Get-Involved/Consultations">
Comment on a consultation
</a>
</li>
<li>
<a href="https://www.nice.org.uk/Get-Involved/our-committees">
Join a committee
</a>
</li>
<li>
<a href="https://www.nice.org.uk/Get-Involved/Meetings-in-public">
Come to a meeting
</a>
</li>
<li>
<a href="https://www.nice.org.uk/Get-Involved/jobs">
Work with us
</a>
</li>
<li>
<a href="https://www.nice.org.uk/about/nice-communities/public-involvement">
Public involvement
</a>
</li>
</ol>
</GridItem>
</Grid>
</section>
);
}
4 changes: 4 additions & 0 deletions src/Header/Nav/Dropdown/Components/Components.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,8 @@
margin-left: 0;
max-width: none; // To override max-width of 66ch set on lists
padding: 0;

li {
margin-bottom: rem($nds-spacing-small);
}
}
1 change: 1 addition & 0 deletions src/Header/Nav/Dropdown/Components/index.jsx
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
export { Guidance } from "./Guidance";
export { More } from "./More";
export { AboutUs } from "./AboutUs";
3 changes: 2 additions & 1 deletion src/Header/Nav/Dropdown/Dropdown.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";
import PropTypes from "prop-types";
import styles from "./Dropdown.module.scss";
import { Guidance, More } from "./Components/";
import { Guidance, More, AboutUs } from "./Components/";
import Remove from "@nice-digital/icons/lib/Remove";

export function Dropdown({
Expand All @@ -15,6 +15,7 @@ export function Dropdown({
const components = {
Guidance: Guidance,
More: More,
AboutUs: AboutUs,
};
const Component = components[component];

Expand Down
1 change: 1 addition & 0 deletions src/Header/Nav/Nav.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ describe("Nav", () => {
isExpanded: false,
accountsData: null,
service: null,
handleScrim: () => {},
};
const externalServices = services.external;

Expand Down
5 changes: 5 additions & 0 deletions src/Header/Nav/__snapshots__/Nav.test.jsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ exports[`Nav Matches snapshot with no accounts links 1`] = `
>
<NavLinks
currentService={null}
handleScrim={[Function]}
servicesToDisplay={
Array [
Object {
Expand Down Expand Up @@ -121,6 +122,7 @@ exports[`Nav Matches snapshot with sub links for selected external service 1`] =
<Nav
accountsData={null}
additionalSubMenuItems={Array []}
handleScrim={[Function]}
isExpanded={false}
service="link2"
>
Expand All @@ -137,6 +139,7 @@ exports[`Nav Matches snapshot with sub links for selected external service 1`] =
>
<NavLinks
currentService="link2"
handleScrim={[Function]}
servicesToDisplay={
Array [
Object {
Expand Down Expand Up @@ -287,6 +290,7 @@ exports[`Nav internalServices Matches snapshot with sub links for selected inter
<Nav
accountsData={null}
additionalSubMenuItems={Array []}
handleScrim={[Function]}
isExpanded={false}
service="internal1"
>
Expand All @@ -303,6 +307,7 @@ exports[`Nav internalServices Matches snapshot with sub links for selected inter
>
<NavLinks
currentService="internal1"
handleScrim={[Function]}
servicesToDisplay={
Array [
Object {
Expand Down
Loading