Skip to content

Commit

Permalink
feat(remove-android): Remove Android telemetry types (#6753)
Browse files Browse the repository at this point in the history
#### Details

Deprecating Android support will touch hundreds of files, so we're
breaking it up into more manageable units. This removes the telemetry
types that were defined for Android. There was an intermediate commit
that resulted from noise in generating a snapshot for a unit test. At
first I thought it was a platform problem, but it may have been a
caching issue. I'll open an issue if I can get a consistent repro, but
it seems to be unrelated to this change.

##### Motivation

Android deprecation feature

##### Context

<!-- Are there any parts that you've intentionally left out-of-scope for
a later PR to handle? -->

<!-- Were there any alternative approaches you considered? What
tradeoffs did you consider? -->

#### Pull request checklist
<!-- If a checklist item is not applicable to this change, write "n/a"
in the checkbox -->
- [n/a] Addresses an existing issue (part of Android deprecation
feature)
- [x] Ran `yarn fastpass`
- [x] Added/updated relevant unit test(s) (and ran `yarn test`)
- [x] Verified code coverage for the changes made. Check coverage report
at: `<rootDir>/test-results/unit/coverage`
- [x] PR title *AND* final merge commit title both start with a semantic
tag (`fix:`, `chore:`, `feat(feature-name):`, `refactor:`). See
`CONTRIBUTING.md`.
- [n/a] (UI changes only) Added screenshots/GIFs to description above
- [n/a] (UI changes only) Verified usability with NVDA/JAWS
  • Loading branch information
DaveTryon committed Jun 23, 2023
1 parent c32c5dc commit 521dd5c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 38 deletions.
37 changes: 0 additions & 37 deletions src/common/extension-telemetry-events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,6 @@ export enum TelemetryEventSource {
NewBugButton,
TargetPage,
ContentPage,
ElectronDeviceConnect,
ElectronResultsView,
Background,
PopUp,
DevTools,
Expand Down Expand Up @@ -227,13 +225,6 @@ export type NeedsReviewAnalyzerScanTelemetryData = {
incompleteRuleResults: string;
} & RuleAnalyzerScanTelemetryData;

export type AndroidScanStartedTelemetryData = {
source: TelemetryEventSource;
};
export type AndroidScanCompletedTelemetryData = {
scanDuration: number;
} & InstanceCount;

export type TabStopsAutomatedResultsTelemetryData = {
tabStopAutomatedFailuresInstanceCount: TabStopAutomatedFailuresInstanceCount;
} & BaseTelemetryData;
Expand Down Expand Up @@ -266,26 +257,6 @@ export type TabStopAutomatedFailuresInstanceCount = {
[requirementId: string]: number;
};

export type AtfaInstanceCount = {
ERROR: {
[ruleId: string]: number;
};
WARNING: {
[ruleId: string]: number;
};
INFO: {
[ruleId: string]: number;
};
RESOLVED: {
[ruleId: string]: number;
};
};

export type AndroidScanFailedTelemetryData = {
port?: number;
scanDuration: number;
};

export type SetAllUrlsPermissionTelemetryData = {
permissionState: boolean;
} & BaseTelemetryData;
Expand All @@ -294,10 +265,6 @@ export type ScanIncompleteWarningsTelemetryData = {
scanIncompleteWarnings: ScanIncompleteWarningId[];
};

export type DeviceFocusKeyEventTelemetryData = {
keyEventCode: number;
};

export type AutoDetectedFailuresDialogStateTelemetryData = {
enabled: boolean;
};
Expand Down Expand Up @@ -340,10 +307,6 @@ export type TelemetryData =
| IssuesAnalyzerScanTelemetryData
| AssessmentRequirementScanTelemetryData
| RequirementStatusTelemetryData
| AndroidScanStartedTelemetryData
| AndroidScanCompletedTelemetryData
| AndroidScanFailedTelemetryData
| DeviceFocusKeyEventTelemetryData
| ScanIncompleteWarningsTelemetryData
| SetAllUrlsPermissionTelemetryData
| TabStopsAutomatedResultsTelemetryData
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import { GlobalActionCreator } from 'background/global-action-creators/global-ac
import { Interpreter } from 'background/interpreter';
import { TelemetryEventHandler } from 'background/telemetry/telemetry-event-handler';
import {
TelemetryData,
TelemetryEventSource,
TRANSFER_QUICK_ASSESS_DATA_TO_ASSESSMENT_INITIATED,
} from 'common/extension-telemetry-events';
Expand Down Expand Up @@ -118,7 +119,7 @@ describe('GlobalActionCreatorTest', () => {
const payload: BaseActionPayload = {
telemetry: {
source: TelemetryEventSource.DetailsView,
},
} as TelemetryData,
};

const validator = new GlobalActionCreatorValidator()
Expand Down

0 comments on commit 521dd5c

Please sign in to comment.