Skip to content

feat: Redesign build logs #4734

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Oct 25, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Fix tests
  • Loading branch information
BrunoQuaresma committed Oct 24, 2022
commit 7e97461beca1c20dbdb032fc6f18d9b7789734ea
1 change: 0 additions & 1 deletion site/src/components/BuildsTable/BuildRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ export const BuildRow: React.FC<BuildRowProps> = ({ build }) => {
return (
<TableRow
hover
key={build.id}
data-testid={`build-${build.id}`}
className={styles.buildRow}
Copy link
Member

Choose a reason for hiding this comment

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

This is such a nice, tabbable table! I would love to be able to hit 'enter' and navigate to the log page without having to touch my mouse.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I was watching TV when I "remembered" that I forgot to add the link 😆 I'm glad you found it as well, really good review 🌮

>
Expand Down
6 changes: 3 additions & 3 deletions site/src/components/BuildsTable/BuildsTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import TableBody from "@material-ui/core/TableBody"
import TableCell from "@material-ui/core/TableCell"
import TableContainer from "@material-ui/core/TableContainer"
import TableRow from "@material-ui/core/TableRow"
import { FC } from "react"
import { FC, Fragment } from "react"
import * as TypesGen from "../../api/typesGenerated"
import { EmptyState } from "../EmptyState/EmptyState"
import { TableLoader } from "../TableLoader/TableLoader"
Expand Down Expand Up @@ -64,12 +64,12 @@ export const BuildsTable: FC<React.PropsWithChildren<BuildsTableProps>> = ({
const builds = buildsByDate[dateStr]

return (
<>
<Fragment key={dateStr}>
<BuildDateRow date={new Date(dateStr)} />
{builds.map((build) => (
<BuildRow key={build.id} build={build} />
))}
</>
</Fragment>
)
})}

Expand Down
3 changes: 2 additions & 1 deletion site/src/pages/WorkspacePage/WorkspacePage.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,8 @@ describe("WorkspacePage", () => {
// Wait for the results to be loaded
await waitFor(async () => {
const rows = table.querySelectorAll("tbody > tr")
expect(rows).toHaveLength(MockBuilds.length)
// Added +1 because of the date row
expect(rows).toHaveLength(MockBuilds.length + 1)
})
})
})
Expand Down