Skip to content
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
16 changes: 16 additions & 0 deletions apps/lite/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,19 @@ Typechecking is the fastest way to validate that everything is okay. Always run
```console
$ pnpm -F @gitbutler/lite check
```

## Components

Memoization utilities such as `useMemo`, `useCallback`, and `React.memo` are redundant as we use React Compiler.

Component definitions should follow this pattern, optionally destructuring `p`:

```tsx
type Props = {
...
};

export const MyComponent: FC<Props> = (p) => {
// [...]
};
```
4 changes: 2 additions & 2 deletions apps/lite/ui/src/ChangeUnit.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
export type ChangeUnit =
| {
_tag: "commit";
_tag: "Commit";
commitId: string;
}
| {
_tag: "changes";
_tag: "Changes";
stackId: string | null;
};
17 changes: 12 additions & 5 deletions apps/lite/ui/src/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,19 @@ body {
input,
textarea,
select {
padding: 0;
border: none;
background: none;
color: inherit;
font: inherit;
line-height: inherit;
}

button {
border: 1px solid;
border-color: black;
padding: 0;
border: none;
background: none;
color: inherit;
font: inherit;
line-height: inherit;
text-align: left;
Expand All @@ -42,7 +48,8 @@ p {
margin-block: 0;
}

textarea,
button {
padding: 2px 4px;
ul,
ol {
padding-left: 0;
list-style: none;
}
3 changes: 2 additions & 1 deletion apps/lite/ui/src/routes/ProjectPanelLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ export const ProjectPanelLayout: FC<{
<div className={sharedStyles.previewPane}>
<button
type="button"
className={sharedStyles.button}
onClick={() => {
setShowPreviewFullscreen(true);
}}
Expand All @@ -87,7 +88,7 @@ export const ProjectPanelLayout: FC<{
<Dialog.Root open={showPreviewFullscreen} onOpenChange={setShowPreviewFullscreen}>
<Dialog.Portal>
<Dialog.Popup aria-label="Preview" className={sharedStyles.previewDialogPopup}>
<Dialog.Close>
<Dialog.Close className={sharedStyles.button}>
Close fullscreen ({shortcutKeys.toggleFullscreenPreview}/esc)
</Dialog.Close>
{preview}
Expand Down
2 changes: 0 additions & 2 deletions apps/lite/ui/src/routes/project-branches.module.css
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
.branchesList {
flex-shrink: 0;
width: 350px;
padding-left: 0;
list-style: none;
}

.branchesListItem {
Expand Down
Loading
Loading