Add a mechanism for producing a static version of about:home periodically that can be cached for startup.
Categories
(Firefox :: New Tab Page, task, P2)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox77 | --- | fixed |
People
(Reporter: mconley, Assigned: mconley, NeedInfo)
References
(Blocks 1 open bug)
Details
Attachments
(3 files)
react-dom-server allows one to take some React components and a state, and generate static mark-up that can be rendered by the browser. The React client libraries then know how to attach to these static mark-up, and "hydrate" it with more up-to-date state as it comes down.
A major component of bug 1614351 is to try to take the dynamically computed about:home, and render it to a string that can be flushed to the disk to be read on start-up. react-dom-server seems well suited to this, despite the fact that it was designed to run in server environments.
So a few things that we'd need to do here:
- Is it possible to run
react-dom-serverin the browser environment? Even better, can it run in a Worker? - Are there any license restrictions or security concerns that would prevent us from bringing
react-dom-serverinto the tree and relying on it?
I believe the Activity Stream attempted to do this a few years ago, so I'm interested in hearing about the challenges they ran into during the first attempt.
Comment 1•5 years ago
|
||
Marking as P2 to get it prioritized. Let us know if you'd like to P it differently depending on how you're organizing this work. Thanks!
:mconley - do you mind if we assign this bug to you so that it cleans up our triage/bug process for New Tab component?
| Assignee | ||
Comment 2•5 years ago
|
||
Yeah, I'll take this.
| Assignee | ||
Comment 3•5 years ago
|
||
It turns out that we already have react-dom-server in tree:
unfortunately, I don't think we can repurpose the current DevTools one, and we'll need to vendor in a distinct copy for about:home. See bug 1618001 about how we can have a single copy of the React libraries across the tree.
In the meantime, I'm going to re-purpose this bug. We know we can have react-dom-server in the tree. This bug will now be about landing it in-tree, and using it to construct a static document that can be cached using the mechanism introduced in bug 1621032.
| Assignee | ||
Comment 4•5 years ago
|
||
| Assignee | ||
Comment 5•5 years ago
|
||
Depends on D68092
| Assignee | ||
Comment 6•5 years ago
|
||
Depends on D68093
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
| Assignee | ||
Comment 7•5 years ago
|
||
ni?ing k88hudson for https://phabricator.services.mozilla.com/D68092#2107689
| Assignee | ||
Comment 8•5 years ago
|
||
ni?ing Scott for https://phabricator.services.mozilla.com/D68094#2155627.
Comment 10•5 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/8bf3fe111c40
https://hg.mozilla.org/mozilla-central/rev/7ec776d31a2c
https://hg.mozilla.org/mozilla-central/rev/626dd2a045af
Comment 11•5 years ago
|
||
I provided the need-info directly to mconley in slack iirc.
Description
•