Skip to content

refactor: rewrite login forms with primer #1775

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 6 commits into from
Jan 24, 2025
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
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,6 @@
"nprogress": "0.2.0",
"postcss": "8.5.1",
"postcss-loader": "8.1.1",
"react-final-form": "6.5.9",
"rimraf": "6.0.1",
"semver": "7.6.3",
"styled-components": "6.1.14",
Expand Down
15 changes: 0 additions & 15 deletions pnpm-lock.yaml

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

27 changes: 0 additions & 27 deletions src/renderer/components/fields/FieldInput.test.tsx

This file was deleted.

57 changes: 0 additions & 57 deletions src/renderer/components/fields/FieldInput.tsx

This file was deleted.

This file was deleted.

9 changes: 3 additions & 6 deletions src/renderer/components/layout/Centered.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,17 @@ import type { FC, ReactNode } from 'react';

interface ICentered {
children: ReactNode;
fullHeight?: boolean;
fullHeight: boolean;
}

export const Centered: FC<ICentered> = ({
fullHeight = true,
...props
}: ICentered) => {
export const Centered: FC<ICentered> = (props: ICentered) => {
return (
<Stack
direction="vertical"
align="center"
justify="center"
padding="spacious"
className={fullHeight && 'h-screen'}
className={props.fullHeight && 'h-screen'}
>
{props.children}
</Stack>
Expand Down
7 changes: 6 additions & 1 deletion src/renderer/components/layout/Contents.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
import { Box } from '@primer/react';
import type { FC, ReactNode } from 'react';

interface IContents {
children: ReactNode;
}

export const Contents: FC<IContents> = (props: IContents) => {
return <div className="grow overflow-x-auto px-8 pb-4">{props.children}</div>;
return (
<Box className="grow overflow-x-auto px-8 pb-2 mb-12 ">
{props.children}
</Box>
);
};
18 changes: 2 additions & 16 deletions src/renderer/components/layout/Page.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,8 @@ import { render } from '@testing-library/react';
import { Page } from './Page';

describe('renderer/components/layout/Page.tsx', () => {
it('should render itself & its children - full', () => {
const tree = render(
<Page id="test" type="h-full">
Test
</Page>,
);

expect(tree).toMatchSnapshot();
});

it('should render itself & its children - screen', () => {
const tree = render(
<Page id="test" type="h-screen">
Test
</Page>,
);
it('should render itself & its children', () => {
const tree = render(<Page id="test">Test</Page>);

expect(tree).toMatchSnapshot();
});
Expand Down
7 changes: 3 additions & 4 deletions src/renderer/components/layout/Page.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
import { Box } from '@primer/react';
import type { FC, ReactNode } from 'react';
import { cn } from '../../utils/cn';

interface IPage {
children: ReactNode;
id: string;
type: 'h-full' | 'h-screen';
}

export const Page: FC<IPage> = (props: IPage) => {
return (
<div className={cn('flex flex-col', props.type)} data-testid={props.id}>
<Box className="flex flex-col h-screen" data-testid={props.id}>
{props.children}
</div>
</Box>
);
};

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

Loading
Loading