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

Storybook 🧪 #1966

Merged
merged 123 commits into from
Aug 23, 2024
Merged
Show file tree
Hide file tree
Changes from 115 commits
Commits
Show all changes
123 commits
Select commit Hold shift + click to select a range
5ceb73f
npx storybook@latest init
bdahle Jun 26, 2024
279aa25
formattering
bdahle Jun 26, 2024
68b7fd2
ny story
bdahle Jun 26, 2024
d684f1f
fiks import-feil av common med storybook
bdahle Jun 26, 2024
4e49d07
basic story for PageNavigationMenu, styling funker ikke
bdahle Jun 26, 2024
4b8657d
importer global styling til storybook
bdahle Jun 26, 2024
b60dc3d
utvid story
bdahle Jun 26, 2024
fc1e6d6
secondary story
bdahle Jun 26, 2024
5081eba
spacing
bdahle Jul 10, 2024
7afc1e1
auto migration ting 8.1.11
bdahle Jul 10, 2024
c20d6d2
basic story for AreaCard
bdahle Jul 10, 2024
75d064e
story Family AreaCard
bdahle Jul 10, 2024
ea3421a
story employment
bdahle Jul 10, 2024
c9505c8
autodocs allerede satt i preview.ts
bdahle Jul 10, 2024
a488ba2
flytt stories inn i samme struktur som i prosjektet
bdahle Jul 10, 2024
aa3603f
basic story lenkeliste
bdahle Jul 10, 2024
219ef27
utvid lenkeliste story
bdahle Jul 11, 2024
12a82e6
chore: Refactor PageNavigationMenu stories structure and content
bdahle Jul 11, 2024
d553246
PayoutDates story
bdahle Jul 11, 2024
6011d39
Accordion story generert objekt
bdahle Jul 11, 2024
6baf4a2
flytt layout centered til preview.ts
bdahle Jul 11, 2024
9c248cf
UxSignals story, embedcode fra dokumentasjon
bdahle Jul 11, 2024
61dbd91
TextWithIndicator story
bdahle Jul 11, 2024
a8784c1
Calculatgor basic story
bdahle Jul 11, 2024
f0a87b7
flytt deler av kalkulator inn i egne mapper
bdahle Jul 12, 2024
fb9ffff
wip stories Calculator
bdahle Jul 12, 2024
4aeec4a
bruk kalkulator for barnetilsyn
bdahle Jul 12, 2024
e7e87ea
Update calculator field label to "Utgift" and variable name to "utgift"
bdahle Jul 12, 2024
ad1f66a
refactor: update import statement for CalculatorField module
bdahle Jul 12, 2024
1564eab
oppgrader storybook
bdahle Jul 12, 2024
4c24828
fjern unødvendig getAbsolutePath i sorybook main.ts
bdahle Jul 12, 2024
82724da
Merge branch 'master' into test-storybook
bdahle Jul 12, 2024
868553d
npm i
bdahle Jul 16, 2024
d07309c
installer chromatic
bdahle Jul 16, 2024
dec1ff8
legg til chromatic token
bdahle Jul 16, 2024
fa668eb
Add chromatic configuration file
bdahle Jul 22, 2024
fda0eb3
story for ProductPanelExpandable
bdahle Jul 22, 2024
22a5e26
importrekkefølger
bdahle Jul 22, 2024
1cc304e
story AlertBox
bdahle Jul 22, 2024
1b26798
chore: Update AlertBox story with additional variants and sizes
bdahle Jul 22, 2024
b198874
story PageUpdatedInfo
bdahle Jul 22, 2024
faa2e4f
story CopyLink
bdahle Jul 22, 2024
cb56480
legg inn data for SituationPage story
bdahle Jul 23, 2024
e09419f
prøv å gjøre dataene spiselige
bdahle Jul 23, 2024
c3e8995
fiks imports som feiler i storybook
bdahle Jul 23, 2024
ccf3064
fjern spacing
bdahle Jul 23, 2024
9a5e9e3
disable SituationPage Story som feiler pga manglende Provider
bdahle Jul 23, 2024
4dddb38
bump storybook 8.2.5
bdahle Jul 23, 2024
b486b31
story FrontPageShortcutsPart uten audience
bdahle Jul 23, 2024
cfa9d4e
test PageContextProvider i preview.tsx
bdahle Jul 24, 2024
cbd8283
kommenter ut context decorator
bdahle Jul 25, 2024
c082a68
disable situation story som får alle stories til å spinne
bdahle Jul 25, 2024
a3b6ef7
bump storybook 8.2.6
bdahle Jul 25, 2024
e0d75ff
situationpage basic story, funker!!
bdahle Jul 25, 2024
c6fd962
legg til noen komponenter i toppen, fortsatt typefeil
bdahle Jul 25, 2024
0077638
fjern kommentert ut
bdahle Jul 25, 2024
255d357
disable frontpageshortcuts story, mangler context
bdahle Jul 25, 2024
9f745bd
legg til pagenavigationmenu
bdahle Jul 25, 2024
ee1eee1
Merge branch 'master' into test-storybook
bdahle Jul 25, 2024
5b272be
flere stories situationpage
bdahle Jul 25, 2024
5c2c212
omrokker stories
bdahle Jul 25, 2024
03b46a1
forsøk på OfficePage story, funker ikke
bdahle Jul 25, 2024
7d6bd3a
story AlertInContext
bdahle Jul 26, 2024
ab04a85
Story ChatbotLinkPanel
bdahle Jul 26, 2024
602352a
chatbot i mappe
bdahle Jul 26, 2024
f750761
story Chevron
bdahle Jul 26, 2024
9bd64cb
story FancyChevron
bdahle Jul 26, 2024
ac7b2a7
feil filnavn
bdahle Jul 26, 2024
4cb33b4
skriveleif
bdahle Jul 26, 2024
dabb793
story MoreLink
bdahle Jul 26, 2024
ad2f3d5
story MiniCardV2
bdahle Jul 26, 2024
f62522e
organiser cards i mapper
bdahle Jul 26, 2024
7d4b379
story MiniCardV1
bdahle Jul 26, 2024
44ade17
cardtype situation
bdahle Jul 26, 2024
b05afa4
flytt storybook log i gitignore
bdahle Jul 26, 2024
f057c06
Merge branch 'master' into test-storybook
bdahle Aug 5, 2024
2bab32f
ny story AreaCard
bdahle Aug 5, 2024
93548fc
fjern eksplisitt story path for AlertBox
bdahle Aug 5, 2024
6ac2867
bumpo storybook 8.2.7
bdahle Aug 5, 2024
ec987bf
legg til addon-storysource
bdahle Aug 5, 2024
2dd3c99
fjern title Accordion
bdahle Aug 6, 2024
c7f9be4
slett officepage story, funker ikke per nå
bdahle Aug 6, 2024
0a5cd4a
kommentar Pages
bdahle Aug 6, 2024
57ee6da
fjern test av context decorator
bdahle Aug 6, 2024
7ef5c4e
fjern Example stories
bdahle Aug 6, 2024
3a3a77e
fjern resterende eksplisitte plasseringer
bdahle Aug 6, 2024
9e7f36a
rename mappe areaCard
bdahle Aug 6, 2024
ca534bc
rename alertInContext
bdahle Aug 6, 2024
1711573
rename calculator field og result
bdahle Aug 6, 2024
e631eda
rename pageNavigationMenu
bdahle Aug 6, 2024
a7450fe
rename payoutDates
bdahle Aug 6, 2024
c680760
rename ProductPanelExpandable
bdahle Aug 6, 2024
6831074
rename textWithIndicator
bdahle Aug 6, 2024
fc7af91
rename uxSingalsWidget
bdahle Aug 6, 2024
460e5e7
rename situationPage
bdahle Aug 6, 2024
aa30c92
fiks import contentMapper
bdahle Aug 6, 2024
5aa043a
Merge branch 'master' into test-storybook
bdahle Aug 6, 2024
8a95360
slett FrontpageShortcutsPart.stories.disabled.ts, hook funker ikke fo…
bdahle Aug 7, 2024
8744669
trekk ut Chromatic foreløpig
bdahle Aug 7, 2024
2583978
Sonarlint - Do not use "Error"
bdahle Aug 7, 2024
4dcab02
sonarlint ErrorVariant igjen
bdahle Aug 7, 2024
6ab0606
basic story LenkepanelNavNo
bdahle Aug 9, 2024
e455ed1
story InfoBox
bdahle Aug 9, 2024
47191b8
InlineSmall AlertBox
bdahle Aug 9, 2024
54b8068
Basic story Header
bdahle Aug 9, 2024
8259df4
bump storybook 8.2.8
bdahle Aug 12, 2024
0b3c9d2
bruk args fra pagenavmenu i stiuationpage story
bdahle Aug 12, 2024
88794c4
Merge branch 'master' into test-storybook
bdahle Aug 21, 2024
2bc37d9
reverser kommentert ut styling ved en feil
bdahle Aug 21, 2024
c620486
fjern TODO, oppdater kommentar
bdahle Aug 21, 2024
36f7c7c
Merge branch 'master' into test-storybook
bdahle Aug 22, 2024
270a8ed
Merge master into test-storybook
terjeofnorway Aug 22, 2024
e0510e3
Legger til alias for common-import i scss for Storybook
terjeofnorway Aug 23, 2024
dd2f848
Fjerner feilaktig commit av storybook-static
terjeofnorway Aug 23, 2024
64059c3
Legger til storybook-static i gitignore
terjeofnorway Aug 23, 2024
ab5d28f
kommentar sitpage story
bdahle Aug 23, 2024
5b675d6
kombiner imports path
bdahle Aug 23, 2024
73a9055
Revert "fiks import contentMapper"
bdahle Aug 23, 2024
381a956
reverter navnenedring situationPage
bdahle Aug 23, 2024
2750979
fiks styling imports i areaCard
bdahle Aug 23, 2024
4130b8c
konsistent use 'common' as common;
bdahle Aug 23, 2024
201c5d8
fjern ubrukte styling-imports i AreaPageHader
bdahle Aug 23, 2024
5267194
fjern ubrukt configType i storybook main.ts
bdahle Aug 23, 2024
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
6 changes: 5 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
{
"plugins": ["css-modules", "no-relative-import-paths"],
"extends": ["next/core-web-vitals", "plugin:css-modules/recommended"],
"extends": [
"next/core-web-vitals",
"plugin:css-modules/recommended",
"plugin:storybook/recommended"
],
"ignorePatterns": ["next.config.js"],
"rules": {
"@next/next/no-img-element": 0,
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

# testing
/coverage
*storybook.log
/storybook-static

# next.js
/.next/
Expand Down
50 changes: 50 additions & 0 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
import { dirname, join } from 'path';
import type { StorybookConfig } from '@storybook/nextjs';
import path from 'path';

const config: StorybookConfig = {
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],

addons: [
getAbsolutePath('@storybook/addon-onboarding'),
getAbsolutePath('@storybook/addon-links'),
getAbsolutePath('@storybook/addon-essentials'),
getAbsolutePath('@chromatic-com/storybook'),
getAbsolutePath('@storybook/addon-interactions'),
getAbsolutePath('@storybook/addon-mdx-gfm'),
getAbsolutePath('@storybook/addon-storysource'),
],

framework: {
name: getAbsolutePath('@storybook/nextjs'),
options: {},
},

webpackFinal: async (config, { configType }) => {
const updatedConfig = {
...config,
resolve: {
...config.resolve,
alias: {
...config.resolve?.alias,
common: path.resolve(__dirname, '../src/common.scss'),
},
},
};

return updatedConfig;
},

staticDirs: ['../public'],

docs: {},

typescript: {
reactDocgen: 'react-docgen-typescript',
},
};
export default config;

function getAbsolutePath(value: string): any {
return dirname(require.resolve(join(value, 'package.json')));
}
11 changes: 11 additions & 0 deletions .storybook/preview.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import type { Preview } from '@storybook/react';
import '../src/global.scss';

const preview: Preview = {
parameters: {
layout: 'centered',
},
tags: ['autodocs'],
};

export default preview;
Loading
Loading