feat: make commit dialog default state clearer (#9542)

This commit is contained in:
Ryan Willis
2026-01-06 13:43:34 -07:00
committed by GitHub
parent e493ab9dcf
commit fc79e24e2a
3 changed files with 25 additions and 18 deletions

View File

@@ -996,18 +996,16 @@ export const GitProjectStagingModal: FC<{
{(!generateCommitsFetcher.data ||
(generateCommitsFetcher.data && 'error' in generateCommitsFetcher.data)) && (
<>
<ManualCommitForm
projectId={projectId}
mode={mode}
changes={changes}
setShowConfirmDiscardAndPullModal={setShowConfirmDiscardAndPullModal}
onCommitSuccess={handleCommitSuccess}
onPullRequired={handlePullRequired}
diffChanges={diffChanges}
setDiscardData={setDiscardData}
/>
</>
<ManualCommitForm
projectId={projectId}
mode={mode}
changes={changes}
setShowConfirmDiscardAndPullModal={setShowConfirmDiscardAndPullModal}
onCommitSuccess={handleCommitSuccess}
onPullRequired={handlePullRequired}
diffChanges={diffChanges}
setDiscardData={setDiscardData}
/>
)}
</div>
{previewDiffItem?.diff ? (
@@ -1026,9 +1024,12 @@ export const GitProjectStagingModal: FC<{
<div className="flex h-full flex-col items-center justify-center gap-4 p-2">
<Heading className="flex items-center justify-center gap-2 text-4xl font-semibold text-(--hl-md)">
<Icon icon="code-compare" />
Diff view
View diff
</Heading>
<p className="text-(--hl)">Select an item to compare</p>
<p className="text-(--hl)">Select a file to compare changes</p>
<p className="text-sm text-(--hl-md)">
Changes may include modifications you made and automatic updates like timestamps
</p>
</div>
)}
</div>

View File

@@ -457,9 +457,12 @@ export const GitStagingModal: FC<{ onClose: () => void }> = ({ onClose }) => {
<div className="flex h-full flex-col items-center justify-center gap-4 p-2">
<Heading className="flex items-center justify-center gap-2 text-4xl font-semibold text-(--hl-md)">
<Icon icon="code-compare" />
Diff view
View diff
</Heading>
<p className="text-(--hl)">Select an item to compare</p>
<p className="text-(--hl)">Select a file to compare changes</p>
<p className="text-sm text-(--hl-md)">
Changes may include modifications you made and automatic updates like timestamps
</p>
</div>
)}
</div>

View File

@@ -398,9 +398,12 @@ export const SyncStagingModal = ({ onClose, status, syncItems }: Props) => {
<div className="flex h-full flex-col items-center justify-center gap-4 p-2">
<Heading className="flex items-center justify-center gap-2 text-4xl font-semibold text-(--hl-md)">
<Icon icon="code-compare" />
Diff view
View diff
</Heading>
<p className="text-(--hl)">Select an item to compare</p>
<p className="text-(--hl)">Select a file to compare changes</p>
<p className="text-sm text-(--hl-md)">
Changes may include modifications you made and automatic updates like timestamps
</p>
</div>
)}
</div>