Skip to content

Commit 4139151

Browse files
committed
Fix fmt
1 parent 9a8bb59 commit 4139151

File tree

6 files changed

+39
-41
lines changed

6 files changed

+39
-41
lines changed

site/src/modules/workspaces/WorkspaceTiming/Chart/Bar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { Interpolation, Theme } from "@emotion/react";
2-
import { type ButtonHTMLAttributes, forwardRef, type HTMLProps } from "react";
2+
import { type ButtonHTMLAttributes, type HTMLProps, forwardRef } from "react";
33
import { CSSVars } from "./constants";
44

55
export type BarColors = {

site/src/modules/workspaces/WorkspaceTiming/Chart/BarBlocks.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { Interpolation, Theme } from "@emotion/react";
2-
import { MoreHorizOutlined } from "@mui/icons-material";
3-
import { useLayoutEffect, useRef, useState, type FC } from "react";
2+
import MoreHorizOutlined from "@mui/icons-material/MoreHorizOutlined";
3+
import { type FC, useLayoutEffect, useRef, useState } from "react";
44

55
const sidePadding = 8;
66
const spaceBetweenBlocks = 4;
@@ -34,12 +34,10 @@ export const BarBlocks: FC<BarBlocksProps> = ({ count }) => {
3434
(freeSize - moreIconSize) / (blockSize + spaceBetweenBlocks),
3535
);
3636
const nOfBlocks = hasSpacing ? count : nOfPossibleBlocks;
37-
console.log("POSSIBLE ->", count, nOfPossibleBlocks);
3837

3938
return (
4039
<div ref={blocksRef} css={styles.blocks}>
41-
{Array.from({ length: nOfBlocks }).map((_, i) => (
42-
// biome-ignore lint/suspicious/noArrayIndexKey: we are using the index as a key here because the blocks are not expected to be reordered
40+
{Array.from(Array(nOfBlocks).keys()).map((i) => (
4341
<div key={i} css={styles.block} style={{ minWidth: blockSize }} />
4442
))}
4543
{!hasSpacing && (

site/src/modules/workspaces/WorkspaceTiming/Chart/XAxis.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1+
import type { Interpolation, Theme } from "@emotion/react";
12
import {
3+
type FC,
4+
type HTMLProps,
25
useLayoutEffect,
36
useRef,
47
useState,
5-
type FC,
6-
type HTMLProps,
78
} from "react";
8-
import type { Interpolation, Theme } from "@emotion/react";
99
import { YAxisCaptionHeight } from "./YAxis";
10-
import { formatTime } from "./utils";
1110
import { CSSVars, XAxisLabelsHeight, XAxisRowsGap } from "./constants";
11+
import { formatTime } from "./utils";
1212

1313
export const XAxisMinWidth = 130;
1414
export const XAxisSidePadding = 16;

site/src/modules/workspaces/WorkspaceTiming/ResourcesChart.tsx

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,41 @@
1+
import { css } from "@emotion/css";
2+
import { type Interpolation, type Theme, useTheme } from "@emotion/react";
3+
import OpenInNewOutlined from "@mui/icons-material/OpenInNewOutlined";
4+
import Tooltip, { type TooltipProps } from "@mui/material/Tooltip";
5+
import { type FC, useState } from "react";
6+
import { Link } from "react-router-dom";
7+
import { Bar } from "./Chart/Bar";
8+
import {
9+
Chart,
10+
ChartBreadcrumbs,
11+
ChartContent,
12+
type ChartLegend,
13+
ChartLegends,
14+
ChartSearch,
15+
ChartToolbar,
16+
} from "./Chart/Chart";
117
import {
218
XAxis,
19+
XAxisMinWidth,
320
XAxisRow,
421
XAxisRows,
522
XAxisSections,
6-
XAxisMinWidth,
723
} from "./Chart/XAxis";
8-
import { useState, type FC } from "react";
924
import {
1025
YAxis,
1126
YAxisCaption,
1227
YAxisLabel,
1328
YAxisLabels,
1429
YAxisSection,
1530
} from "./Chart/YAxis";
16-
import { Bar } from "./Chart/Bar";
1731
import {
32+
type BaseTiming,
1833
calcDuration,
1934
calcOffset,
2035
combineTimings,
2136
formatTime,
2237
makeTicks,
23-
type BaseTiming,
2438
} from "./Chart/utils";
25-
import {
26-
Chart,
27-
ChartBreadcrumbs,
28-
ChartContent,
29-
type ChartLegend,
30-
ChartLegends,
31-
ChartSearch,
32-
ChartToolbar,
33-
} from "./Chart/Chart";
34-
import { type Interpolation, type Theme, useTheme } from "@emotion/react";
35-
import Tooltip, { type TooltipProps } from "@mui/material/Tooltip";
36-
import { css } from "@emotion/css";
37-
import { Link } from "react-router-dom";
38-
import OpenInNewOutlined from "@mui/icons-material/OpenInNewOutlined";
3939

4040
const legendsByAction: Record<string, ChartLegend> = {
4141
"state refresh": {

site/src/modules/workspaces/WorkspaceTiming/StagesChart.tsx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
1+
import { css } from "@emotion/css";
2+
import { type Interpolation, type Theme, useTheme } from "@emotion/react";
3+
import InfoOutlined from "@mui/icons-material/InfoOutlined";
4+
import Tooltip, { type TooltipProps } from "@mui/material/Tooltip";
5+
import type { FC, PropsWithChildren } from "react";
6+
import { Bar, ClickableBar } from "./Chart/Bar";
7+
import { BarBlocks } from "./Chart/BarBlocks";
8+
import { Chart, ChartContent } from "./Chart/Chart";
19
import {
210
XAxis,
11+
XAxisMinWidth,
312
XAxisRow,
413
XAxisRows,
514
XAxisSections,
6-
XAxisMinWidth,
715
} from "./Chart/XAxis";
8-
import type { FC, PropsWithChildren } from "react";
916
import {
1017
YAxis,
1118
YAxisCaption,
1219
YAxisLabel,
1320
YAxisLabels,
1421
YAxisSection,
1522
} from "./Chart/YAxis";
16-
import { Bar, ClickableBar } from "./Chart/Bar";
1723
import {
24+
type BaseTiming,
1825
calcDuration,
1926
calcOffset,
2027
combineTimings,
2128
formatTime,
2229
makeTicks,
23-
type BaseTiming,
2430
} from "./Chart/utils";
25-
import { Chart, ChartContent } from "./Chart/Chart";
26-
import { BarBlocks } from "./Chart/BarBlocks";
27-
import InfoOutlined from "@mui/icons-material/InfoOutlined";
28-
import { useTheme, type Interpolation, type Theme } from "@emotion/react";
29-
import Tooltip, { type TooltipProps } from "@mui/material/Tooltip";
30-
import { css } from "@emotion/css";
3131

3232
// TODO: Add "workspace boot" when scripting timings are done.
3333
const stageCategories = ["provisioning"] as const;

site/src/modules/workspaces/WorkspaceTiming/WorkspaceTimings.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import type { ProvisionerTiming } from "api/typesGenerated";
2-
import { useState, type FC } from "react";
31
import type { Interpolation, Theme } from "@emotion/react";
4-
import { stages, StagesChart } from "./StagesChart";
2+
import type { ProvisionerTiming } from "api/typesGenerated";
3+
import { type FC, useState } from "react";
54
import { type BaseTiming, combineTimings } from "./Chart/utils";
65
import { ResourcesChart } from "./ResourcesChart";
6+
import { StagesChart, stages } from "./StagesChart";
77

88
type TimingView =
99
| { name: "stages" }

0 commit comments

Comments
 (0)