Skip to content

Commit 106cb32

Browse files
authored
Merge pull request #257 from navikt/tailwindcss-v4
chore(deps): changes needed for tailwindcss v4
2 parents 48394e9 + d27a332 commit 106cb32

24 files changed

+1164
-1553
lines changed

.github/workflows/build-and-deploy-frontend.yml

+7
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ permissions:
1919

2020
jobs:
2121
build-and-push:
22+
permissions:
23+
contents: read
24+
packages: write
25+
id-token: write
2226
name: Build and push docker image
2327
runs-on: ubuntu-latest
2428
outputs:
@@ -36,6 +40,9 @@ jobs:
3640
identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }}
3741
docker_context: frontend
3842
project_id: ${{ inputs.project_id }}
43+
build_secrets: NODE_AUTH_TOKEN=${{ secrets.READER_TOKEN }}
44+
build_args:
45+
NODE_AUTH_TOKEN=${{secrets.READER_TOKEN}}
3946
image_suffix: frontend
4047

4148
deploy-dev:

.github/workflows/build-and-deploy.yml

+7-1
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,16 @@ jobs:
130130
name: Frontend
131131
if: ${{ needs.evaluate-build-module.outputs.build_module == 'fullstack' || needs.evaluate-build-module.outputs.build_module == 'frontend' }}
132132
uses: ./.github/workflows/build-and-deploy-frontend.yml
133+
permissions:
134+
packages: write
135+
contents: read
136+
actions: read
137+
id-token: write
138+
security-events: write
139+
secrets: inherit
133140
with:
134141
deploy_env: ${{ needs.evaluate-deploy-environment.outputs.deploy_env }}
135142
project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }}
136-
secrets: inherit
137143

138144
call-build-and-deploy-backend:
139145
needs: [evaluate-deploy-environment, evaluate-build-module]

frontend/Dockerfile

+6
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ WORKDIR /usr/app
44

55
COPY package*.json .
66

7+
RUN --mount=type=secret,id=NODE_AUTH_TOKEN sh -c \
8+
'npm config set //npm.pkg.github.com/:_authToken=$(cat /run/secrets/NODE_AUTH_TOKEN)'
9+
RUN npm config set @navikt:registry=https://npm.pkg.github.com
10+
11+
COPY package.json package-lock.json ./
12+
713
RUN npm install --quiet
814

915
FROM node-with-deps

frontend/components/dataproducts/dataset/datasetSourceForm.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ export const DataproductSourceForm = ({
8080
</div>
8181
) : (
8282
<div className="flex flex-col gap-2">
83-
<div className="w-full h-[48px] border border-border-strong rounded p-1"></div>
83+
<div className="w-full h-[48px] border border-border-strong rounded-sm p-1"></div>
8484
<div className="flex gap-2 navds-error-message navds-label before:content-['•']">
8585
Du må velge gruppe i GCP før du kan velge tabell eller view
8686
</div>

frontend/components/header/user.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import { useContext } from 'react'
1+
import { MenuHamburgerIcon, PersonIcon } from '@navikt/aksel-icons'
2+
import { Dropdown, InternalHeader } from '@navikt/ds-react'
23
import { useRouter } from 'next/router'
4+
import { useContext } from 'react'
35
import { UserState } from '../../lib/context'
4-
import { Dropdown, InternalHeader } from '@navikt/ds-react'
5-
import { MenuHamburgerIcon, PersonIcon } from '@navikt/aksel-icons'
66

77
export const backendHost = () => {
88
return process.env.NODE_ENV === 'development' ? 'http://localhost:8080' : ''

frontend/components/index/searchField.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const SearchBox = ({ onSearch }: SearchBoxProps) => {
2020
onSubmit={onSubmit}
2121
>
2222
<input
23-
className="w-full border-0 p-0 focus-visible:outline-none"
23+
className="w-full border-0 p-0 focus-visible:outline-hidden"
2424
type="search"
2525
aria-label="Søkefelt"
2626
value={value}

frontend/components/lib/DescriptionEditor.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { Loader } from '@navikt/ds-react'
66
const MDEditor = dynamic(() => import('@uiw/react-md-editor'), {
77
ssr: false,
88
loading: () => (
9-
<div className="h-48 mt-2 w-full flex items-center justify-center border border-border-strong rounded">
9+
<div className="h-48 mt-2 w-full flex items-center justify-center border border-border-strong rounded-sm">
1010
<Loader size="2xlarge" />
1111
</div>
1212
),

frontend/components/lib/copy.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const Copy = ({ text }: CopyProps) => {
3131
onClick={(e) => copyToClipboard(e, text)}
3232
/>
3333
{copied && (
34-
<div className="absolute left-5 -top-2 px-2 p-1 rounded bg-gray-100 border border-gray-300">
34+
<div className="absolute left-5 -top-2 px-2 p-1 rounded-sm bg-gray-100 border border-gray-300">
3535
kopiert
3636
</div>
3737
)}

frontend/components/lib/error.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ interface errorMessageProps {
66

77
export const ErrorMessage = ({ error }: errorMessageProps) => {
88
return (
9-
<div className="bg-surface-danger-subtle rounded px-1 py-2 h-fit">
9+
<div className="bg-surface-danger-subtle rounded-sm px-1 py-2 h-fit">
1010
<div className="flex items-center text-base gap-1">
1111
<XMarkOctagonFillIcon title="a11y-title" fontSize="1.5rem" color="#C30000" />
1212
Feil

frontend/components/lib/spinner.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Loader } from '@navikt/ds-react'
22

33
export const LoaderSpinner = () => (
4-
<div className="flex flex-grow justify-center items-center">
4+
<div className="flex grow justify-center items-center">
55
<Loader size="2xlarge" transparent />
66
</div>
77
)

frontend/components/productArea/sidebar.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { BarChartIcon, SidebarLeftIcon } from '@navikt/aksel-icons'
22
import { Select } from '@navikt/ds-react'
3-
import * as React from 'react'
43
import { useState } from 'react'
54
import { PAItems } from '../../pages/productArea/[id]'
65
import DataproductLogo from '../lib/icons/dataproductLogo'

frontend/components/search/filtersList.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const FilterPill = ({
2323
className={`${className || ''
2424
} svg-scale flex items-center gap-1 cursor-pointer text-xs p-2
2525
${all
26-
? 'bg-surface-action text-text-on-inverted rounded-sm'
26+
? 'bg-surface-action text-text-on-inverted rounded-xs'
2727
: 'bg-gray-100 rounded-3xl'
2828
}
2929
${all ? 'hover:bg-surface-action-hover' : 'hover:bg-gray-300'}`}

frontend/components/user/pendingAccessRequestBar.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ interface PendingAccessRequestBarProps {
88

99
export const PendingAccessRequestBar = ({ accessRequest }: PendingAccessRequestBarProps) => {
1010
return (
11-
<div key={accessRequest.id} className="w-[60rem] mb-5 mt-5 border pt-2 pb-2 pl-4 pr-4 flex flex-row justify-between rounded border-gray-200">
11+
<div key={accessRequest.id} className="w-[60rem] mb-5 mt-5 border pt-2 pb-2 pl-4 pr-4 flex flex-row justify-between rounded-sm border-gray-200">
1212
<div>
1313
<h3> <Link rel="norefferer" href={`/dataproduct/${accessRequest.dataproductID}/${accessRequest.dataproductSlug}/${accessRequest.datasetID}`}>
1414
{`${accessRequest?.datasetName} - ${accessRequest?.dataproductName}`}

frontend/components/workstation/WorkstationStatus.tsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -119,22 +119,22 @@ const WorkstationStatus = ({ hasRunningJob }: WorkstationStatusProps) => {
119119
<List.Item title={"Logg inn i Google Cloud (kjøres lokalt)"}>
120120
<div className="flex">
121121
<code
122-
className="rounded-sm bg-surface-neutral-subtle font-mono text-sm font-semibold">gcloud
122+
className="rounded-xs bg-surface-neutral-subtle font-mono text-sm font-semibold">gcloud
123123
auth login</code><CopyButton size="xsmall" copyText="gcloud auth login" />
124124
</div>
125125
</List.Item>
126126
<List.Item title={"Opprette SSH-tunnel (kjøres lokalt)"}>
127127
<div className="flex">
128128
<code
129-
className="rounded-sm bg-surface-neutral-subtle px-1 py-05 font-mono text-sm font-semibold">
129+
className="rounded-xs bg-surface-neutral-subtle px-1 py-05 font-mono text-sm font-semibold">
130130
gcloud workstations start-tcp-tunnel --cluster=knada --config={workstation.data.slug} --region=europe-north1 --project knada-gcp --local-host-port=:33649 {workstation.data.slug} 22</code>
131131
<CopyButton size="xsmall" copyText={`gcloud workstations start-tcp-tunnel --cluster=knada --config=${workstation.data.slug} --region=europe-north1 --project knada-gcp --local-host-port=:33649 ${workstation.data.slug} 22`} />
132132
</div>
133133
</List.Item>
134134
<List.Item title={"Opprette SSH-nøkkel (kjøres lokalt, hopp over om du allerede har gjort dette)"}>
135135
<em>Sett et passord på SSH-nøkkelen. Du vil aldri bli bedt om å bytte dette.</em>
136136
<div className="flex">
137-
<code className="rounded-sm bg-surface-neutral-subtle font-mono text-sm font-semibold">{`ssh-keygen -t ed25519 -C "[email protected]"`}</code><CopyButton size="xsmall" copyText={`ssh-keygen -t ed25519 -C "[email protected]"`}></CopyButton>
137+
<code className="rounded-xs bg-surface-neutral-subtle font-mono text-sm font-semibold">{`ssh-keygen -t ed25519 -C "[email protected]"`}</code><CopyButton size="xsmall" copyText={`ssh-keygen -t ed25519 -C "[email protected]"`}></CopyButton>
138138
</div>
139139
</List.Item>
140140
<List.Item title={"Få Knast til å stole på din SSH-nøkkel (kjøres på Knast, hopp over om du allerede har gjort dette)"}>
@@ -148,7 +148,7 @@ const WorkstationStatus = ({ hasRunningJob }: WorkstationStatusProps) => {
148148
<List.Item title={"Legg til knast i ssh-configen (kjøres lokalt, hopp over om du allerede har gjort dette)"}>
149149
<div className="flex">
150150
<code
151-
className="rounded-sm bg-surface-neutral-subtle font-mono text-sm font-semibold">{`echo -e "\\nHost knast\\n\\tHostName localhost\\n\\tPort 33649\\n\\tUser user\\n\\tUserKnownHostsFile /dev/null\\n\\tStrictHostKeyChecking no">>~/.ssh/config`}</code><CopyButton
151+
className="rounded-xs bg-surface-neutral-subtle font-mono text-sm font-semibold">{`echo -e "\\nHost knast\\n\\tHostName localhost\\n\\tPort 33649\\n\\tUser user\\n\\tUserKnownHostsFile /dev/null\\n\\tStrictHostKeyChecking no">>~/.ssh/config`}</code><CopyButton
152152
size="xsmall"
153153
copyText={`echo -e "\\nHost knast\\n\\tHostName localhost\\n\\tPort 33649\\n\\tUser user\\n\\tUserKnownHostsFile /dev/null\\n\\tStrictHostKeyChecking no">>~/.ssh/config`}></CopyButton>
154154
</div>

frontend/components/workstation/formElements/machineTypeSelector.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ const MachineTypeSelector = (props: MachineTypeSelectorProps) => {
3636
}
3737
.machine-selector > .navds-radio-buttons > .navds-radio {
3838
width: 50%;
39-
flex-grow: 1;
39+
grow: 1;
4040
}`}
4141
</style>
4242
</RadioGroup>

0 commit comments

Comments
 (0)