This commit:
* Adds a `position` key to the `topsites.{impression, click}` events.
This position is zero-based, to align with `pocket_position`.
* Refactors the impression stats actions in `TelemetryFeed` to receive
the zero-based tile position, and adds one to the structured
ingestion payloads and scalar values.
* Adds a new Glean metric, `topsites.rows`, to record the number of
rows shown on the New Tab page.
Differential Revision: https://phabricator.services.mozilla.com/D172292
Add logic to apply theme colors to Feature Callout based on where it's
going to show. We can use in-content CSS properties for Firefox View and
other themed system pages, but not for PDF.js, nor for any callouts we
might show in the browser chrome in the future. For the browser chrome
in general, we can use the lightweight theme properties directly, in the
same way the chrome frontend does. But PDF.js is a special case, since
although it exists in the chrome, it's meant to appear like it's in the
PDF.js viewer. And the PDF.js viewer has its own theme totally
independent of everything else. So this dynamically applies themes from
different sources.
This also fixes the bug where the PDF.js color scheme could mismatch the
PDF.js viewer if the browser theme and system color scheme don't match,
e.g. where system color scheme is light but a dark theme is installed,
or vice versa. For PDF.js specifically, we can use the
-moz-content-prefers-color-scheme media query to follow the color scheme
as it exists in the PDF.js viewer page instead of the color scheme in
the chrome window where the Feature Callout actually exists.
It also adds or modifies some colors that were previously missing or
different from the prototype, fixes the illegibility of buttons in HCM
and forced colors mode, and makes some other minor color changes.
Differential Revision: https://phabricator.services.mozilla.com/D173088
Add logic to apply theme colors to Feature Callout based on where it's
going to show. We can use in-content CSS properties for Firefox View and
other themed system pages, but not for PDF.js, nor for any callouts we
might show in the browser chrome in the future. For the browser chrome
in general, we can use the lightweight theme properties directly, in the
same way the chrome frontend does. But PDF.js is a special case, since
although it exists in the chrome, it's meant to appear like it's in the
PDF.js viewer. And the PDF.js viewer has its own theme totally
independent of everything else. So this dynamically applies themes from
different sources.
This also fixes the bug where the PDF.js color scheme could mismatch the
PDF.js viewer if the browser theme and system color scheme don't match,
e.g. where system color scheme is light but a dark theme is installed,
or vice versa. For PDF.js specifically, we can use the
-moz-content-prefers-color-scheme media query to follow the color scheme
as it exists in the PDF.js viewer page instead of the color scheme in
the chrome window where the Feature Callout actually exists.
It also adds or modifies some colors that were previously missing or
different from the prototype, fixes the illegibility of buttons in HCM
and forced colors mode, and makes some other minor color changes.
Differential Revision: https://phabricator.services.mozilla.com/D173088
The schema still imposes the following restrictions:
- Having "template" present makes "content" and "id" required.
- Having "content" present makes "template" and "id" required.
Template and content are dependent on eachother because we do not know how to
interpret content without a template and we a template with no content to
interpret is useless.
If we have a template and content, then we also need an ID for the message
because we cannot reference the message content except by its ID.
Differential Revision: https://phabricator.services.mozilla.com/D172458
The schema still imposes the following restrictions:
- Having "template" present makes "content" and "id" required.
- Having "content" present makes "template" and "id" required.
Template and content are dependent on eachother because we do not know how to
interpret content without a template and we a template with no content to
interpret is useless.
If we have a template and content, then we also need an ID for the message
because we cannot reference the message content except by its ID.
Differential Revision: https://phabricator.services.mozilla.com/D172458
The schema still imposes the following restrictions:
- Having "template" present makes "content" and "id" required.
- Having "content" present makes "template" and "id" required.
Template and content are dependent on eachother because we do not know how to
interpret content without a template and we a template with no content to
interpret is useless.
If we have a template and content, then we also need an ID for the message
because we cannot reference the message content except by its ID.
Differential Revision: https://phabricator.services.mozilla.com/D172458
Currently, the Glean `newtab` ping and legacy scalars collect
impressions and clicks for sponsored (Pocket and Contile) tiles, but
not organic tiles from Places.
This commit adds:
* Support for recording organic impressions to the
`TopSiteImpressionWrapper` component.
* Support for recording organic clicks to the `TopSiteLink`
component.
* Instrumentation for recording organic impressions and clicks,
separate from sponsored ones, to `TelemetryFeed`.
Differential Revision: https://phabricator.services.mozilla.com/D171830
This also fixes a bug in ASRouter devtools that prevented evaluation of
expressions containing nested promises. Objects containing promises are now
correctly serialized to the ASRouter devtools and expressions evaluate
correctly.
Differential Revision: https://phabricator.services.mozilla.com/D169408
This also fixes a bug in ASRouter devtools that prevented evaluation of
expressions containing nested promises. Objects containing promises are now
correctly serialized to the ASRouter devtools and expressions evaluate
correctly.
Differential Revision: https://phabricator.services.mozilla.com/D169408
Fixes the border radius and color/style of the outline applied to
feature callouts when they are focused. Also applies the focus ring to
the callout's arrow with some CSS changes.
Differential Revision: https://phabricator.services.mozilla.com/D170524