Skip to content

Commit b49bd37

Browse files
committed
Improve wording of "Set as default branch"
1 parent 4bf2555 commit b49bd37

4 files changed

Lines changed: 17 additions & 17 deletions

File tree

app/src/ui/branches/branch-list-item-context-menu.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ interface IBranchContextMenuConfig {
1212
onRenameBranch?: (branchName: string) => void
1313
onViewBranchOnGitHub?: () => void
1414
onViewPullRequestOnGitHub?: () => void
15-
onMakeDefaultBranch?: (branchName: string) => void
15+
onSetAsDefaultBranch?: (branchName: string) => void
1616
onDeleteBranch?: (branchName: string) => void
1717
}
1818

@@ -28,7 +28,7 @@ export function generateBranchContextMenuItems(
2828
onRenameBranch,
2929
onViewBranchOnGitHub,
3030
onViewPullRequestOnGitHub,
31-
onMakeDefaultBranch,
31+
onSetAsDefaultBranch,
3232
onDeleteBranch,
3333
} = config
3434
const items = new Array<IMenuItem>()
@@ -60,10 +60,10 @@ export function generateBranchContextMenuItems(
6060
})
6161
}
6262

63-
if (onMakeDefaultBranch !== undefined) {
63+
if (onSetAsDefaultBranch !== undefined) {
6464
items.push({
65-
label: __DARWIN__ ? 'Make The Default Branch' : 'Make the default branch',
66-
action: () => onMakeDefaultBranch(nameWithoutRemote),
65+
label: __DARWIN__ ? 'Set as Default Branch' : 'Set as default branch',
66+
action: () => onSetAsDefaultBranch(nameWithoutRemote),
6767
})
6868
}
6969

app/src/ui/branches/branch-list.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,8 @@ interface IBranchListProps {
138138
/** Optional: Callback for if rename context menu should exist */
139139
readonly onRenameBranch?: (branchName: string) => void
140140

141-
/** Optional: Callback for if make default branch context menu should exist */
142-
readonly onMakeDefaultBranch?: (branchName: string) => void
141+
/** Optional: Callback for if set as default branch context menu should exist */
142+
readonly onSetAsDefaultBranch?: (branchName: string) => void
143143

144144
/** Optional: Callback for if delete context menu should exist */
145145
readonly onDeleteBranch?: (branchName: string) => void
@@ -296,12 +296,12 @@ export class BranchList extends React.Component<
296296
) => {
297297
event.preventDefault()
298298

299-
const { onRenameBranch, onDeleteBranch, onMakeDefaultBranch } = this.props
299+
const { onRenameBranch, onDeleteBranch, onSetAsDefaultBranch } = this.props
300300

301301
if (
302302
onRenameBranch === undefined &&
303303
onDeleteBranch === undefined &&
304-
onMakeDefaultBranch === undefined
304+
onSetAsDefaultBranch === undefined
305305
) {
306306
return
307307
}
@@ -317,10 +317,10 @@ export class BranchList extends React.Component<
317317
repoType: this.props.repository.gitHubRepository?.type,
318318
isInUseByOtherWorktree,
319319
onRenameBranch,
320-
onMakeDefaultBranch:
320+
onSetAsDefaultBranch:
321321
nameWithoutRemote === this.props.defaultBranch?.name
322322
? undefined
323-
: onMakeDefaultBranch,
323+
: onSetAsDefaultBranch,
324324
onDeleteBranch,
325325
})
326326

app/src/ui/branches/branches-container.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ interface IBranchesContainerProps {
5050
readonly recentBranches: ReadonlyArray<Branch>
5151
readonly pullRequests: ReadonlyArray<PullRequest>
5252
readonly onRenameBranch: (branchName: string) => void
53-
readonly onMakeDefaultBranch: (branchName: string) => void
53+
readonly onSetAsDefaultBranch: (branchName: string) => void
5454
readonly onDeleteBranch: (branchName: string) => void
5555

5656
/** All worktrees in the repository. */
@@ -295,7 +295,7 @@ export class BranchesContainer extends React.Component<
295295
)}
296296
renderPreList={this.renderPreList}
297297
onRenameBranch={this.props.onRenameBranch}
298-
onMakeDefaultBranch={this.props.onMakeDefaultBranch}
298+
onSetAsDefaultBranch={this.props.onSetAsDefaultBranch}
299299
onDeleteBranch={this.props.onDeleteBranch}
300300
/>
301301
)

app/src/ui/toolbar/branch-dropdown.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ export class BranchDropdown extends React.Component<IBranchDropdownProps> {
115115
emoji={this.props.emoji}
116116
onDeleteBranch={this.onDeleteBranch}
117117
onRenameBranch={this.onRenameBranch}
118-
onMakeDefaultBranch={this.onMakeDefaultBranch}
118+
onSetAsDefaultBranch={this.onSetAsDefaultBranch}
119119
underlineLinks={this.props.underlineLinks}
120120
/>
121121
)
@@ -327,10 +327,10 @@ export class BranchDropdown extends React.Component<IBranchDropdownProps> {
327327
onViewPullRequestOnGitHub: this.props.currentPullRequest
328328
? this.onViewPullRequestOnGithub
329329
: undefined,
330-
onMakeDefaultBranch:
330+
onSetAsDefaultBranch:
331331
nameWithoutRemote === this.props.repository.defaultBranch
332332
? undefined
333-
: this.onMakeDefaultBranch,
333+
: this.onSetAsDefaultBranch,
334334
onDeleteBranch: this.onDeleteBranch,
335335
})
336336

@@ -390,7 +390,7 @@ export class BranchDropdown extends React.Component<IBranchDropdownProps> {
390390
this.props.dispatcher.showPullRequestByPR(pr)
391391
}
392392

393-
private onMakeDefaultBranch = (branchName: string) => {
393+
private onSetAsDefaultBranch = (branchName: string) => {
394394
this.props.dispatcher.updateRepositoryDefaultBranch(
395395
this.props.repository,
396396
branchName

0 commit comments

Comments
 (0)