Skip to content

Commit c19e7af

Browse files
authored
Notifications: Go or No Go (#6967)
Fixes #6750
1 parent 6a3bf4e commit c19e7af

3 files changed

Lines changed: 11 additions & 19 deletions

File tree

package.json

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -465,11 +465,6 @@
465465
"markdownDescription": "%githubPullRequests.experimental.chat.description%",
466466
"default": false
467467
},
468-
"githubPullRequests.experimental.notificationsView": {
469-
"type": "boolean",
470-
"markdownDescription": "%githubPullRequests.experimental.notificationsView.description%",
471-
"default": false
472-
},
473468
"githubPullRequests.experimental.notificationsMarkPullRequests": {
474469
"type": "string",
475470
"markdownDescription": "%githubPullRequests.experimental.notificationsMarkPullRequests.description%",
@@ -717,7 +712,8 @@
717712
"name": "%view.notifications.github.name%",
718713
"when": "ReposManagerStateContext != NeedsAuthentication && !github:resolvingConflicts && config.githubPullRequests.experimental.notificationsView && (remoteName != codespaces || !isWeb)",
719714
"icon": "$(bell)",
720-
"accessibilityHelpContent": "%view.pr.github.accessibilityHelpContent%"
715+
"accessibilityHelpContent": "%view.pr.github.accessibilityHelpContent%",
716+
"visibility": "collapsed"
721717
},
722718
{
723719
"id": "github:conflictResolution",
@@ -732,20 +728,23 @@
732728
"type": "webview",
733729
"name": "%view.github.create.pull.request.name%",
734730
"when": "github:createPullRequest || github:revertPullRequest",
731+
"icon": "$(git-pull-request-create)",
735732
"visibility": "visible",
736733
"initialSize": 2
737734
},
738735
{
739736
"id": "github:compareChangesFiles",
740737
"name": "%view.github.compare.changes.name%",
741738
"when": "github:createPullRequest",
739+
"icon": "$(git-compare)",
742740
"visibility": "visible",
743741
"initialSize": 1
744742
},
745743
{
746744
"id": "github:compareChangesCommits",
747745
"name": "%view.github.compare.changesCommits.name%",
748746
"when": "github:createPullRequest",
747+
"icon": "$(git-compare)",
749748
"visibility": "visible",
750749
"initialSize": 1
751750
},
@@ -762,12 +761,14 @@
762761
"type": "webview",
763762
"name": "%view.github.active.pull.request.name%",
764763
"when": "github:inReviewMode && github:focusedReview && !github:createPullRequest && !github:revertPullRequest && github:activePRCount <= 1",
764+
"icon": "$(git-pull-request)",
765765
"initialSize": 2
766766
},
767767
{
768768
"id": "github:activePullRequest:welcome",
769769
"name": "%view.github.active.pull.request.welcome.name%",
770-
"when": "!github:stateValidated && github:focusedReview"
770+
"when": "!github:stateValidated && github:focusedReview",
771+
"icon": "$(git-pull-request)"
771772
}
772773
]
773774
},

src/common/settingKeys.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ export const ALLOW_FETCH = 'allowFetch';
5454
export const ALWAYS_PROMPT_FOR_NEW_ISSUE_REPO = 'alwaysPromptForNewIssueRepo';
5555
export const EXPERIMENTAL_CHAT = 'experimental.chat';
5656
export const EXPERIMENTAL_USE_QUICK_CHAT = 'experimental.useQuickChat';
57-
export const EXPERIMENTAL_NOTIFICATIONS = 'experimental.notificationsView';
5857
export const EXPERIMENTAL_NOTIFICATIONS_PAGE_SIZE = 'experimental.notificationsViewPageSize';
5958
export const EXPERIMENTAL_NOTIFICATIONS_SCORE = 'experimental.notificationsScore';
6059
export const WEBVIEW_REFRESH_INTERVAL = 'webviewRefreshInterval';

src/extension.ts

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import Logger from './common/logger';
1515
import * as PersistentState from './common/persistentState';
1616
import { parseRepositoryRemotes } from './common/remote';
1717
import { Resource } from './common/resources';
18-
import { BRANCH_PUBLISH, EXPERIMENTAL_CHAT, EXPERIMENTAL_NOTIFICATIONS, FILE_LIST_LAYOUT, GIT, OPEN_DIFF_ON_CLICK, PR_SETTINGS_NAMESPACE, SHOW_INLINE_OPEN_FILE_ACTION } from './common/settingKeys';
18+
import { BRANCH_PUBLISH, EXPERIMENTAL_CHAT, FILE_LIST_LAYOUT, GIT, OPEN_DIFF_ON_CLICK, PR_SETTINGS_NAMESPACE, SHOW_INLINE_OPEN_FILE_ACTION } from './common/settingKeys';
1919
import { initBasedOnSettingChange } from './common/settingsUtils';
2020
import { TemporaryState } from './common/temporaryState';
2121
import { Schemes } from './common/uri';
@@ -222,16 +222,8 @@ async function init(
222222
context.subscriptions.push(issuesFeatures);
223223
await issuesFeatures.initialize();
224224

225-
const notificationsViewEnabled = () => vscode.workspace.getConfiguration(PR_SETTINGS_NAMESPACE).get<boolean>(EXPERIMENTAL_NOTIFICATIONS, false);
226-
const initNotifications = () => {
227-
const notificationsFeatures = new NotificationsFeatureRegister(credentialStore, reposManager, telemetry);
228-
context.subscriptions.push(notificationsFeatures);
229-
};
230-
if (notificationsViewEnabled()) {
231-
initNotifications();
232-
} else {
233-
initBasedOnSettingChange(PR_SETTINGS_NAMESPACE, EXPERIMENTAL_NOTIFICATIONS, notificationsViewEnabled, initNotifications, context.subscriptions);
234-
}
225+
const notificationsFeatures = new NotificationsFeatureRegister(credentialStore, reposManager, telemetry);
226+
context.subscriptions.push(notificationsFeatures);
235227

236228
context.subscriptions.push(new GitLensIntegration());
237229

0 commit comments

Comments
 (0)