Create asrouter-newtab-multistage component that allows for embedding multistage messages inline in newtab
Categories
(Firefox :: Messaging System, enhancement, P1)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox152 | --- | fixed |
People
(Reporter: mconley, Assigned: mconley, NeedInfo)
References
()
Details
Attachments
(7 files, 1 obsolete file)
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
132.43 KB,
image/png
|
Details |
about:welcome has these really nice multistage messages via the MultiStageAboutWelcome component. I'd like to try adapting this component so that it's less tied to about:welcome, and can be embedded in about:newtab.
I spoke to emcminn and aminomancer and got a high-level okay to dig into this, since part of this is moving a bunch of React component definitions out from browser/components/aboutwelcome to browser/components/asrouter instead.
| Assignee | ||
Comment 1•4 months ago
|
||
pdahiya also expressed interest in what I'm doing here.
| Assignee | ||
Comment 2•4 months ago
|
||
The default value for importModule was an inline arrow function defined
inside the component's parameter list. JavaScript creates a new function
object each time the component renders, so React's useEffect dependency
comparison always saw importModule as changed, running the effect's
cleanup (which tears down the custom element or unmounts the React
bundle) followed by a full reload on every parent re-render.
Hoisting the default to a module-level constant gives it a stable
identity across renders, so the effect only re-runs when type or
components actually change.
| Assignee | ||
Comment 3•4 months ago
|
||
| Assignee | ||
Comment 4•4 months ago
|
||
| Assignee | ||
Comment 5•4 months ago
|
||
| Assignee | ||
Comment 6•4 months ago
|
||
| Assignee | ||
Comment 7•4 months ago
|
||
| Assignee | ||
Comment 8•4 months ago
|
||
| Assignee | ||
Comment 9•4 months ago
|
||
Notably, New Tab stories must be disabled in order for this message to appear, but otherwise, kinda incredibly, this seems to work.
Updated•4 months ago
|
Updated•4 months ago
|
Updated•4 months ago
|
Updated•4 months ago
|
Updated•4 months ago
|
Updated•4 months ago
|
Updated•4 months ago
|
Updated•4 months ago
|
| Assignee | ||
Comment 10•4 months ago
|
||
To help unblock / avoid bitrotting other patches under browser/components/aboutwelcome and browser/components/asrouter, I'm going to attempt to land the first 3 reviewed patches, which move a bunch of things around in preparation for the multistage message component.
Comment 11•4 months ago
|
||
Comment 12•4 months ago
|
||
Comment 13•4 months ago
|
||
Backed out for causing node newtab failures
Backout link: https://hg.mozilla.org/integration/autoland/rev/72a4c8a3af4531669d09bd16195f8ed14c1aa13e
Comment 14•4 months ago
|
||
Comment 15•4 months ago
|
||
| bugherder | ||
| Assignee | ||
Updated•4 months ago
|
Comment 16•4 months ago
|
||
Comment 17•4 months ago
|
||
Comment 18•4 months ago
|
||
Backed out for causing bc failures @browser_asrouter_newtab_multistage_messages.js.
Comment 19•4 months ago
|
||
Comment 20•4 months ago
|
||
Comment 21•4 months ago
|
||
Backed out for causing bc failures @browser_parsable_css.js.
Comment 22•4 months ago
|
||
Comment 23•4 months ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/c6523682d936
https://hg.mozilla.org/mozilla-central/rev/11815a141575
https://hg.mozilla.org/mozilla-central/rev/98c68a74e7d1
Updated•3 months ago
|
Description
•