Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a5a511e

Browse files
committed
Stack progress text on tasks
1 parent 1a59d0b commit a5a511e

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

site/src/pages/TaskPage/TaskPage.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ const TaskPage = () => {
124124
<WorkspaceBuildProgress
125125
workspace={task.workspace}
126126
transitionStats={transition}
127+
stack={true}
127128
/>
128129
</div>
129130
</div>

site/src/pages/WorkspacePage/WorkspaceBuildProgress.tsx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,14 @@ const estimateFinish = (
6262
interface WorkspaceBuildProgressProps {
6363
workspace: Workspace;
6464
transitionStats: TransitionStats;
65+
// stack indicates to stack the text vertically, otherwise put it on one line.
66+
stack?: boolean;
6567
}
6668

6769
export const WorkspaceBuildProgress: FC<WorkspaceBuildProgressProps> = ({
6870
workspace,
6971
transitionStats,
72+
stack,
7073
}) => {
7174
const job = workspace.latest_build.job;
7275
const [progressValue, setProgressValue] = useState<number | undefined>(0);
@@ -131,7 +134,7 @@ export const WorkspaceBuildProgress: FC<WorkspaceBuildProgressProps> = ({
131134
// is not indicative of true progress.
132135
classes={{ bar: classNames.bar }}
133136
/>
134-
<div css={styles.barHelpers}>
137+
<div className={stack ? "leading-tight mt-1" : "flex mt-1 justify-between"}>
135138
<div css={styles.label}>
136139
{capitalize(workspace.latest_build.status)} workspace...
137140
</div>
@@ -154,11 +157,6 @@ const styles = {
154157
paddingLeft: 2,
155158
paddingRight: 2,
156159
},
157-
barHelpers: {
158-
display: "flex",
159-
justifyContent: "space-between",
160-
marginTop: 4,
161-
},
162160
label: (theme) => ({
163161
fontSize: 12,
164162
display: "block",

0 commit comments

Comments
 (0)