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

Fjern siste rest av .less #3264

Merged
merged 4 commits into from
Jul 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 0 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
*.json
*.less
*.yaml
*.yml
*.md
Expand Down
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,6 @@
"husky": "^9.1.0",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"less": "^4.2.0",
"less-loader": "^12.2.0",
"lint-staged": "^15.2.0",
"npm-run-all": "^4.1.5",
"prettier": "^3.3.1",
Expand All @@ -147,7 +145,7 @@
}
},
"moduleNameMapper": {
"\\.(css|less|svg)$": "<rootDir>/src/mockFile.js"
"\\.(css|svg)$": "<rootDir>/src/mockFile.js"
},
"transformIgnorePatterns": [
"/node_modules/(?!(@navikt)/)"
Expand Down
4 changes: 0 additions & 4 deletions src/frontend/index.less

This file was deleted.

2 changes: 0 additions & 2 deletions src/frontend/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import './index.less';

import React from 'react';

import axe from '@axe-core/react';
Expand Down
20 changes: 17 additions & 3 deletions src/frontend/komponenter/Container.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';

import classNames from 'classnames';
import { BrowserRouter as Router, Navigate, Route, Routes } from 'react-router-dom';
import styled from 'styled-components';

import FagsakContainer from './Fagsak/FagsakContainer';
import { HeaderMedSøk } from './Felleskomponenter/HeaderMedSøk/HeaderMedSøk';
Expand All @@ -19,6 +19,20 @@ import { FagsakProvider } from '../context/Fagsak/FagsakContext';
import { Oppgaver } from '../context/OppgaverContext';
import { TidslinjeProvider } from '../context/TidslinjeContext';

const Main = styled.main<{ $systemetLaster: boolean }>`
position: fixed;
width: 100%;
height: 100%;

${props => {
if (props.$systemetLaster)
return `
filter: blur(12px);
-webkit-filter: blur(12px);
`;
}};
`;

const Container: React.FC = () => {
const { autentisert, systemetLaster, innloggetSaksbehandler, appInfoModal } = useApp();

Expand All @@ -30,7 +44,7 @@ const Container: React.FC = () => {
{systemetLaster() && <SystemetLaster />}
<Toasts />

<main className={classNames('container', systemetLaster() && 'blur')}>
<Main $systemetLaster={systemetLaster()}>
<HeaderMedSøk
brukerNavn={innloggetSaksbehandler?.displayName}
brukerEnhet={innloggetSaksbehandler?.enhet}
Expand All @@ -57,7 +71,7 @@ const Container: React.FC = () => {
<Route path="/" element={<Navigate to="/oppgaver" />} />
</Routes>
</FagsakProvider>
</main>
</Main>
</>
) : (
<UgyldigSesjon />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,26 @@
import * as React from 'react';

import { Loader, Heading } from '@navikt/ds-react';
import styled from 'styled-components';

import { Loader, Heading, VStack } from '@navikt/ds-react';
import { AZIndexTooltip } from '@navikt/ds-tokens/dist/tokens';

const PosisjonertVStack = styled(VStack)`
position: fixed;
width: 100vw;
height: 100vh;
display: flex;
align-items: center;
top: 20%;
z-index: ${AZIndexTooltip};
`;

const SystemetLaster = () => {
return (
<div className={'systemet-laster'}>
<div className={'systemet-laster__content'}>
<Heading
size={'medium'}
className={'systemet-laster__content--tekst'}
children={'Systemet laster'}
/>
<Loader size="large" transparent={true} title="Systemet laster data" />
</div>
</div>
<PosisjonertVStack gap="2">
<Heading size={'medium'} children={'Systemet laster'} />
<Loader size="large" transparent={true} title="Systemet laster data" />
</PosisjonertVStack>
);
};

Expand Down

This file was deleted.

27 changes: 0 additions & 27 deletions src/frontend/komponenter/app.less

This file was deleted.

5 changes: 2 additions & 3 deletions src/webpack/webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const publicUrl = '/assets';

const baseConfig = {
resolve: {
extensions: ['.ts', '.tsx', '.js', '.jsx', '.json', '.less'],
extensions: ['.ts', '.tsx', '.js', '.jsx', '.json'],
fallback: { crypto: false },
},
entry: ['./src/frontend/index.tsx'],
Expand Down Expand Up @@ -63,7 +63,7 @@ const baseConfig = {
},
},
{
test: /\.(less|css)$/,
test: /\.(css)$/,
use: [
{ loader: 'style-loader' },
{
Expand All @@ -75,7 +75,6 @@ const baseConfig = {
importLoaders: 2,
},
},
{ loader: 'less-loader' },
],
},
],
Expand Down
Loading