Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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
9 changes: 4 additions & 5 deletions src/renderer/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import {
useLocation,
} from 'react-router-dom';

import { BaseStyles, Box, ThemeProvider } from '@primer/react';
import { BaseStyles, ThemeProvider } from '@primer/react';

import { Sidebar } from './components/Sidebar';
import { AppLayout } from './components/layout/AppLayout';
import { AppContext, AppProvider } from './context/App';
import { AccountsRoute } from './routes/Accounts';
import { FiltersRoute } from './routes/Filters';
Expand Down Expand Up @@ -38,8 +38,7 @@ export const App = () => {
<BaseStyles>
<AppProvider>
<Router>
<Box className="flex flex-col min-h-screen overflow-x-hidden overflow-y-auto pl-sidebar bg-gitify-background">
<Sidebar />
<AppLayout>
<Routes>
<Route
path="/"
Expand Down Expand Up @@ -83,7 +82,7 @@ export const App = () => {
element={<LoginWithOAuthAppRoute />}
/>
</Routes>
</Box>
</AppLayout>
</Router>
</AppProvider>
</BaseStyles>
Expand Down
17 changes: 9 additions & 8 deletions src/renderer/components/fields/Checkbox.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Stack } from '@primer/react';
import type { FC, ReactNode } from 'react';

import { CounterLabel, Stack } from '@primer/react';

import { cn } from '../../utils/cn';
import { CustomCounter } from '../primitives/CustomCounter';
import { Tooltip } from './Tooltip';

export interface ICheckbox {
Expand All @@ -20,7 +20,7 @@ export const Checkbox: FC<ICheckbox> = ({
visible = true,
...props
}: ICheckbox) => {
const counter = props.counter > 0 ? props.counter : undefined;
const counter = props?.counter === 0 ? '0' : props.counter;
Copy link
Member Author

Choose a reason for hiding this comment

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

When 0 is left as a number, it will not be rendered within the counter label correctly

Copy link
Collaborator

Choose a reason for hiding this comment

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

Sounds painful to figure out.

Worth leaving this as a code comment?


return (
visible && (
Expand Down Expand Up @@ -54,11 +54,12 @@ export const Checkbox: FC<ICheckbox> = ({
<Tooltip name={`tooltip-${props.name}`} tooltip={props.tooltip} />
)}

{counter ? (
<CounterLabel scheme={props.checked ? 'primary' : 'secondary'}>
{counter}
</CounterLabel>
) : null}
{counter && (
<CustomCounter
scheme={props.checked ? 'primary' : 'secondary'}
value={counter}
/>
)}
</Stack>
)
);
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion src/renderer/components/filters/ReasonFilter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ export const ReasonFilter: FC = () => {
const { updateFilter, settings, notifications } = useContext(AppContext);

return (
<fieldset id="filter-reasons" className="mb-3">
<fieldset id="filter-reasons">
<Title icon={NoteIcon}>Reason</Title>

<Stack direction="vertical" gap="condensed">
{Object.keys(FORMATTED_REASONS).map((reason: Reason) => {
const reasonDetails = getReasonDetails(reason);
Expand Down
4 changes: 2 additions & 2 deletions src/renderer/components/filters/StateFilter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ export const StateFilter: FC = () => {
const { updateFilter, settings, notifications } = useContext(AppContext);

return (
<fieldset id="filter-state" className="mb-3">
<Stack direction="horizontal" gap="condensed" align="baseline">
<fieldset id="filter-state">
<Stack direction="horizontal" gap="condensed">
<Title icon={IssueOpenedIcon}>State</Title>
<Tooltip
name="tooltip-filter-state"
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/components/filters/SubjectTypeFilter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const SubjectTypeFilter: FC = () => {
const { updateFilter, settings, notifications } = useContext(AppContext);

return (
<fieldset id="filter-subject-type" className="mb-3">
<fieldset id="filter-subject-type">
<Stack direction="horizontal" gap="condensed" align="baseline">
<Title icon={BellIcon}>Type</Title>
<Tooltip
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/components/filters/UserHandleFilter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export const UserHandleFilter: FC = () => {
};

return (
<fieldset id="filter-user-handles" className="mb-3">
<fieldset id="filter-user-handles">
<Stack direction="horizontal" gap="condensed" align="baseline">
<Title icon={MentionIcon}>Handles</Title>
<Tooltip
Expand Down
4 changes: 2 additions & 2 deletions src/renderer/components/filters/UserTypeFilter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ export const UserTypeFilter: FC = () => {
const { updateFilter, settings, notifications } = useContext(AppContext);

return (
<fieldset id="filter-user-types" className="mb-3">
<Stack direction="horizontal" gap="condensed" align="baseline">
<fieldset id="filter-user-types">
<Stack direction="horizontal" gap="condensed">
<Title icon={FeedPersonIcon}>User Type</Title>
<Tooltip
name="tooltip-filter-user-type"
Expand Down
Loading