fix: constrain oversized loading spinners (#1326)
Prevents loading icons from rendering too large Adds explicit sizing to file and diff loading states
This commit is contained in:
@@ -941,7 +941,7 @@ export const SidebarFilesTree: React.FC = () => {
|
|||||||
onClick={() => void handleDialogSubmit()}
|
onClick={() => void handleDialogSubmit()}
|
||||||
disabled={isDialogSubmitting || (activeDialog !== 'delete' && !dialogInputValue.trim())}
|
disabled={isDialogSubmitting || (activeDialog !== 'delete' && !dialogInputValue.trim())}
|
||||||
>
|
>
|
||||||
{isDialogSubmitting ? <Icon name="loader-4" className="animate-spin" /> : (
|
{isDialogSubmitting ? <Icon name="loader-4" className="size-4 animate-spin" /> : (
|
||||||
activeDialog === 'delete' ? t('sidebarFilesTree.dialog.delete.confirm') : t('sidebarFilesTree.dialog.confirm')
|
activeDialog === 'delete' ? t('sidebarFilesTree.dialog.delete.confirm') : t('sidebarFilesTree.dialog.confirm')
|
||||||
)}
|
)}
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
@@ -895,7 +895,7 @@ const MultiFileDiffEntry = React.memo<MultiFileDiffEntryProps>(({
|
|||||||
) : null}
|
) : null}
|
||||||
{isLoading && !diffData && !diffLoadError ? (
|
{isLoading && !diffData && !diffLoadError ? (
|
||||||
<div className="flex items-center justify-center gap-2 px-4 py-8 text-sm text-muted-foreground">
|
<div className="flex items-center justify-center gap-2 px-4 py-8 text-sm text-muted-foreground">
|
||||||
<Icon name="loader-4" className="animate-spin" />
|
<Icon name="loader-4" className="size-4 animate-spin" />
|
||||||
Loading diff…
|
Loading diff…
|
||||||
</div>
|
</div>
|
||||||
) : null}
|
) : null}
|
||||||
@@ -1629,7 +1629,7 @@ export const DiffView: React.FC<DiffViewProps> = ({
|
|||||||
if (isLoadingStatus && !status) {
|
if (isLoadingStatus && !status) {
|
||||||
return (
|
return (
|
||||||
<div className="flex flex-1 items-center justify-center gap-2 text-sm text-muted-foreground">
|
<div className="flex flex-1 items-center justify-center gap-2 text-sm text-muted-foreground">
|
||||||
<Icon name="loader-4" className="animate-spin" />
|
<Icon name="loader-4" className="size-4 animate-spin" />
|
||||||
{t('diffView.state.loadingRepositoryStatus')}
|
{t('diffView.state.loadingRepositoryStatus')}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
@@ -1681,7 +1681,7 @@ export const DiffView: React.FC<DiffViewProps> = ({
|
|||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
<>
|
<>
|
||||||
<Icon name="loader-4" className="animate-spin" />
|
<Icon name="loader-4" className="size-4 animate-spin" />
|
||||||
{t('diffView.state.loadingDiff')}
|
{t('diffView.state.loadingDiff')}
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -542,7 +542,7 @@ const Dialogs: React.FC<DialogsProps> = ({
|
|||||||
onClick={() => void onDialogSubmit()}
|
onClick={() => void onDialogSubmit()}
|
||||||
disabled={isDialogSubmitting || (activeDialog !== 'delete' && !dialogInputValue.trim())}
|
disabled={isDialogSubmitting || (activeDialog !== 'delete' && !dialogInputValue.trim())}
|
||||||
>
|
>
|
||||||
{isDialogSubmitting ? <Icon name="loader-4" className="animate-spin" /> : (
|
{isDialogSubmitting ? <Icon name="loader-4" className="size-4 animate-spin" /> : (
|
||||||
activeDialog === 'delete' ? t('filesView.dialog.delete.confirm') : t('filesView.dialog.confirm')
|
activeDialog === 'delete' ? t('filesView.dialog.delete.confirm') : t('filesView.dialog.confirm')
|
||||||
)}
|
)}
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
Reference in New Issue
Block a user