File tree Expand file tree Collapse file tree 3 files changed +15
-2
lines changed
apps/desktop/src/components
packages/ui/src/lib/components/chipToast Expand file tree Collapse file tree 3 files changed +15
-2
lines changed Original file line number Diff line number Diff line change 22
22
Modal ,
23
23
TestId ,
24
24
SimpleCommitRow ,
25
- ScrollableContainer
25
+ ScrollableContainer ,
26
+ chipToasts
26
27
} from ' @gitbutler/ui' ;
27
28
import { isDefined } from ' @gitbutler/ui/utils/typeguards' ;
28
29
88
89
.filter (isDefined );
89
90
if (upstreamBranchNames .length === 0 ) return ;
90
91
uiState .project (projectId ).branchesToPoll .add (... upstreamBranchNames );
92
+
93
+ // Show success notification
94
+ const branchText =
95
+ multipleBranches && ! isLastBranchInStack
96
+ ? ` ${branchName } and all branches below it `
97
+ : branchName ;
98
+ chipToasts .success (` Pushed ${branchText } successfully ` );
91
99
} catch (error : any ) {
92
100
if (error ?.code === ' errors.git.force_push_protection' ) {
93
101
forcePushProtectionModal ?.show ();
Original file line number Diff line number Diff line change 317
317
if (definedPrNumbers .length > 0 ) {
318
318
updatePrStackInfo (prService , definedPrNumbers );
319
319
}
320
+
321
+ // Show success notification
322
+ const unit = prService .unit .abbr || ' PR' ;
323
+ chipToasts .success (` ${unit } #${pr .number } created successfully ` );
324
+
325
+ return pr ;
320
326
} catch (err : any ) {
321
327
console .error (err );
322
328
const toast = mapErrorToToast (err );
Original file line number Diff line number Diff line change 80
80
--toast-padding : 8px 12px ;
81
81
display : flex ;
82
82
width : fit-content ;
83
- max-width : 400px ;
84
83
border-radius : var (--radius-m );
85
84
background : var (--clr-scale-ntrl-10 );
86
85
box-shadow : var (--fx-shadow-m );
You can’t perform that action at this time.
0 commit comments