Skip to content

feat(site): show previous agent scripts logs #12233

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 12 commits into from
Feb 21, 2024
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
Use padding x as const
  • Loading branch information
BrunoQuaresma committed Feb 21, 2024
commit 93b1184ab8a9c24e6351f51539180cd807b4c447
3 changes: 2 additions & 1 deletion site/src/components/Tabs/Tabs.tsx
Copy link
Member

Choose a reason for hiding this comment

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

Big fan of the file changes – looks really clean now.
Once this PR is out, would you be okay with me adding some accessibility code? Mainly want to add some stuff from the APG example for tabs

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

100% I'm not attached to my code at all 😆

Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Link, LinkProps } from "react-router-dom";
import { Interpolation, Theme, useTheme } from "@emotion/react";

export const TAB_PADDING_Y = 12;
export const TAB_PADDING_X = 16;

type TabsContextValue = {
active: string;
Expand Down Expand Up @@ -69,7 +70,7 @@ const styles = {
color: theme.palette.text.secondary,
fontSize: 14,
display: "block",
padding: `${TAB_PADDING_Y}px 16px`,
padding: `${TAB_PADDING_Y}px ${TAB_PADDING_X}px`,
fontWeight: 500,
lineHeight: "1",

Expand Down
4 changes: 2 additions & 2 deletions site/src/pages/WorkspaceBuildPage/WorkspaceBuildPageView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import {
WorkspaceBuildDataSkeleton,
} from "modules/workspaces/WorkspaceBuild/WorkspaceBuildData";
import { Sidebar, SidebarCaption, SidebarItem } from "./Sidebar";
import { TabLink, Tabs, TabsList } from "components/Tabs/Tabs";
import { TAB_PADDING_X, TabLink, Tabs, TabsList } from "components/Tabs/Tabs";
import { useTab } from "hooks";
import { AgentLogs, useAgentLogs } from "modules/resources/AgentLogs";

Expand Down Expand Up @@ -208,7 +208,7 @@ const BuildLogsContent: FC<{ logs?: ProvisionerJobLog[] }> = ({ logs }) => {
<WorkspaceBuildLogs
css={{
border: 0,
"--log-line-side-padding": "16px",
"--log-line-side-padding": `${TAB_PADDING_X}px`,
// Add extra spacing to the first log header to prevent it from being
// too close to the tabs
"& .logs-header:first-of-type": {
Expand Down