Page parent component to connect API data to UI components
Categories
(Firefox :: Shopping, task, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox117 | --- | fixed |
People
(Reporter: jhirsch, Assigned: amy)
References
Details
(Whiteboard: [fidefe-shopping])
Attachments
(1 file)
Some details still TBD, but as a summary, we need a top-level component in the sidebar page that fetches data and passes the data to individual UI components.
Background info: right now, we haven't set up Actor messaging yet, instead we're communicating the product URL down to the sidebar shopping.html page by setting its URL, which triggers the shopping page to reload.
For example, if the user navigates to https://www.amazon.com/FEZIBO-Height-Adjustable-Electric-Standing/dp/B099ZTMGYQ, then the parent process code sets the shopping html page's URL to chrome://...stuff.../shopping.html?url=https://www.amazon.com/FEZIBO-Height-Adjustable-Electric-Standing/dp/B099ZTMGYQ
. This is available to the code inside the shopping page as its window.location
.
Here's what the topmost component needs to do for this bug:
- initialize when the page loads
- get the product URL from the query string in the shopping page's
window.location
- pass the product URL to the API, using the ShoppingProduct toolkit component, and pull back data
- when data comes back, render the individual UI components, propagating data down to each by setting properties/attributes
- one basic integration test to verify the whole thing works when the browser's src is set
Some things that can be handled in a followup, and don't need to be done in this bug:
- most of the tests can be handled in a followup, provided it's the very next task
- figuring out how to listen for click events from the components
- fetching data from the ads API (we don't have the ads component yet)
- handling error responses from the API (just worry about the happy path here)
Updated•1 year ago
|
Comment 1•1 year ago
|
||
As there's no assignee, setting to P2 per observation of other Shopping bugs.
Assignee | ||
Updated•1 year ago
|
Assignee | ||
Comment 2•1 year ago
|
||
Updated•1 year ago
|
Comment 4•1 year ago
|
||
Backed out changeset d5791243ac7a (bug 1841086) for causing bc failures at browser_review_highlights.js and browser_all_files_referenced.js
Backout: https://hg.mozilla.org/integration/autoland/rev/4fd18468fd13158ed8e78d7d0efb553f43cdbb55
Failure logs:
https://treeherder.mozilla.org/logviewer?job_id=422319892&repo=autoland&lineNumber=2757
https://treeherder.mozilla.org/logviewer?job_id=422320604&repo=autoland&lineNumber=5450
Updated•1 year ago
|
Updated•1 year ago
|
Comment 7•1 year ago
|
||
bugherder |
Description
•