Commit Graph

73 Commits

Author SHA1 Message Date
Meg Viar
78cfe4ffdd Bug 1793653 - Implement feature-callout surface in chrome context r=jprickett
Update Feature Callout code to ensure styling is the same in browser chrome as it is when used in content pages such as Firefox View.

Differential Revision: https://phabricator.services.mozilla.com/D159598
2022-10-28 13:19:57 +00:00
negin
c9abcc5baf Bug 1790382 - Update Firefox View Feature Callout so that screenreaders read expected content in the proper order r=emcminn
Differential Revision: https://phabricator.services.mozilla.com/D159762
2022-10-25 16:14:06 +00:00
Cristian Tuns
01b2b78526 Backed out changeset cf4f7e5d0f9d (bug 1790382) for causing mochitest failures in browser_feature_callout_resize.js CLOSED TREE 2022-10-25 10:26:35 -04:00
negin
e39e4874d2 Bug 1790382 - Update Firefox View Feature Callout so that screenreaders read expected content in the proper order r=emcminn
Differential Revision: https://phabricator.services.mozilla.com/D159762
2022-10-25 13:50:19 +00:00
Shane Hughes
7a6dea3750 Bug 1787532 - Let Feature Callouts perform actions on page events. r=mviar
Add a new module and feature callout functions to support messages
performing actions when a specified event is dispatched from the
content. This will allow Feature Callout messages to be dismissed when a
button is clicked within the page in which they are rendered. A screen
just needs to provide a `page_event_listeners` property, which is an
array of objects, each containing event listener parameters (event type,
target selector, and optional parameters) and an action specification
like those already used for buttons. The event listener will be added to
all elements matching the selector, so multiple different buttons could
dismiss or advance the message, if necessary. The new screen property
has this form:
```
page_event_listeners: [
  {
    params: {
      type: string,
      selectors: string,
      options?: {
        capture?: boolean,
        once?: boolean,
        preventDefault?: boolean,
      },
    },
    action: {
      type?: string,
      data?: object,
      dismiss?: boolean,
      etc...
    },
  },
]
```

Differential Revision: https://phabricator.services.mozilla.com/D158899
2022-10-18 14:29:27 +00:00
negin
c8bf42e95d Bug 1792667 - The “Tab Pickup” callout message points to another section when the “Tab Pickup” section is collapsed r=mviar,emcminn
try: https://hg.mozilla.org/try/rev/92340ece620dd2d64e2f2c9826a4f6d9a387acc6

Differential Revision: https://phabricator.services.mozilla.com/D158699
2022-10-17 15:18:39 +00:00
hanna alemu
34fd1f0af1 Bug 1794592 - Investigate use of message property in Fx view messages/ remove if not used r=mviar
The "message" property of the pref "browser.firefox-view.feature-tour" seems to have no actual use, and only one value of "FIREFOX_VIEW_FEATURE_TOUR". We can remove it to reduce complexity.

Differential Revision: https://phabricator.services.mozilla.com/D159131
2022-10-13 19:41:01 +00:00
Marian-Vasile Laza
b853119e5f Backed out changeset d6922083e8a9 (bug 1788996) for causing bc failures on browser_feature_callout.js. CLOSED TREE 2022-10-12 02:37:47 +03:00
Jason Prickett
167ac274a4 Bug 1788996 - Add telemetry call when feature callout parent doesn't exist r=mviar
Differential Revision: https://phabricator.services.mozilla.com/D157750
2022-10-11 22:45:02 +00:00
Meg Viar
c349d50364 Bug 1793660 - Allow feature callout to point to elements that are above and to its end r=jprickett
Differential Revision: https://phabricator.services.mozilla.com/D158610
2022-10-11 13:25:44 +00:00
Norisz Fay
f9c8a126ea Backed out changeset de7440f21f9a (bug 1788996) for causing mochitest failures on browser_feature_callout.js CLOSED TREE 2022-10-04 22:22:24 +03:00
Jason Prickett
b899f0a12e Bug 1788996 - Add telemetry call when feature callout parent doesn't exist r=mviar
Differential Revision: https://phabricator.services.mozilla.com/D157750
2022-10-04 18:37:02 +00:00
Shane Hughes
a8178cd2f3 Bug 1790819 - Feature callouts: more overflow protection. r=mviar
Try to keep feature callouts within the viewport if possible. Make some
changes to fix a bug where callouts could overflow ~10px over the
available space before being repositioned, and also fix a minor typo
issue. Choose the backup position with the greatest available space
instead of based on the position's order in the `positions` object.

Differential Revision: https://phabricator.services.mozilla.com/D157688
2022-10-04 07:56:34 +00:00
Shane Hughes
f6100340bc Bug 1790381 - Clean up existing feature callouts before adding new ones. r=jprickett
Also avoid loading redundant resources and listeners when a feature
callout is added on visibilitychange.

Differential Revision: https://phabricator.services.mozilla.com/D158300
2022-09-30 04:58:25 +00:00
Andrew McCreight
670df172aa Bug 1792457 - Revert workarounds for weak references to XPCWJS crashes. r=Gijs
I have fixed the underlying XPConnect issue, so these workarounds should
no longer be needed.

There are also two more in browser/base/content/browser-siteProtections.js
that I have not fixed.

Differential Revision: https://phabricator.services.mozilla.com/D158158
2022-09-29 11:40:19 +00:00
Mark Banner
79b9557a71 Bug 1792398 - Enable ESLint rule 'strict' on mjs files as the directive is not necessary for modules. r=arai,pip-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D158115
2022-09-26 21:47:50 +00:00
Marian-Vasile Laza
b7f6194b8d Backed out changeset 0679274d6ed5 (bug 1792398) for causing bc failures on browser_sendQuery.js. CLOSED TREE 2022-09-26 22:53:00 +03:00
Mark Banner
5dcae1ed44 Bug 1792398 - Enable ESLint rule 'strict' on mjs files as the directive is not necessary for modules. r=arai,pip-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D158115
2022-09-26 18:51:57 +00:00
Narcis Beleuzu
95ae6b7d0f Backed out changeset 849faf753208 (bug 1792398) for bc failures on browser_sendQuery.js . CLOSED TREE 2022-09-26 20:44:40 +03:00
Mark Banner
ff212fab8b Bug 1792398 - Enable ESLint rule 'strict' on mjs files as the directive is not necessary for modules. r=arai,pip-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D158115
2022-09-26 16:51:10 +00:00
Punam Dahiya
a223d61beb Bug 1790835 - Add Intro Spotlight Modal Screen to Feature Tour r=Mardak
Differential Revision: https://phabricator.services.mozilla.com/D157691
2022-09-20 20:31:36 +00:00
Dan Mosedale
39c12bfdc2 Bug 1790651 - place focus better on feature callout close, r=ayeddi,emcminn
When the user moves focus outside of a callout popup while it's open, this patch tracks and saves the most recently focused element until the focus moves back to the popup. Once the user exits the callout series, the focus is (visibly) placed back where the user last left it.

Differential Revision: https://phabricator.services.mozilla.com/D157398
2022-09-15 19:11:19 +00:00
Emily McMinn
5cf7cfb2e6 Bug 1779427 - Turn on Firefox View feature tour by default r=mviar
Split out position tests to simplify re-enabling bulk of tests. Fix preference getter leak with weakDoc.

Differential Revision: https://phabricator.services.mozilla.com/D155482
2022-09-11 15:59:15 +00:00
Shane Hughes
7deb89ce64 Bug 1788764 - Suppress Feature Callouts when feature recommendations are disabled by pref. r=mviar
Only show Feature Callout messages when the user preference
`browser.newtabpage.activity-stream.asrouter.userprefs.cfr.features`
is enabled (it's enabled by default). This corresponds to the setting
labeled "Recommend features as you browse" in about:preferences.

Differential Revision: https://phabricator.services.mozilla.com/D156357
2022-09-10 20:35:12 +00:00
Jason Prickett
d76e44a172 Bug 1786347 - Adding continuous onboarding colorways reminder to firefox view feature callout r=mviar,fluent-reviewers,flod
Differential Revision: https://phabricator.services.mozilla.com/D156700
2022-09-09 22:38:11 +00:00
Meg Viar
2a8638fb36 Bug 1788231 - Add ability to trigger a button on parent page from Feature Callout CTA and implement for Firefox View: Tab pick up message r=emcminn
Differential Revision: https://phabricator.services.mozilla.com/D156203
2022-09-08 21:50:37 +00:00
Marian-Vasile Laza
dec9aef2c5 Backed out changeset 8c4f4626a3e6 (bug 1788231) for causing bc failures on browser_sma_click_element.js. CLOSED TREE 2022-09-07 00:04:24 +03:00
Meg Viar
6bc9091c7b Bug 1788231 - Add ability to trigger a button on parent page from Feature Callout CTA and implement for Firefox View: Tab pick up message r=emcminn
Differential Revision: https://phabricator.services.mozilla.com/D156203
2022-09-06 20:09:44 +00:00
Cristian Tuns
5f5728da34 Backed out changeset 179824908d2d (bug 1788231) for causing mochitest failures on browser_sma_click_element.js CLOSED TREE 2022-09-02 16:59:41 -04:00
Meg Viar
59445898aa Bug 1788231 - Add ability to trigger a button on parent page from Feature Callout CTA and implement for Firefox View: Tab pick up message r=emcminn
Differential Revision: https://phabricator.services.mozilla.com/D156203
2022-09-02 20:17:49 +00:00
Meg Viar
27b13cf2f2 Bug 1787563 - Second Feature Callout screen is positioned too low r=Mardak
Differential Revision: https://phabricator.services.mozilla.com/D155881
2022-09-01 14:48:40 +00:00
Shane Hughes
b8cc95cfc5 Bug 1787461 - Change Feature Callout's overlap of parent elements to 17px. r=mviar
Feature Callouts are absolute positioned, but their coordinates are calculated
from those of the parent element given by a selector property on the message.
They were originally adjusted to overlap by 15px, but that was changed to
0.15x - y, where x is the parent width/height and y is the callout's arrow size
(12px). But using a scaling factor may cause unexpected results where parent
elements are unusually large, so this patch switches the overlap amount to 17px.
In the future, we could consider adding a property to the schema so that each
feature tour screen can specify an overlap amount to override the default 17px.

Differential Revision: https://phabricator.services.mozilla.com/D155750
2022-08-31 17:53:34 +00:00
Meg Viar
248755e275 Bug 1786647 - Split up Feature Callout messages and fetch from ASRouter on page load, focus, and screen advance r=Mardak
Differential Revision: https://phabricator.services.mozilla.com/D155524
2022-08-31 16:09:26 +00:00
Meg Viar
f608e67d28 Bug 1787387 - No feature callout tour shown if tab sync is already set up r=Mardak
Differential Revision: https://phabricator.services.mozilla.com/D155743
2022-08-30 15:00:26 +00:00
Sandor Molnar
8aaea79f98 Backed out changeset 225b8bbe0912 (bug 1786647) for causing browser-chrome failures in toolkit/components/messaging-system/schemas/TriggerActionSchemas/test/browser/browser_asrouter_trigger_docs.js CLOSED TREE 2022-08-30 01:43:39 +03:00
Meg Viar
91ba440ce8 Bug 1786647 - Split up Feature Callout messages and fetch from ASRouter on page load, focus, and screen advance r=Mardak
Differential Revision: https://phabricator.services.mozilla.com/D155524
2022-08-29 20:19:16 +00:00
Csoregi Natalia
591eeff1af Backed out changeset ba0784c1646a (bug 1786647) for fxms failures. CLOSED TREE 2022-08-29 19:51:17 +03:00
Meg Viar
4f744927cf Bug 1786647 - Split up Feature Callout messages and fetch from ASRouter on page load, focus, and screen advance r=Mardak
Differential Revision: https://phabricator.services.mozilla.com/D155524
2022-08-29 16:18:42 +00:00
criss
351bc28d66 Backed out changeset 56ba242e0732 (bug 1786647) for causing python fxms failures . CLOSED TREE 2022-08-29 17:14:11 +03:00
Meg Viar
605bbe0b26 Bug 1786647 - Split up Feature Callout messages and fetch from ASRouter on page load, focus, and screen advance r=Mardak
Differential Revision: https://phabricator.services.mozilla.com/D155524
2022-08-29 13:29:31 +00:00
Shane Hughes
16d1998b3f Bug 1783070 - Use safe navigators for About Welcome window functions. r=mviar
Update About Welcome's invocations of window functions to use optional
chaining to avoid errors when they are undefined. Then, the surfaces
that load the About Welcome bundle will no longer need to define those
references as empty functions.

Differential Revision: https://phabricator.services.mozilla.com/D155011
2022-08-26 21:43:54 +00:00
Meg Viar
e53110046b Bug 1782524 - Reposition Feature Callout if it overlaps parent element by more than 15% r=Mardak
Differential Revision: https://phabricator.services.mozilla.com/D154649
2022-08-24 18:24:15 +00:00
Csoregi Natalia
72f77aa504 Backed out changeset 50e2770d7b30 (bug 1782524) for causing failures on browser_feature_callout.js. 2022-08-22 03:40:54 +03:00
Marian-Vasile Laza
37011bfaa3 Backed out changeset 50e2770d7b30,1d022fd2c075 (Bug 1782524) for causing bc failures on browser_feature_callout.js CLOSED TREE 2022-08-20 15:38:14 +03:00
Norisz Fay
2baca5d6f0 Backed out changeset 1d022fd2c075 (bug 1782524) for causing bc failures on browser_feature_callout.js CLOSED TREE 2022-08-20 00:51:40 +03:00
Meg Viar
1e7fc084d0 Bug 1782524 - Reposition Feature Callout if it overlaps parent element by more than 15% r=Mardak
Differential Revision: https://phabricator.services.mozilla.com/D154649
2022-08-19 20:17:41 +00:00
Cosmin Sabou
0d2280ec2c Backed out changeset 5cbf8bf85c77 (bug 1782524) for bc failures on browser_notification_dot.js. CLOSED TREE 2022-08-19 20:29:56 +03:00
Meg Viar
86f134a489 Bug 1782524 - Reposition Feature Callout if it overlaps parent element by more than 15% r=Mardak
Differential Revision: https://phabricator.services.mozilla.com/D154649
2022-08-19 14:17:15 +00:00
Cristian Tuns
fcb7f84123 Backed out changeset ef1b76817c3b (bug 1783070) for causing node failures CLOSED TREE 2022-08-18 20:43:05 -04:00
Shane Hughes
f6c241fc50 Bug 1783070 - Use safe navigators for About Welcome window functions. r=mviar
Update About Welcome's invocations of window functions to use optional
chaining to avoid errors when they are undefined. Then, the surfaces
that load the About Welcome bundle will no longer need to define those
references as empty functions.

Differential Revision: https://phabricator.services.mozilla.com/D155011
2022-08-19 00:06:40 +00:00