-
Notifications
You must be signed in to change notification settings - Fork 1
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
Contact step page #2214
Merged
Merged
Contact step page #2214
Changes from all commits
Commits
Show all changes
54 commits
Select commit
Hold shift + click to select a range
0d68c73
init
taniaholst f7927d1
init
taniaholst 14ef88d
Merge branch 'main' into contact-step-page
taniaholst fe63e80
Refactor ContactStepPage component with enhanced type safety and step…
bdahle e24d359
oppsett header og htmlarea
taniaholst 922578b
Styling for header med piktogram og ingress
taniaholst 00f843c
sonar
taniaholst 438e6fa
Merge pull request #2216 from navikt/header
taniaholst c8fc5a0
Update screenshots
taniaholst b27af6e
Merge branch 'contact-step-page' of github.com:navikt/nav-enonicxp-fr…
taniaholst fda82a3
Update screenshots
taniaholst 618c2a7
Merge branch 'contact-step-page' into contact-step-links
bdahle cbaedc0
intern lenke funker
bdahle c5e044b
fjern boilerplate-html
bdahle c8635ea
fjern div
bdahle cf88d5e
bruk LinkPanel
bdahle 33cbbd2
styling links
bdahle d68eb85
fiks ekstern lenke
bdahle f0754e0
Refactor ContactStepPage to use getHref function for link generation
bdahle 1b53928
fjern classname
bdahle 02df71c
fjern playwright test results
bdahle be9c646
todo analytics
bdahle 0873a32
Merge pull request #2217 from navikt/contact-step-links
bdahle 774a391
Add links heading and subheadline to ContactStepPage component
bdahle 0face77
bytt navn fra steps til links
bdahle c3cc4a2
Merge pull request #2218 from navikt/contact-step-page-links-headings
bdahle a1876c4
la til tilbakelenke
taniaholst 43dded2
styling
taniaholst 2938c98
storybook for ContactStepPage
taniaholst 4d4fba4
@ts-ignore på masse greier i storybook fordi ting ikke er satt opp he…
taniaholst 8e5bf36
@ts-ignore på masse greier i storybook fordi ting ikke er satt opp he…
taniaholst 1ce912a
Update screenshots
taniaholst 824457e
fjern spacing når mangler explanation
bdahle a3f17d2
midlertidig løsning for fiks av bredde
taniaholst 758782a
Merge branch 'contact-step-page' of github.com:navikt/nav-enonicxp-fr…
taniaholst 6a88fc9
Update screenshots
taniaholst 0c5bc57
endret navn på headerkomponent
taniaholst 08e44d4
bruk LinkWithIngressMixin
bdahle fe5d800
la inn contact-step-page i noindex og gjorde refaktoreringer i contac…
taniaholst 424bf59
fikset import
taniaholst 04a1ed1
fiks
taniaholst 7034998
bruk InternalLinkMixin
bdahle 7e30467
fikset noindex
taniaholst d7d0ffe
Merge branch 'contact-step-page' into contact-step-page-external-links
bdahle b69721d
Merge pull request #2223 from navikt/contact-step-page-external-links
bdahle 233bae8
sletta dupliserte filer
taniaholst 88a7032
Merge branch 'contact-step-page' of github.com:navikt/nav-enonicxp-fr…
taniaholst 7aef3a4
fiks av styling
taniaholst ec22add
syntaks :global
bdahle 01c57d8
Update screenshots
bdahle 3218201
css justeringer
taniaholst 35a1b56
css justeringer
taniaholst c9bf753
fjern kommentar
bdahle ada03d6
Merge branch 'main' into contact-step-page
bdahle File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Binary file modified
BIN
+2 Bytes
(100%)
...omponents-common-card-largecardv2--illustration-desktop-linux-desktop-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+6 Bytes
(100%)
...onents-common-headers-themedpageheader--default-desktop-linux-desktop-linux.png
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ser ikke ut som noen endring i praksis på f.eks. nav.no/aap |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+0 Bytes
(100%)
...-common-headers-themedpageheader--overview-page-desktop-linux-desktop-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+6 Bytes
(100%)
...ommon-headers-themedpageheader--with-time-stamp-desktop-linux-desktop-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+30.5 KB
...ages-contact-step-page-contactsteppage--default-desktop-linux-desktop-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+30.5 KB
...-contact-step-page-contactsteppage--editor-view-desktop-linux-desktop-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+30.5 KB
...ages-contact-step-page-contactsteppage--english-desktop-linux-desktop-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
packages/nextjs/src/components/_common/headers/headerWithParent/HeaderWithParent.module.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
.headerContainer { | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
|
||
.textAboveTitle { | ||
color: var(--a-text-subtle); | ||
font-weight: 400; | ||
font-size: 20px; | ||
line-height: 28px; | ||
letter-spacing: -0.1%; | ||
} | ||
|
||
.header { | ||
font-size: 40px; | ||
line-height: 52px; | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
packages/nextjs/src/components/_common/headers/headerWithParent/HeaderWithParent.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { BodyShort, Heading } from '@navikt/ds-react'; | ||
import { ProductDataMixin } from 'types/component-props/_mixins'; | ||
import { ContentProps } from 'types/content-props/_content-common'; | ||
import { classNames } from 'utils/classnames'; | ||
import style from './HeaderWithParent.module.scss'; | ||
|
||
type Props = { | ||
contentProps: Pick<ContentProps, 'data'> & { | ||
data: Pick<ProductDataMixin, 'title' | 'illustration'>; | ||
}; | ||
textAboveTitle?: string; | ||
className?: string; | ||
}; | ||
|
||
export const HeaderWithParent = ({ contentProps, textAboveTitle, className }: Props) => { | ||
const { data } = contentProps; | ||
|
||
return ( | ||
<div className={classNames(style.headerContainer, className)}> | ||
<BodyShort textColor="subtle" className={style.textAboveTitle}> | ||
{textAboveTitle} | ||
</BodyShort> | ||
<Heading level="1" size="large" spacing className={style.header}> | ||
{data.title} | ||
</Heading> | ||
</div> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 0 additions & 35 deletions
35
packages/nextjs/src/components/_common/lenkepanel-liste/LenkepanelListe.module.scss
This file was deleted.
Oops, something went wrong.
54 changes: 0 additions & 54 deletions
54
packages/nextjs/src/components/_common/lenkepanel-liste/LenkepanelListe.tsx
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
63 changes: 63 additions & 0 deletions
63
packages/nextjs/src/components/pages/contact-step-page/ContactStepPage.module.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
.contactStepPage { | ||
padding-bottom: 1rem; | ||
column-gap: 1.75rem; | ||
margin: 1.25rem auto 2.5rem; | ||
display: grid; | ||
grid-template-columns: 1fr 40rem 1fr; | ||
grid-template-areas: | ||
'pictogram header .' | ||
'. content .' | ||
'. backLink .'; | ||
|
||
@media only screen and (max-width: 1024px) { | ||
grid-template-columns: none; | ||
grid-template-areas: | ||
'. pictogram .' | ||
'. header .' | ||
'. content .' | ||
'. backLink .'; | ||
} | ||
.pictogram { | ||
grid-area: pictogram; | ||
display: block; | ||
justify-self: end; | ||
width: 4.5rem; | ||
height: auto; | ||
position: relative; | ||
align-self: flex-start; | ||
|
||
@media only screen and (max-width: 1024px) { | ||
width: 4rem; | ||
justify-self: start; | ||
} | ||
} | ||
.header { | ||
grid-area: header; | ||
} | ||
|
||
.content { | ||
grid-area: content; | ||
|
||
.linkPanels { | ||
display: flex; | ||
flex-direction: column; | ||
gap: 0.5rem; | ||
list-style-type: none; | ||
padding: 0; | ||
|
||
.linkPanel { | ||
border-radius: 0.5rem; | ||
border: 1px solid var(--a-border-subtle); | ||
|
||
& :global(.navds-link-panel__title) { | ||
color: var(--default-action-color); | ||
font-size: 1.25rem; | ||
} | ||
} | ||
} | ||
} | ||
|
||
.backLink { | ||
grid-area: backLink; | ||
} | ||
} |
149 changes: 149 additions & 0 deletions
149
packages/nextjs/src/components/pages/contact-step-page/ContactStepPage.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,149 @@ | ||
import React from 'react'; | ||
import { Provider } from 'react-redux'; | ||
import type { Decorator, Meta, StoryObj } from '@storybook/react'; | ||
import { mockStore } from 'store/store'; | ||
import { ContactStepPage } from './ContactStepPage'; | ||
|
||
const withStore: Decorator = (Story) => ( | ||
<Provider store={mockStore}> | ||
<Story /> | ||
</Provider> | ||
); | ||
|
||
const meta = { | ||
component: ContactStepPage, | ||
decorators: [withStore], | ||
//Ikke en komplett side. Ikke sikkert vi skal sette opp hele sider i storybook. | ||
//Bør kanskje finne en bedre måte å gjøre dette på om vi skal prøve å ha hele sider i storybook. | ||
//Sjekk ut: https://storybook.js.org/docs/writing-stories/build-pages-with-storybook | ||
args: { | ||
_id: '4b4f44c8-d82c-4046-80e8-2b49ff9feca3', | ||
_name: 'skrivtiloss', | ||
_path: '/www.nav.no/tania/skrivtiloss', | ||
creator: 'user:system:su', | ||
modifier: 'user:system:su', | ||
createdTime: '2025-03-06T09:12:39.492046Z', | ||
modifiedTime: '2025-03-13T11:26:18.994311Z', | ||
owner: 'user:system:su', | ||
// @ts-ignore | ||
type: 'no.nav.navno:contact-step-page', | ||
displayName: 'Skriv til oss', | ||
hasChildren: true, | ||
language: 'no', | ||
valid: true, | ||
childOrder: 'modifiedtime DESC', | ||
data: { | ||
audience: { | ||
person: {}, | ||
// @ts-ignore | ||
_selected: 'person', | ||
}, | ||
steps: { | ||
nextStep: { | ||
_selected: 'internal', | ||
internal: { | ||
internalContent: '5f679435-e468-4196-aa4a-5c86be9438a0', | ||
}, | ||
}, | ||
label: 'Test', | ||
}, | ||
customPath: '/test-kontaktside', | ||
title: 'Skriv til oss', | ||
textAboveTitle: 'Kontakt oss', | ||
ingress: 'yrdyr', | ||
html: '<p>Hva vil du gjøre?</p>\n', | ||
target: '4b4f44c8-d82c-4046-80e8-2b49ff9feca3', | ||
text: 'Skriv til oss om noe annet', | ||
link: { | ||
internal: { | ||
// @ts-ignore | ||
target: '419e1783-25af-4513-aebb-2cce0b6bd7da', | ||
text: 'Kontakt oss på en annen måte', | ||
}, | ||
_selected: 'internal', | ||
}, | ||
links: [ | ||
{ | ||
label: 'Melde fra om endringer i saken din', | ||
explanation: | ||
'Når du får støtte fra Nav, må du melde fra om endringer som kan ha betydning for saken din. Det kan for eksempel være endringer i inntekt, bosted, jobb- eller familiesituasjon, eller ferie og opphold i utlandet.', | ||
link: { | ||
internal: { | ||
internalContent: { | ||
// @ts-ignore | ||
createdTime: '2025-03-13T11:18:33.082857Z', | ||
displayName: '"Melde fra om endringer i saken din"', | ||
language: 'no', | ||
modifiedTime: '2025-03-13T11:23:51.173Z', | ||
publish: { | ||
first: '2025-03-13T11:24:01.903Z', | ||
from: '2025-03-13T11:24:01.903Z', | ||
}, | ||
type: 'no.nav.navno:contact-step-page', | ||
_id: 'ad33a6f6-403b-4ba4-bd7e-04cc25a473f2', | ||
_path: '/privatperson/meldeifraomendringer', | ||
}, | ||
}, | ||
_selected: 'internal', | ||
}, | ||
}, | ||
{ | ||
label: 'Få svar på spørsmål', | ||
explanation: | ||
'Du kan blant annet stille oss spørsmål om saken din, hvilke rettigheter du har, hvilke regler som gjelder og hvordan du går frem for å søke.', | ||
link: { | ||
internal: { | ||
internalContent: { | ||
// @ts-ignore | ||
createdTime: '2025-03-13T11:18:33.082857Z', | ||
displayName: 'Skriv til oss', | ||
language: 'no', | ||
modifiedTime: '2025-03-13T11:23:51.173Z', | ||
publish: { | ||
first: '2025-03-13T11:24:01.903Z', | ||
from: '2025-03-13T11:24:01.903Z', | ||
}, | ||
type: 'no.nav.navno:contact-step-page', | ||
_id: '"4b4f44c8-d82c-4046-80e8-2b49ff9feca3"', | ||
_path: '/privatperson/velgpengestotteellertjeneste', | ||
}, | ||
}, | ||
_selected: 'internal', | ||
}, | ||
}, | ||
], | ||
}, | ||
x: { | ||
'no-nav-navno': { | ||
redirectToLayer: {}, | ||
virtualParent: {}, | ||
previewOnly: {}, | ||
searchOrder: {}, | ||
}, | ||
}, | ||
// @ts-ignore | ||
page: {}, | ||
attachments: {}, | ||
publish: { | ||
from: '2025-03-11T09:40:07.350Z', | ||
first: '2025-03-11T09:40:07.350Z', | ||
}, | ||
}, | ||
} satisfies Meta<typeof ContactStepPage>; | ||
|
||
export default meta; | ||
type Story = StoryObj<typeof meta>; | ||
|
||
export const Default: Story = {}; | ||
|
||
export const English: Story = { | ||
args: { | ||
language: 'en', | ||
}, | ||
}; | ||
|
||
export const EditorView: Story = { | ||
args: { | ||
editorView: 'edit', | ||
}, | ||
}; |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Liten unintentional endring på disse kortene