Name Description Size Coverage
_WidgetCelebration.scss 14931 -
_Widgets.scss 14914 -
_WidgetsRowAd.scss 3783 -
_WidgetWrapper.scss 1732 -
Clocks -
Crossword -
FocusTimer -
Horoscopes -
Lists -
MoveSubmenu.jsx 3743 -
MozWidgetCard.jsx The moz-widget card of a WIDGET_REGISTRY entry drawn by a widget document. Its menu holds the shared widget items. @param {object} props @param {Function} props.dispatch - Redux dispatch. @param {object} props.entry - the WIDGET_REGISTRY entry, merged with its ExtensionWidget @param {string} props.size - the widget's size @param {string} props.src - URL of the widget's document @param {object} props.widgetEnabledMap - Map of widget id to whether it is currently active, used by the Move submenu. 3107 -
PictureOfTheDay -
Privacy -
RecentSearches -
SizeSubmenu.jsx 1083 -
Solitaire -
Stocks -
Travel -
useCountUp.jsx Animates a number from one value to another on demand. Returns `displayValue` (the resting value unless an animation is running), `countUp(from, to)` to start one, `hold(at)` to pin the readout without animating, and `release()` to undo a hold. Callers keep rendering their own value; this only takes over for the duration of a run. @param {number} value Resting value shown when no animation is running. @param {number} durationMs Length of the count, in ms. 3077 -
usePageVisible.jsx 884 -
useWidgetCelebration.jsx Shared widget-celebration lifecycle hook. Usage: 1. Create a ref for the widget root element and pass it to this hook. 2. Render <WidgetCelebration /> only when both `isCelebrating` and `celebrationFrame` are truthy, and pass `completeCelebration` to the component's `onComplete` prop. 3. Call `triggerCelebration()` when the widget reaches its completion state. Returns `false` if the animation was skipped (reduced motion or no widget ref) so the caller can run its completion handler inline. For effects that decorate one element rather than the whole card (e.g. the Privacy count-up sparkles), render <CelebrationSparkles> inside that element instead — it positions itself in CSS, with no measured rect to go stale. Example: const widgetRef = useRef(null); const { celebrationFrame, celebrationId, completeCelebration, isCelebrating, triggerCelebration, } = useWidgetCelebration(widgetRef); <article ref={widgetRef}> {isCelebrating && celebrationFrame ? ( <WidgetCelebration celebrationFrame={celebrationFrame} celebrationId={celebrationId} onComplete={completeCelebration} ... /> ) : null} </article> 2789 -
useWidgetDnD.jsx Widgets-row adapter over the generic pointer reorder hook. Keeps the order the user just chose on screen until the pref write comes back. 2315 -
useWidgetTelemetry.jsx Shared telemetry hook for function-component widgets. Returns recorders for the four widget telemetry actions (impression, user event, enabled, error) so call sites don't hand-build payloads. `widget` is a WIDGET_REGISTRY entry; `widget.telemetryName` becomes `widget_name`. const { impressionRef, recordImpression, recordUserAction, recordEnabled, recordError, } = useWidgetTelemetry({ dispatch, widget, widgetSize }); <article ref={impressionRef}>...</article> recordUserAction("learn_more", { source: "context_menu" }); Per-call options on `recordUserAction`: `value` (action_value), `size` (overrides widgetSize), `alsoToMain: true` (routes via AlsoToMain), and `legacy: true` (co-dispatches `legacyUserEventType` with `{ userAction }`). `recordImpression()` is a manual one-shot fire that shares the observer's impressionFired guard; useful when a widget needs to record an impression outside the IntersectionObserver path. Constructor `legacyImpressionTypes` (array) and `legacyUserEventType` bridge the Bug 2012779 transition: while WIDGETS_TIMER_* / WIDGETS_LISTS_* legacy events still exist alongside the unified events, FocusTimer and Lists pass the matching legacy action types so the hook emits both. Both co-dispatches fire legacy first, unified second. `onImpression` (optional) runs once, right after the widget impression fires (from the IntersectionObserver, or a manual recordImpression). Use it to hang extra, view-gated telemetry off the same trigger so it lines up with the impression and never fires on a preloaded tab that was never seen. 7593 -
Weather -
WeatherForecast -
WidgetCelebration.jsx Sparkle burst, rendered *inside* the element it should decorate (give that element `position: relative`). Positioning is pure CSS inset, so it tracks the element through icon swaps, count-up digit changes and font loads — a measured rect captured once at trigger time does not. 10564 -
WidgetMenuButton.jsx 657 -
WidgetMenuFooter.jsx 2161 -
WidgetMenuPoweredBy.jsx 830 -
Widgets.jsx 40764 -
WidgetsComponentRegistry.jsx 1990 -
WidgetsRowAd.jsx The sponsored card in one cell of the widgets row. @param {object} spoc - a normalized spoc from state.DiscoveryStream.spocs @param {Function} dispatch @param {string} type - telemetry source 1782 -
WidgetsSidebar.jsx 2093 -
WidgetWrapper.jsx 598 -