Skip to content

Commit

Permalink
show more detailed info next to progress bars
Browse files Browse the repository at this point in the history
Summary:
Before this diff, operations that show progress bars would only show the progress bar without telling exactly how many things (and which things) were in progress.

This diff changes that so that updates that provide these numbers (mainly Sapling operations at the moment) will also show up.

Reviewed By: evangrayk

Differential Revision: D66708037

fbshipit-source-id: dac17b0643d5f36533aa5f5063283ac83524bd4a
  • Loading branch information
sggutier authored and facebook-github-bot committed Dec 4, 2024
1 parent f28e41b commit 8b604a2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions addons/isl-server/src/Repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -692,6 +692,7 @@ export class Repository {
message: msg.topic,
progress: msg.position,
progressTotal: msg.total,
unit: msg.unit,
});
}
} catch (err) {
Expand Down
5 changes: 3 additions & 2 deletions addons/isl/src/CommandHistoryAndProgress.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -272,11 +272,12 @@ export function CommandHistoryAndProgress() {
{showLastLineOfOutput ? (
<div className="progress-container-row">
<div className="progress-container-last-output">
{progress.currentProgress != null ? (
{progress.currentProgress != null && progress.currentProgress.unit != null ? (
<ProgressLine
progress={progress.currentProgress.progress}
progressTotal={progress.currentProgress.progressTotal}>
{progress.currentProgress.message}
{progress.currentProgress.message +
` - ${progress.currentProgress.progress}/${progress.currentProgress.progressTotal} ${progress.currentProgress.unit}`}
</ProgressLine>
) : (
processedLines.length > 0 && <ProgressLine>{processedLines.at(-1)}</ProgressLine>
Expand Down
1 change: 1 addition & 0 deletions addons/isl/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -589,6 +589,7 @@ export type ProgressStep = {
message: string;
progress?: number;
progressTotal?: number;
unit?: string;
};

export type OperationCommandProgressReporter = (
Expand Down

0 comments on commit 8b604a2

Please sign in to comment.