Skip to content

Commit fb2b23e

Browse files
authored
feat(notifications): enable notifications for all users (aws#6071)
- Removes feature flag - Slightly adjusts toolkit_invokeAction telemetry to not use button string, instead we use action enums. --- <!--- REMINDER: Ensure that your PR meets the guidelines in CONTRIBUTING.md --> License: I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent f355557 commit fb2b23e

File tree

4 files changed

+19
-8
lines changed

4 files changed

+19
-8
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type": "Feature",
3+
"description": "Notifications: Support for delivering critical alerts and product updates"
4+
}

packages/core/src/notifications/activation.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
*/
55

66
import * as vscode from 'vscode'
7-
import { DevSettings } from '../shared/settings'
87
import { NotificationsController } from './controller'
98
import { NotificationsNode } from './panelNode'
109
import { RuleEngine, getRuleContext } from './rules'
@@ -30,11 +29,6 @@ export async function activate(
3029
initialState: AuthState,
3130
authStateFn: () => Promise<AuthState>
3231
) {
33-
// TODO: Currently gated behind feature-flag.
34-
if (!DevSettings.instance.get('notifications', false)) {
35-
return
36-
}
37-
3832
try {
3933
const panelNode = NotificationsNode.instance
4034
panelNode.registerView(context)

packages/core/src/notifications/panelNode.ts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,11 @@ export class NotificationsNode implements TreeNode {
181181
// Display read-only txt document
182182
logger.verbose(`showing txt document for notification: ${notification.id} ...`)
183183
await telemetry.toolkit_invokeAction.run(async () => {
184-
telemetry.record({ source: getNotificationTelemetryId(notification), action: onClickType })
184+
telemetry.record({
185+
id: getNotificationTelemetryId(notification),
186+
source: getNotificationTelemetryId(notification),
187+
action: onClickType,
188+
})
185189
await readonlyDocument.show(
186190
notification.uiRenderInstructions.content['en-US'].description,
187191
`Notification: ${notification.id}`
@@ -225,11 +229,16 @@ export class NotificationsNode implements TreeNode {
225229
.showInformationMessage(title, { modal: isModal, detail }, ...buttonLabels)
226230
.then((response) => {
227231
return telemetry.toolkit_invokeAction.run(async (span) => {
228-
span.record({ source: getNotificationTelemetryId(notification), action: response ?? 'OK' })
232+
span.record({
233+
id: getNotificationTelemetryId(notification),
234+
source: getNotificationTelemetryId(notification),
235+
action: response ?? 'OK',
236+
})
229237
if (response) {
230238
const selectedButton = buttons.find((actions) => actions.displayText['en-US'] === response)
231239
// Different button options
232240
if (selectedButton) {
241+
span.record({ action: selectedButton.type })
233242
switch (selectedButton.type) {
234243
case 'openTextDocument':
235244
await readonlyDocument.show(
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type": "Feature",
3+
"description": "Notifications: Support for delivering critical alerts and product updates"
4+
}

0 commit comments

Comments
 (0)