Skip to content

Commit aa36c8f

Browse files
authored
knip cleanup: remove project/simulation stuff (#606)
1 parent 82c4cec commit aa36c8f

7 files changed

Lines changed: 0 additions & 198 deletions

File tree

frontend/src/components/ProjectSelector.tsx

Lines changed: 0 additions & 21 deletions
This file was deleted.

frontend/src/components/SimulationNameInput.tsx

Lines changed: 0 additions & 24 deletions
This file was deleted.

frontend/src/components/StyledLayout.ts

Lines changed: 0 additions & 117 deletions
Original file line numberDiff line numberDiff line change
@@ -5,70 +5,9 @@
55
*/
66
import styled from "styled-components";
77
import { tokens } from "@equinor/eds-tokens";
8-
import { Typography } from "@equinor/eds-core-react";
98

109
const defaultGap = tokens.spacings.comfortable.medium;
1110

12-
export const headerHeight = "64px";
13-
14-
export type GridProps = {
15-
$columns?: string;
16-
$rows?: string;
17-
$gap?: string;
18-
$template?: string;
19-
$justifyItems?: "start" | "end" | "center" | "stretch";
20-
$alignItems?: "start" | "end" | "center" | "stretch";
21-
$justifyContent?: "start" | "end" | "center" | "stretch" | "space-around" | "space-between" | "space-evenly";
22-
$alignContent?: "start" | "end" | "center" | "stretch" | "space-around" | "space-between" | "space-evenly";
23-
};
24-
25-
export const Grid = styled.section<GridProps>`
26-
display: grid;
27-
grid-template-columns: ${(props) => props.$columns};
28-
grid-template-rows: ${(props) => props.$rows};
29-
gap: ${(props) => props.$gap};
30-
grid-template: ${(props) => props.$template};
31-
justify-items: ${(props) => props.$justifyItems};
32-
align-items: ${(props) => props.$alignItems};
33-
justify-content: ${(props) => props.$justifyContent};
34-
align-content: ${(props) => props.$alignContent};
35-
`;
36-
37-
export type GridItemProps = {
38-
$display?: string;
39-
$column?: string;
40-
$row?: string;
41-
$area?: string;
42-
$justifySelf?: "start" | "end" | "center" | "stretch";
43-
$alignSelf?: "start" | "end" | "center" | "stretch";
44-
};
45-
export const GridItem = styled.section<GridItemProps>`
46-
display: ${(props) => props.$display};
47-
grid-column: ${(props) => props.$column};
48-
grid-row: ${(props) => props.$row};
49-
grid-area: ${(props) => props.$area};
50-
justify-self: ${(props) => props.$justifySelf};
51-
align-self: ${(props) => props.$alignSelf};
52-
`;
53-
54-
export const ColumnLayout = styled.section<{
55-
$gap?: string;
56-
$justifyContent?: string;
57-
$alignItems?: string;
58-
$background?: string;
59-
$padding?: string;
60-
$border?: string;
61-
}>`
62-
display: flex;
63-
flex-direction: column;
64-
gap: ${(props) => (props.$gap ? props.$gap : defaultGap)};
65-
justify-content: ${(props) => props.$justifyContent};
66-
align-items: ${(props) => props.$alignItems};
67-
background: ${(props) => props.$background || "transparent"};
68-
padding: ${(props) => props.$padding || ""};
69-
border: ${(props) => props.$border || ""};
70-
`;
71-
7211
export const RowLayout = styled.section<{
7312
$gap?: string;
7413
$alignItems?: string;
@@ -86,59 +25,3 @@ export const RowLayout = styled.section<{
8625
background-color: ${(props) => props.$backgroundColor};
8726
justify-content: ${(props) => props.$justifyContent};
8827
`;
89-
90-
export const LayoutItem = styled.section<{
91-
$gap?: string;
92-
$alignItem?: string;
93-
$padding?: string;
94-
$flex?: string;
95-
$direction?: string;
96-
}>`
97-
display: flex;
98-
flex: ${(props) => props.$flex};
99-
flex-direction: ${(props) => props.$direction ?? "row"};
100-
gap: ${(props) => (props.$gap ? props.$gap : defaultGap)};
101-
align-items: ${(props) => (props.$alignItem ? props.$alignItem : "flex-end")};
102-
padding: ${(props) => props.$padding};
103-
`;
104-
105-
export const RowItem = styled.div<{ $flex?: string }>`
106-
flex: ${(props) => props.$flex};
107-
`;
108-
109-
export const StickyColumn = styled(ColumnLayout)<{
110-
bottom?: string;
111-
top?: string;
112-
padding?: string;
113-
}>`
114-
position: sticky;
115-
top: ${(props) => props.top};
116-
bottom: ${(props) => props.bottom};
117-
z-index: 3;
118-
padding: ${(props) => props.padding};
119-
`;
120-
121-
export const StickyColumnBottom = styled(StickyColumn)<{
122-
backgroundColor?: string;
123-
}>`
124-
margin-top: auto;
125-
bottom: 0;
126-
padding: 20px 10px;
127-
box-shadow: 0px -2px 8px rgba(10, 62, 62, 0.13);
128-
backdrop-filter: blur(10px);
129-
background-color: ${(props) => (props.backgroundColor ? props.backgroundColor : "rgba(168, 200, 200, 0.2)")};
130-
`;
131-
132-
export const CenterDiv = styled.div`
133-
display: flex;
134-
flex: 1;
135-
justify-content: center;
136-
align-items: center;
137-
`;
138-
139-
export const EllipsisTypography = styled(Typography)`
140-
white-space: nowrap;
141-
text-overflow: ellipsis;
142-
overflow: hidden;
143-
width: -webkit-fill-available;
144-
`;

frontend/src/contexts/SimulationsContext.ts

Whitespace-only changes.

frontend/src/dto/Project.tsx

Lines changed: 0 additions & 14 deletions
This file was deleted.

frontend/src/dto/Simulation.tsx

Lines changed: 0 additions & 15 deletions
This file was deleted.

frontend/src/functions/Formatting.tsx

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,6 @@ export const extractPlotData = (simulationResults: SimulationResults) => {
4545
];
4646
};
4747

48-
export const ISODate_to_UIDate = (date: Date) => {
49-
const day = date.getDate();
50-
const month = date.toLocaleString("default", { month: "short" });
51-
const year = date.getFullYear();
52-
return `${day}. ${month} ${year}`;
53-
};
54-
5548
export const convertSimulationToChartData = (simulation: SimulationResults, experimentName: string): ChartDataSet => {
5649
return {
5750
label: `${simulation.modelInput.modelId} - ${experimentName}`,

0 commit comments

Comments
 (0)