Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[merge-conflicts] fix 'merge-conflicts' command category #6790

Merged
merged 1 commit into from
Dec 23, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions packages/merge-conflicts/src/browser/merge-conflict.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,20 @@ export interface MergeConflictCommandArgument {
}

export namespace MergeConflictsCommands {
const MERGE_CONFLIC_PREFIX = 'Merge Conflict';
export const MERGE_CONFLICT_PREFIX = 'Merge Conflict';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need to export this one?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I included the export so that others (extenders) would be able to access the prefix and be able to categorize their commands with existing ones if they wanted to. Do you believe we should not export?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah ok maybe you would have another PR where MERGE_CONFLICT_PREFIX is referenced ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exactly, let's say I'm an extender who wishes to use the prefix because they are contributing commands to the same category. Before the pull request, they'd have to duplicate and hard code the value while if it is exported they can simply reference it.

export const AcceptCurrent: Command = {
id: 'merge-conflicts:accept.current',
category: MERGE_CONFLIC_PREFIX,
category: MERGE_CONFLICT_PREFIX,
label: 'Accept Current Change'
};
export const AcceptIncoming: Command = {
id: 'merge-conflicts:accept.incoming',
category: MERGE_CONFLIC_PREFIX,
category: MERGE_CONFLICT_PREFIX,
label: 'Accept Incoming Change'
};
export const AcceptBoth: Command = {
id: 'merge-conflicts:accept.both',
category: MERGE_CONFLIC_PREFIX,
category: MERGE_CONFLICT_PREFIX,
label: 'Accept Both Changes'
};
}