Skip to content

Commit

Permalink
docs(analytics): compile-time enforcement of analytics docs (#4120)
Browse files Browse the repository at this point in the history
### Description

relies on #4119 

Thinking of creating a new analytics event without documenting it and
leaving your poor teammates in the dark about what it does? Think again!
😈

The main contribution is `eventDocs`, which is typed to require an entry
for analytics event we define. This gives us a CI check for when we add
analytics events but fail to document them (since typescript will not
compile).

For events with no docs, I used an empty string as the description 😢.
For events with inline code comments, I used the code comment as the
description (using a script).

I then deleted the inline code comments in Events.tsx to avoid having 2
sources of truth and confusing teammates who rely on these docs.

Document your analytics events!!!

### Test plan

typescript compiles

spot checked many of the event descriptions

### Related issues

na

### Backwards compatibility

na
  • Loading branch information
cajubelt authored Aug 28, 2023
1 parent 782acaa commit 40f7c35
Show file tree
Hide file tree
Showing 2 changed files with 732 additions and 189 deletions.
Loading

0 comments on commit 40f7c35

Please sign in to comment.