feat(feedback): adopt 0–10 recommendation scale (#2438)

* feat(feedback): adopt 10-point recommendation scale

* docs(feedback): keep OSS scale contract self-contained
This commit is contained in:
Miguel Ángel
2026-07-14 15:46:47 -04:00
committed by GitHub
parent d2c8c2d808
commit 990f5c3145
18 changed files with 103 additions and 43 deletions
@@ -180,9 +180,9 @@ export const StudioFeedbackBar = memo(function StudioFeedbackBar() {
</>
) : (
<>
<span className="text-neutral-500 flex-shrink-0">How's the Studio experience?</span>
<span className="text-neutral-500 flex-shrink-0">Recommend HyperFrames?</span>
<div className="flex items-center gap-0.5">
{[1, 2, 3, 4, 5].map((n) => (
{Array.from({ length: 11 }, (_, n) => n).map((n) => (
<button
key={n}
onClick={() => handleRating(n)}
@@ -12,6 +12,7 @@ const {
trackStudioRenderStart,
trackStudioRazorSplit,
trackStudioExpandedClipEdit,
trackStudioFeedback,
} = await import("./events");
describe("studio telemetry events", () => {
@@ -69,4 +70,13 @@ describe("studio telemetry events", () => {
trackStudioExpandedClipEdit({ action: "resize" });
expect(trackEvent).toHaveBeenCalledWith("studio_expanded_clip_edit", { action: "resize" });
});
it.each([0, 10])("trackStudioFeedback preserves NPS boundary %i and its scale", (rating) => {
trackStudioFeedback({ rating });
expect(trackEvent).toHaveBeenCalledWith(
"survey sent",
expect.objectContaining({ $survey_response: rating, rating_scale: 10 }),
);
});
});
+1
View File
@@ -67,6 +67,7 @@ export function trackStudioFeedback(props: { rating: number; comment?: string })
trackEvent("survey sent", {
$survey_id: "studio_experience",
$survey_response: props.rating,
rating_scale: 10,
...(props.comment ? { $survey_response_2: props.comment } : {}),
doctor_summary: getBrowserDoctorSummary(),
source: "studio",