Skip to content
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

feat: improve sidebar design #43

Merged
merged 1 commit into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
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
78 changes: 39 additions & 39 deletions src/components/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,36 +71,37 @@ export const Sidebar: FC = () => {
<div className="fixed left-14 -ml-14 flex h-full w-14 flex-col overflow-y-auto bg-sidebar">
<div className="flex flex-1 flex-col items-center py-4">
<div className="mx-auto my-3">
<Button
<IconButton
label="Home"
title="Home"
appearance="subtle"
isTooltipDisabled={false}
icon={(iconProps) => (
<AtlasIcon {...iconProps} size="medium" appearance="inverse" />
)}
shape="circle"
onClick={() => navigate('/', { replace: true })}
>
<AtlasIcon size="medium" appearance="inverse" />
</Button>
/>
</div>

<Stack alignInline="center" space="space.100">
<Tooltip content={`${notificationsLabel} Unread Notifications`}>
<IconButton
label={`${notificationsLabel} Unread Notifications`}
icon={(iconProps) => (
<Tooltip content={`${notificationsLabel} unread notifications`}>
<Button
iconBefore={(iconProps) => (
<NotificationIcon
{...iconProps}
size="small"
primaryColor="white"
/>
)}
appearance="subtle"
spacing="compact"
onClick={() => openMyNotifications()}
/>

{notificationsCount > 0 && (
<Text color="color.text.inverse" size="small" weight="semibold">
{notificationsCount}
</Text>
)}
>
{notificationsCount > 0 && (
<Text color="color.text.inverse" size="small" weight="semibold">
{notificationsCount}
</Text>
)}
</Button>
</Tooltip>

{isLoggedIn && (
Expand All @@ -122,6 +123,7 @@ export const Sidebar: FC = () => {

<IconButton
label="Group notifications by products"
title="Group notifications by products"
isTooltipDisabled={false}
icon={() => (
<ListIcon
Expand All @@ -137,37 +139,34 @@ export const Sidebar: FC = () => {
);
}}
appearance={
settings.groupNotificationsByProduct ? 'discovery' : 'subtle'
settings.groupNotificationsByProduct ? 'discovery' : 'default'
}
spacing="compact"
shape="circle"
/>

<Tooltip content="Filters">
<IconButton
label="Filters"
icon={(iconProps) => (
<Button
iconBefore={(iconProps) => (
<FilterIcon
{...iconProps}
size="small"
primaryColor="white"
/>
)}
appearance="subtle"
spacing="compact"
shape="circle"
onClick={() => toggleFilters()}
/>

{filterCount > 0 && (
<Text
color="color.text.inverse"
size="small"
weight="semibold"
>
{filterCount}
</Text>
)}
>
{filterCount > 0 && (
<Text
color="color.text.inverse"
size="small"
weight="semibold"
>
{filterCount}
</Text>
)}
</Button>
</Tooltip>
</>
)}
Expand All @@ -178,31 +177,31 @@ export const Sidebar: FC = () => {
{isLoggedIn && (
<Stack alignInline="center" space="space.150">
<IconButton
label="Refresh Notifications"
title="Refresh Notifications"
label="Refresh notifications"
title="Refresh notifications"
isTooltipDisabled={false}
icon={(iconProps) => (
<RefreshIcon
{...iconProps}
size="medium"
primaryColor="white"
/>
)}
appearance="subtle"
shape="circle"
onClick={() => refreshNotifications()}
/>

<IconButton
label="Settings"
title="Settings"
isTooltipDisabled={false}
icon={(iconProps) => (
<SettingsIcon
{...iconProps}
size="medium"
primaryColor="white"
/>
)}
appearance="subtle"
shape="circle"
onClick={() => toggleSettings()}
/>
Expand All @@ -213,14 +212,15 @@ export const Sidebar: FC = () => {
<IconButton
label="Quit Atlasify"
title="Quit Atlasify"
isTooltipDisabled={false}
icon={(iconProps) => (
<CrossCircleIcon
{...iconProps}
size="medium"
primaryColor="white"
/>
)}
appearance="subtle"
shape="circle"
onClick={() => quitApp()}
/>
)}
Expand Down
Loading
Loading