Skip to content

Commit 19ae3df

Browse files
committed
feat: update sidebar icons and labels for improved clarity; adjust report schema icons
1 parent 29ed4eb commit 19ae3df

5 files changed

Lines changed: 29 additions & 25 deletions

File tree

src/App.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { useMemo } from 'react';
22
import { IconButton, PageLayout } from '@primer/react';
3-
import { SidebarExpandIcon } from '@primer/octicons-react';
3+
import { SidebarCollapseIcon } from '@primer/octicons-react';
44
import { ReportProvider } from './context/ReportContext';
55
import { useReport } from './context/useReport';
66
import { ReportPageLayout } from './components/ReportPageLayout';
@@ -107,7 +107,7 @@ function AppContent() {
107107
<div style={{ position: 'absolute', top: 16, left: 16, zIndex: 1 }}>
108108
<IconButton
109109
aria-label="Expand sidebar"
110-
icon={SidebarExpandIcon}
110+
icon={SidebarCollapseIcon}
111111
variant="invisible"
112112
size="small"
113113
onClick={() => setSidebarCollapsed(false)}

src/components/InsightsSidebar.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import {
1414
MoonIcon,
1515
PackageIcon,
1616
QuestionIcon,
17-
SidebarCollapseIcon,
17+
SidebarExpandIcon,
1818
SparkleIcon,
1919
SunIcon,
2020
ZapIcon,
@@ -67,17 +67,17 @@ export function InsightsSidebar({
6767
<div className={styles.sidebarContent}>
6868
<div className={styles.sidebarHeader}>
6969
<Heading as="h2" className={styles.sidebarHeading}>
70-
Insights
70+
Reports
7171
</Heading>
7272
<IconButton
7373
aria-label="Collapse sidebar"
74-
icon={SidebarCollapseIcon}
74+
icon={SidebarExpandIcon}
7575
variant="invisible"
7676
size="small"
7777
onClick={onCollapse}
7878
/>
7979
</div>
80-
<NavList aria-label="Insights navigation">
80+
<NavList aria-label="Reports navigation">
8181
{NAV_PAGES.map(({ id, label, icon: Icon }) => {
8282
const isUsagePage = id === PAGE_TYPES.USAGE;
8383
const showSubNav = isUsagePage && availableProducts.length > 1;

src/components/ReportPageLayout.tsx

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,22 @@ import { PageHeader } from '@primer/react/experimental';
2222
import type { IconProps } from '@primer/octicons-react';
2323
import {
2424
AiModelIcon,
25+
AppsIcon,
2526
ColumnsIcon,
2627
CopilotIcon,
28+
CpuIcon,
29+
CreditCardIcon,
30+
DeviceDesktopIcon,
2731
DownloadIcon,
2832
FileIcon,
2933
GraphIcon,
34+
IdBadgeIcon,
3035
OrganizationIcon,
31-
PackageIcon,
3236
PersonIcon,
3337
RepoIcon,
34-
ServerIcon,
38+
ShieldIcon,
3539
TableIcon,
40+
TagIcon,
3641
UploadIcon,
3742
WorkflowIcon,
3843
} from '@primer/octicons-react';
@@ -98,23 +103,23 @@ const FIELD_ICONS: Record<string, FunctionComponent<PropsWithChildren<IconProps>
98103
username: PersonIcon,
99104
model: AiModelIcon,
100105
organization: OrganizationIcon,
101-
sku: ServerIcon,
102-
costCenterName: TableIcon,
103-
product: PackageIcon,
106+
sku: TagIcon,
107+
costCenterName: CreditCardIcon,
108+
product: AppsIcon,
104109
repository: RepoIcon,
105110
workflowPath: WorkflowIcon,
106111
login: PersonIcon,
107112
userLogin: PersonIcon,
108-
licenseType: PackageIcon,
109-
enterpriseRoles: OrganizationIcon,
110-
role: PersonIcon,
111-
lastSurfaceUsed: ServerIcon,
113+
licenseType: IdBadgeIcon,
114+
enterpriseRoles: ShieldIcon,
115+
role: ShieldIcon,
116+
lastSurfaceUsed: DeviceDesktopIcon,
112117
};
113118

114119
const REPORT_TYPE_ICONS: Record<string, React.ComponentType<{ className?: string }>> = {
115120
premium_request: CopilotIcon,
116-
token_usage: ServerIcon,
117-
usage_report: WorkflowIcon,
121+
token_usage: CpuIcon,
122+
usage_report: GraphIcon,
118123
};
119124

120125
function downloadReportAsCsv(report: NonNullable<ReturnType<typeof useReport>['activeReport']>) {

src/components/ReportTable.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import {
1414
} from '@tanstack/react-table';
1515
import { Avatar, Button, SelectPanel } from '@primer/react';
1616
import { Table as PrimerTable } from '@primer/react/experimental';
17-
import { ColumnsIcon, CreditCardIcon, PackageIcon, RepoIcon, WorkflowIcon } from '@primer/octicons-react';
17+
import { AppsIcon, ColumnsIcon, CreditCardIcon, RepoIcon, TagIcon, WorkflowIcon } from '@primer/octicons-react';
1818
import { OnboardingBubble, ONBOARDING_STEPS } from './onboarding';
1919
import { type ActionListItemInput } from '@primer/react/deprecated';
2020
import { useReport } from '../context/useReport';
@@ -28,8 +28,8 @@ import styles from './ReportTable.module.css';
2828

2929
/** Icon to show next to non-avatar, non-model group values */
3030
const COLUMN_ICONS: Record<string, React.ComponentType<{ size?: number; className?: string }>> = {
31-
sku: PackageIcon,
32-
product: PackageIcon,
31+
sku: TagIcon,
32+
product: AppsIcon,
3333
costCenterName: CreditCardIcon,
3434
repository: RepoIcon,
3535
workflowPath: WorkflowIcon,

src/lib/report-schema.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@ import type { ReportType } from './types';
33
import { REPORT_TYPES } from './types';
44
import {
55
CopilotIcon,
6+
CpuIcon,
67
GraphIcon,
7-
ServerIcon,
8-
WorkflowIcon,
98
ShieldLockIcon,
109
PeopleIcon,
1110
PersonIcon,
@@ -134,7 +133,7 @@ const TOKEN_USAGE_SCHEMA: ReportSchema = {
134133
type: REPORT_TYPES.TOKEN_USAGE,
135134
label: 'Token Usage',
136135
pluralLabel: 'Token Usage Reports',
137-
icon: ServerIcon,
136+
icon: CpuIcon,
138137
description: 'Token-Based Billing Report Explorer',
139138
emptyStateTitle: 'Copilot Usage Viewer',
140139
emptyStateText: 'Upload a GitHub billing CSV to visualize Copilot spend, premium requests, and token usage.',
@@ -151,7 +150,7 @@ const USAGE_REPORT_SCHEMA: ReportSchema = {
151150
type: REPORT_TYPES.USAGE_REPORT,
152151
label: 'Usage Report',
153152
pluralLabel: 'Metered Usage Reports',
154-
icon: WorkflowIcon,
153+
icon: GraphIcon,
155154
description: 'GitHub Actions, Packages, LFS & Copilot Seats',
156155
emptyStateTitle: 'Metered Usage Viewer',
157156
emptyStateText: 'Upload a GitHub metered usage CSV to visualize Actions minutes, storage, and product spend.',
@@ -377,8 +376,8 @@ export interface NavPageConfig {
377376
}
378377

379378
export const NAV_PAGES: NavPageConfig[] = [
380-
{ id: PAGE_TYPES.COPILOT, label: 'Copilot usage', icon: CopilotIcon },
381379
{ id: PAGE_TYPES.USAGE, label: 'Metered usage', icon: GraphIcon },
380+
{ id: PAGE_TYPES.COPILOT, label: 'Copilot usage', icon: CopilotIcon },
382381
{ id: PAGE_TYPES.GHAS, label: 'GHAS committers', icon: ShieldLockIcon },
383382
{ id: PAGE_TYPES.SEAT_ACTIVITY, label: 'Seat activity', icon: PersonIcon },
384383
{ id: PAGE_TYPES.MEMBERS, label: 'Dormant users', icon: PeopleIcon },

0 commit comments

Comments
 (0)