Skip to content

Commit 64d7663

Browse files
committed
chore: update pro deps
1 parent 946fa04 commit 64d7663

2 files changed

Lines changed: 27 additions & 1 deletion

File tree

src/extensionsIntegrated/Phoenix-live-preview/MarkdownSync.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,20 @@ define(function (require, exports, module) {
4848
// metric tells us "users who edit at least one md doc" without
4949
// inflating with every keystroke.
5050
const _mdEditedFiles = new Set();
51+
52+
// Session-cumulative edit-batch count for distinguishing light vs
53+
// heavy markdown editors. Each iframe content change (already
54+
// 50ms-debounced upstream) increments this. When the count crosses
55+
// a bucket threshold we fire a one-shot count event so the analytics
56+
// funnel reads as: users-with-LTE5 ⊇ LTE25 ⊇ LTE100 ⊇ GT500.
57+
let _mdEditCount = 0;
58+
const MD_EDIT_BUCKETS = [
59+
{ threshold: 5, label: "LTE5" },
60+
{ threshold: 25, label: "LTE25" },
61+
{ threshold: 100, label: "LTE100" },
62+
{ threshold: 500, label: "GT500" }
63+
];
64+
5165
let _active = false;
5266
let _doc = null;
5367
let _$iframe = null;
@@ -675,6 +689,18 @@ define(function (require, exports, module) {
675689
Metrics.countEvent(Metrics.EVENT_TYPE.MD, "doc", "edited");
676690
}
677691

692+
// Edit-volume bucket: fire once when the cumulative session
693+
// edit count first crosses each threshold. Each bucket fires
694+
// at most once per session, so the metric reads as a funnel.
695+
_mdEditCount++;
696+
for (let i = 0; i < MD_EDIT_BUCKETS.length; i++) {
697+
if (_mdEditCount === MD_EDIT_BUCKETS[i].threshold) {
698+
Metrics.countEvent(Metrics.EVENT_TYPE.MD,
699+
"edits", MD_EDIT_BUCKETS[i].label);
700+
break;
701+
}
702+
}
703+
678704
// Send back the actual CM text so the iframe can compute accurate
679705
// data-source-line attributes. The markdown from convertToMarkdown
680706
// may differ slightly from CM's content (e.g. table formatting),

tracking-repos.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"phoenixPro": {
3-
"commitID": "5071a6c03641ca843a3b67141e14c657228df930"
3+
"commitID": "99559768f4fbbab86ed3589e9a51d3a915f51986"
44
}
55
}

0 commit comments

Comments
 (0)