Skip to content
Merged
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
10 changes: 6 additions & 4 deletions site/src/components/WorkspaceStats/WorkspaceStats.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ import { Workspace } from "../../api/typesGenerated"
import { CardRadius, MONOSPACE_FONT_FAMILY } from "../../theme/constants"
import { combineClasses } from "../../util/combineClasses"
import { getDisplayStatus } from "../../util/workspace"
import { WorkspaceSection } from "../WorkspaceSection/WorkspaceSection"

const Language = {
workspaceDetails: "Workspace Details",
templateLabel: "Template",
statusLabel: "Status",
statusLabel: "Workspace Status",
versionLabel: "Version",
lastBuiltLabel: "Last Built",
outdated: "Outdated",
Expand All @@ -27,7 +29,7 @@ export const WorkspaceStats: FC<WorkspaceStatsProps> = ({ workspace }) => {
const status = getDisplayStatus(theme, workspace.latest_build)

return (
<div className={styles.stats}>
<WorkspaceSection title={Language.workspaceDetails} contentsProps={{ className: styles.stats }}>
<div className={styles.statItem}>
<span className={styles.statsLabel}>{Language.templateLabel}</span>
<Link
Expand Down Expand Up @@ -65,7 +67,7 @@ export const WorkspaceStats: FC<WorkspaceStatsProps> = ({ workspace }) => {
</span>
</span>
</div>
</div>
</WorkspaceSection>
)
}

Expand All @@ -79,7 +81,7 @@ const useStyles = makeStyles((theme) => ({
alignItems: "center",
color: theme.palette.text.secondary,
fontFamily: MONOSPACE_FONT_FAMILY,
border: `1px solid ${theme.palette.divider}`,
margin: "0px",

@greyscaled greyscaled Jun 10, 2022 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm pretty sure you can just pass the number 0 like margin: 0. No idea if that's preferred or not, just thought I'd mention it for knowledge-share/curiosity

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, you're right. I always add them because I used to get NITed at an old job when I left them off. A brief google search doesn't reveal any strong opinions. I'm open to any convention!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea I have no strong feelings either, I really don't know what's best hence curiosity.

I never want to unintentionally nit though, so I try to use conventional comments. I should've said

Thought(curiosity)

because code is like a beautiful article that creates interesting discussion, sometimes of which leads to edits, but often just leads to better understandings for future articles.

IDK.

It's friday.

},

statItem: {
Expand Down