in lib/messageUtils.ts [20:181]
export function getSurfaceData(surfaceOrTemplate: string): SurfaceData {
const surfaceData: Record<string, SurfaceData> = {
aboutwelcome: {
surface: "About:Welcome Page (1st screen)",
platform: "firefox-desktop",
lookerDateFilterPropertyName: "event_counts.submission_timestamp_date",
lookerDashboardId: "1818",
tagColor: "bg-red-400",
},
cfr: {
surface: "Contextual Feature Recommendation",
platform: "firefox-desktop",
lookerDateFilterPropertyName: "event_counts.submission_timestamp_date",
lookerDashboardId: "1818",
tagColor: "bg-red-200",
},
cfr_doorhanger: {
surface: "Doorhanger",
platform: "firefox-desktop",
lookerDateFilterPropertyName: "event_counts.submission_timestamp_date",
lookerDashboardId: "1818",
tagColor: "bg-orange-200",
docs: "https://experimenter.info/messaging/desktop-messaging-surfaces/#doorhanger",
},
defaultaboutwelcome: {
surface: "Default About:Welcome Message (1st screen)",
platform: "firefox-desktop",
lookerDateFilterPropertyName: "event_counts.submission_timestamp_date",
lookerDashboardId: "1818",
tagColor: "bg-orange-400",
},
feature_callout: {
surface: "Feature Callout (1st screen)",
platform: "firefox-desktop",
lookerDateFilterPropertyName: "event_counts.submission_timestamp_date",
lookerDashboardId: "1818",
tagColor: "bg-yellow-300",
docs: "https://experimenter.info/messaging/desktop-messaging-surfaces/#feature-callouts",
},
infobar: {
surface: "InfoBar",
platform: "firefox-desktop",
lookerDateFilterPropertyName: "messaging_system.submission_date",
lookerDashboardId: "2267",
tagColor: "bg-lime-300",
docs: "https://experimenter.info/messaging/desktop-messaging-surfaces/#infobar",
},
menu: {
surface: "Menu Messages",
platform: "firefox-desktop",
lookerDateFilterPropertyName: "event_counts.submission_timestamp_date",
lookerDashboardId: "1818",
tagColor: "bg-pink-300",
},
milestone_message: {
surface: "Milestone Messages",
platform: "firefox-desktop",
lookerDateFilterPropertyName: "event_counts.submission_timestamp_date",
lookerDashboardId: "1818",
tagColor: "bg-green-400",
},
multi: {
surface: "1st of Multiple Messages",
platform: "firefox-desktop",
lookerDateFilterPropertyName: "event_counts.submission_timestamp_date",
lookerDashboardId: "1818",
tagColor: "bg-teal-300",
},
pb_newtab: {
surface: "Private Browsing New Tab",
platform: "firefox-desktop",
lookerDateFilterPropertyName: "event_counts.submission_timestamp_date",
lookerDashboardId: "1818",
tagColor: "bg-sky-400",
docs: "https://experimenter.info/messaging/desktop-messaging-surfaces/#privatebrowsing",
},
protections_panel: {
surface: "Protections Dropdown Panel",
platform: "firefox-desktop",
lookerDateFilterPropertyName: "event_counts.submission_timestamp_date",
lookerDashboardId: "1818",
tagColor: "bg-blue-500",
},
rtamo: {
surface: "Return to AMO",
platform: "firefox-desktop",
lookerDateFilterPropertyName: "event_counts.submission_timestamp_date",
lookerDashboardId: "1818",
tagColor: "bg-violet-200",
},
toast_notification: {
surface: "Toast Notification",
platform: "firefox-desktop",
lookerDateFilterPropertyName: "event_counts.submission_timestamp_date",
lookerDashboardId: "1818",
tagColor: "bg-indigo-400",
},
toolbar_badge: {
surface: "Toolbar Badge",
platform: "firefox-desktop",
lookerDateFilterPropertyName: "event_counts.submission_timestamp_date",
lookerDashboardId: "1818",
tagColor: "bg-purple-400",
},
// XXX Consider removing after we start reading JSON from remote settings
"toolbar-badge": {
surface: "Toolbar Badge",
platform: "firefox-desktop",
lookerDateFilterPropertyName: "event_counts.submission_timestamp_date",
lookerDashboardId: "1818",
tagColor: "bg-purple-400",
},
spotlight: {
surface: "Spotlight Modal Dialog",
platform: "firefox-desktop",
lookerDateFilterPropertyName: "event_counts.submission_timestamp_date",
lookerDashboardId: "1818",
tagColor: "bg-pink-400",
docs: "https://experimenter.info/messaging/desktop-messaging-surfaces/#multistage-spotlight",
},
survey: {
surface: "Survey",
platform: "fenix",
lookerDateFilterPropertyName: "events.submission_date",
lookerDashboardId: "2303",
tagColor: "bg-cyan-400",
},
update_action: {
surface: "Moments Page",
platform: "firefox-desktop",
lookerDateFilterPropertyName: "event_counts.submission_timestamp_date",
lookerDashboardId: "1818",
tagColor: "bg-rose-400",
docs: "https://experimenter.info/messaging/desktop-messaging-surfaces/#moments-pages",
},
"whats-new-panel": {
surface: "What's New Panel",
platform: "firefox-desktop",
lookerDateFilterPropertyName: "event_counts.submission_timestamp_date",
lookerDashboardId: "1818",
tagColor: "bg-sky-200",
},
whatsNewPage: {
surface: "What's New Page",
platform: "firefox-desktop",
lookerDateFilterPropertyName: "event_counts.submission_timestamp_date",
lookerDashboardId: "1818",
tagColor: "bg-fuchsia-300",
},
};
if (surfaceOrTemplate in surfaceData) {
return surfaceData[surfaceOrTemplate];
}
return {
surface: surfaceOrTemplate,
platform: "firefox-desktop",
lookerDateFilterPropertyName: "event_counts.submission_timestamp_date",
lookerDashboardId: "1818",
};
}