Skip to content

improve: UX Enhancements in workspace summary #473

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

Open
wants to merge 9 commits into
base: notebooks-v2
Choose a base branch
from
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import React, { useCallback, useRef, useState } from 'react';
import {
Button,
Content,
ContentVariants,
PageSection,
Stack,
StackItem,
Breadcrumb,
BreadcrumbItem,
} from '@patternfly/react-core';
import { ArrowLeftIcon } from '@patternfly/react-icons';
import { useTypedLocation, useTypedNavigate, useTypedParams } from '~/app/routerHelper';
import { useTypedLocation, useTypedParams } from '~/app/routerHelper';
import WorkspaceTable, {
WorkspaceTableFilteredColumn,
WorkspaceTableRef,
Expand All @@ -22,7 +22,6 @@ import { useWorkspaceRowActions } from '~/app/hooks/useWorkspaceRowActions';
import { usePolling } from '~/app/hooks/usePolling';

const WorkspaceKindSummary: React.FC = () => {
const navigate = useTypedNavigate();
const [isSummaryExpanded, setIsSummaryExpanded] = useState(true);

const { state } = useTypedLocation<'workspaceKindSummary'>();
Expand Down Expand Up @@ -60,18 +59,15 @@ const WorkspaceKindSummary: React.FC = () => {
}

return (
<PageSection isFilled>
<PageSection>
<Stack hasGutter>
<StackItem>
<Button
variant="link"
icon={<ArrowLeftIcon />}
iconPosition="left"
onClick={() => navigate('workspaceKinds')}
aria-label="Back to Workspace Kinds"
>
Back
</Button>
<Breadcrumb>
<BreadcrumbItem to="workspaceKinds">Workspace Kinds</BreadcrumbItem>
<BreadcrumbItem to="#" isActive>
Workspaces in {kind}
</BreadcrumbItem>
</Breadcrumb>
</StackItem>
<StackItem>
<Content component={ContentVariants.h1}>{kind}</Content>
Expand All @@ -87,7 +83,7 @@ const WorkspaceKindSummary: React.FC = () => {
onAddFilter={onAddFilter}
/>
</StackItem>
<StackItem isFilled>
<StackItem>
<WorkspaceTable
ref={workspaceTableRef}
workspaces={workspaces}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const WorkspaceKindSummaryExpandableCard: React.FC<WorkspaceKindSummaryExpandabl
);

return (
<Card isExpanded={isExpanded}>
<Card isExpanded={isExpanded} variant="secondary">
<CardHeader onExpand={onExpandToggle}>
<CardTitle>
<Content component={ContentVariants.h2}>Workspaces Summary</Content>
Expand All @@ -65,7 +65,9 @@ const WorkspaceKindSummaryExpandableCard: React.FC<WorkspaceKindSummaryExpandabl
<Flex wrap="wrap">
<SectionFlex title="Total GPUs in use">
<FlexItem>
<Content>
<Content
style={{ fontSize: LargeFontSize.value, fontWeight: BoldFontWeight.value }}
Copy link
Member

@jenny-s51 jenny-s51 Jul 9, 2025

Choose a reason for hiding this comment

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

When #476 is merged, we can apply the corresponding utility classes here:

Suggested change
style={{ fontSize: LargeFontSize.value, fontWeight: BoldFontWeight.value }}
className="pf-v6-u-font-size-4xl pf-v6-u-font-weight-bold"

Choose a reason for hiding this comment

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

Thanks @jenny-s51 , #476 is now merged.

>
{countGpusFromWorkspaces(filterRunningWorkspaces(workspaces))} GPUs
</Content>
</FlexItem>
Expand Down