Skip to content

Commit 6488388

Browse files
bertyhellclaude
andcommitted
enhance: distinguish unpushed branch from unpushed commits in create PR dialog
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent f4402d2 commit 6488388

2 files changed

Lines changed: 18 additions & 6 deletions

File tree

‎src/Resources/Locales/en_US.axaml‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -326,13 +326,15 @@
326326
<x:String x:Key="Text.CreateBranch.Title" xml:space="preserve">Create Local Branch</x:String>
327327
<x:String x:Key="Text.CreateBranch.OverwriteExisting" xml:space="preserve">Overwrite existing branch</x:String>
328328
<x:String x:Key="Text.CreatePR" xml:space="preserve">Create Pull Request</x:String>
329+
<x:String x:Key="Text.CreatePR.BranchNotPushed" xml:space="preserve">The source branch has not been pushed yet.</x:String>
329330
<x:String x:Key="Text.CreatePR.ClipboardHint" xml:space="preserve">This platform can not prefill the title and description. They will be copied to the clipboard so you can paste them on the opened page.</x:String>
331+
<x:String x:Key="Text.CreatePR.CommitsNotPushed" xml:space="preserve">The source branch has commits that have not been pushed yet.</x:String>
330332
<x:String x:Key="Text.CreatePR.CopiedToClipboard" xml:space="preserve">Title and description have been copied to the clipboard. Paste them on the opened page.</x:String>
331333
<x:String x:Key="Text.CreatePR.Description" xml:space="preserve">Description:</x:String>
332334
<x:String x:Key="Text.CreatePR.NoTemplate" xml:space="preserve">(None)</x:String>
333-
<x:String x:Key="Text.CreatePR.NotPushed" xml:space="preserve">The source branch has not been pushed, or has local commits that are not pushed yet.</x:String>
334335
<x:String x:Key="Text.CreatePR.Platform" xml:space="preserve">Platform:</x:String>
335-
<x:String x:Key="Text.CreatePR.PushFirst" xml:space="preserve">Push the source branch before opening the page</x:String>
336+
<x:String x:Key="Text.CreatePR.PushBranchFirst" xml:space="preserve">Push the source branch before opening the PR</x:String>
337+
<x:String x:Key="Text.CreatePR.PushCommitsFirst" xml:space="preserve">Push the local commits before opening the PR</x:String>
336338
<x:String x:Key="Text.CreatePR.PushRemote" xml:space="preserve">Push To:</x:String>
337339
<x:String x:Key="Text.CreatePR.Source" xml:space="preserve">Source:</x:String>
338340
<x:String x:Key="Text.CreatePR.Target" xml:space="preserve">Target:</x:String>

‎src/Views/CreatePullRequest.axaml‎

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,9 +142,13 @@
142142
<!-- Push first -->
143143
<CheckBox Grid.Row="7" Grid.Column="1"
144144
Height="32" Margin="0,4,0,0"
145-
Content="{DynamicResource Text.CreatePR.PushFirst}"
146145
IsChecked="{Binding PushFirst, Mode=TwoWay}"
147-
IsVisible="{Binding NeedsPush}"/>
146+
IsVisible="{Binding NeedsPush}">
147+
<Panel>
148+
<TextBlock Text="{DynamicResource Text.CreatePR.PushBranchFirst}" IsVisible="{Binding IsPushRemoteSelectable}"/>
149+
<TextBlock Text="{DynamicResource Text.CreatePR.PushCommitsFirst}" IsVisible="{Binding !IsPushRemoteSelectable}"/>
150+
</Panel>
151+
</CheckBox>
148152

149153
<!-- Hints -->
150154
<StackPanel Grid.Row="8" Grid.Column="1" Orientation="Vertical" Margin="0,4,0,0">
@@ -155,9 +159,15 @@
155159
Data="{StaticResource Icons.Error}"
156160
Fill="DarkOrange"/>
157161
<TextBlock Grid.Column="1" Margin="8,0,0,0"
158-
Text="{DynamicResource Text.CreatePR.NotPushed}"
162+
Text="{DynamicResource Text.CreatePR.BranchNotPushed}"
159163
TextWrapping="Wrap"
160-
Foreground="DarkOrange"/>
164+
Foreground="DarkOrange"
165+
IsVisible="{Binding IsPushRemoteSelectable}"/>
166+
<TextBlock Grid.Column="1" Margin="8,0,0,0"
167+
Text="{DynamicResource Text.CreatePR.CommitsNotPushed}"
168+
TextWrapping="Wrap"
169+
Foreground="DarkOrange"
170+
IsVisible="{Binding !IsPushRemoteSelectable}"/>
161171
</Grid>
162172

163173
<Grid ColumnDefinitions="Auto,*" Margin="0,2" IsVisible="{Binding IsClipboardHintVisible}">

0 commit comments

Comments
 (0)