Skip to content

feat: analytics typed events - #21554

Open
criticalAY wants to merge 7 commits into
ankidroid:mainfrom
criticalAY:refactor/analytics-typed-events
Open

feat: analytics typed events#21554
criticalAY wants to merge 7 commits into
ankidroid:mainfrom
criticalAY:refactor/analytics-typed-events

Conversation

@criticalAY

Copy link
Copy Markdown
Contributor

Note

Assisted-by: Claude Opus 5 (few commits)

Purpose / Description

We were passing raw strings for category and action, so nothing stopped a variable from landing in a field that is compared between AnkiDroid versions, and nothing enforced that a category and action actually belong together. So here enforcing the runtime data

Fixes

Approach

See commits

How Has This Been Tested?

Locally build and unit testing

Learning (optional, can help others)

NA

Checklist

Please, go through these checks before submitting the PR.

  • You have a descriptive commit message with a short title (first line, max 50 chars).
  • You have commented your code, particularly in hard-to-understand areas
  • You have performed a self-review of your own code
  • UI changes: include screenshots of all affected screens (in particular showing any new or changed strings)
  • UI Changes: You have tested your change using the Google Accessibility Scanner

Category and action are now fixed at each event's declaration, so runtime data can only reach the label or value.
No widget ever used it, and it handed out the raw analytics instance.

Assisted-by: Claude Opus 5
The widget providers were the last outside readers.

Assisted-by: Claude Opus 5(this was pointed out by Claude)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use typed analytics events

1 participant