diff --git a/package.json b/package.json
index 4b7372d861..528eed8412 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "spruce",
- "version": "3.0.205",
+ "version": "3.0.207",
"private": true,
"scripts": {
"bootstrap-logkeeper": "./scripts/bootstrap-logkeeper.sh",
@@ -95,7 +95,7 @@
"@leafygreen-ui/text-input": "12.1.24",
"@leafygreen-ui/toast": "6.1.4",
"@leafygreen-ui/toggle": "10.0.17",
- "@leafygreen-ui/tokens": "2.1.0",
+ "@leafygreen-ui/tokens": "2.3.0",
"@leafygreen-ui/tooltip": "10.0.10",
"@leafygreen-ui/typography": "17.0.1",
"@rjsf/core": "4.2.3",
diff --git a/src/constants/tokens.ts b/src/constants/tokens.ts
index 82bf7b5d31..6500ba6f8a 100644
--- a/src/constants/tokens.ts
+++ b/src/constants/tokens.ts
@@ -2,9 +2,9 @@ import { spacing } from "@leafygreen-ui/tokens";
// Should be used for spacing such as margins and padding.
const size = {
- xxs: `${spacing[1]}px`, // 4px
- xs: `${spacing[2]}px`, // 8px
- s: `${spacing[3]}px`, // 16px
+ xxs: `${spacing[100]}px`, // 4px
+ xs: `${spacing[200]}px`, // 8px
+ s: `${spacing[400]}px`, // 16px
m: `${spacing[4]}px`, // 24px
l: `${spacing[5]}px`, // 32px
xl: `${spacing[6]}px`, // 64px
diff --git a/src/pages/task/metadata/ETATimer/ETATimer.test.tsx b/src/pages/task/metadata/ETATimer/ETATimer.test.tsx
index 9ce6b47d17..2b655b9911 100644
--- a/src/pages/task/metadata/ETATimer/ETATimer.test.tsx
+++ b/src/pages/task/metadata/ETATimer/ETATimer.test.tsx
@@ -47,4 +47,8 @@ describe("etaTimer", () => {
expect(global.clearInterval).toHaveBeenCalledWith(expect.any(Number));
expect(jest.getTimerCount()).toBe(0);
});
+ it("if the eta has been exceeded, it does not render", () => {
+ render();
+ expect(screen.queryByTestId("task-metadata-eta")).not.toBeInTheDocument();
+ });
});
diff --git a/src/pages/task/metadata/ETATimer/index.tsx b/src/pages/task/metadata/ETATimer/index.tsx
index 438a4e72d0..c54a33488b 100644
--- a/src/pages/task/metadata/ETATimer/index.tsx
+++ b/src/pages/task/metadata/ETATimer/index.tsx
@@ -12,7 +12,6 @@ interface ETATimerProps {
const ETATimer: React.FC = ({ expectedDuration, startTime }) => {
const parsedStartTime = new Date(startTime);
const { endTimer, runningTime } = useRunningTime(parsedStartTime);
-
useEffect(() => {
if (runningTime >= expectedDuration) {
endTimer();
@@ -20,6 +19,7 @@ const ETATimer: React.FC = ({ expectedDuration, startTime }) => {
}, [runningTime, expectedDuration, endTimer]);
const eta = expectedDuration - runningTime;
+ if (eta < 0) return null;
return (
ETA: {msToDuration(eta)}
diff --git a/src/pages/task/metadata/Metadata.test.tsx b/src/pages/task/metadata/Metadata.test.tsx
index aae7f2f631..287bea0aaf 100644
--- a/src/pages/task/metadata/Metadata.test.tsx
+++ b/src/pages/task/metadata/Metadata.test.tsx
@@ -45,7 +45,6 @@ describe("metadata", () => {
},
);
expect(screen.queryByDataCy("task-metadata-estimated_start")).toBeNull();
- expect(screen.getByDataCy("task-metadata-eta")).toBeInTheDocument();
expect(screen.getByDataCy("task-metadata-started")).toBeInTheDocument();
expect(screen.queryByDataCy("task-metadata-finished")).toBeNull();
expect(screen.queryByDataCy("task-trace-link")).toBeNull();
diff --git a/yarn.lock b/yarn.lock
index 7fca3add4e..405a26f1e1 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -3967,12 +3967,12 @@
"@leafygreen-ui/palette" "^4.0.7"
"@leafygreen-ui/tokens" "^2.1.4"
-"@leafygreen-ui/tokens@2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@leafygreen-ui/tokens/-/tokens-2.1.0.tgz#9677750169876536447b2944c4caaca7c0a4fa4e"
- integrity sha512-sn+vveqrWYq0ubKuo5i1q8DS8IVIyApxyjwR0j4QoxW0w1ina9DOgK5KG1XIptw/i1kGQEMCw/5rOfqQWLv3Kw==
+"@leafygreen-ui/tokens@2.3.0", "@leafygreen-ui/tokens@^2.0.0", "@leafygreen-ui/tokens@^2.0.1", "@leafygreen-ui/tokens@^2.1.0", "@leafygreen-ui/tokens@^2.1.1", "@leafygreen-ui/tokens@^2.1.4", "@leafygreen-ui/tokens@^2.2.0", "@leafygreen-ui/tokens@^2.3.0":
+ version "2.3.0"
+ resolved "https://registry.yarnpkg.com/@leafygreen-ui/tokens/-/tokens-2.3.0.tgz#33ec8416f423849c64174b387c2844cb41c24752"
+ integrity sha512-8oDrQWRvUISitKLufO+9rpvQnJxU56sVUhTjR3O3sY7CkRo1vhHUV7F82oY3Gt6nBXVn82RrBTHzZ6F6LHlBvw==
dependencies:
- "@leafygreen-ui/palette" "^4.0.4"
+ "@leafygreen-ui/palette" "^4.0.7"
"@leafygreen-ui/tokens@^1.4.1":
version "1.4.1"
@@ -3981,13 +3981,6 @@
dependencies:
"@leafygreen-ui/palette" "^3.4.5"
-"@leafygreen-ui/tokens@^2.0.0", "@leafygreen-ui/tokens@^2.0.1", "@leafygreen-ui/tokens@^2.1.0", "@leafygreen-ui/tokens@^2.1.1", "@leafygreen-ui/tokens@^2.1.4", "@leafygreen-ui/tokens@^2.2.0", "@leafygreen-ui/tokens@^2.3.0":
- version "2.3.0"
- resolved "https://registry.yarnpkg.com/@leafygreen-ui/tokens/-/tokens-2.3.0.tgz#33ec8416f423849c64174b387c2844cb41c24752"
- integrity sha512-8oDrQWRvUISitKLufO+9rpvQnJxU56sVUhTjR3O3sY7CkRo1vhHUV7F82oY3Gt6nBXVn82RrBTHzZ6F6LHlBvw==
- dependencies:
- "@leafygreen-ui/palette" "^4.0.7"
-
"@leafygreen-ui/tooltip@10.0.10":
version "10.0.10"
resolved "https://registry.yarnpkg.com/@leafygreen-ui/tooltip/-/tooltip-10.0.10.tgz#bebf502c7b8ef12fdb40a2a9bdcbafa1273b410b"