Closed Bug 1842662 Opened 1 year ago Closed 1 year ago

Update snippets / highlights component to receive data from ShoppingContainer

Categories

(Firefox :: Shopping, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
117 Branch
Tracking Status
firefox117 --- fixed

People

(Reporter: amy, Assigned: amy)

References

Details

(Whiteboard: [fidefe-shopping])

Attachments

(1 file)

In bug 1841086 we created a component to pass data from the API to UI components, highlights.mjs needs to add a new property for highlights data.

we can update ReviewHighlights in highlights.mjs to accept the highlights data object from the API by updating it's properties:

class ReviewHighlights extends MozLitElement {
  static properties = {
    highlights: { type: Object }
  }

which then allows shopping-container.mjs to pass the highlights property to it.

So in highlights.mjs we can do something like,

	render() {
		return html`
		// html stuff here
		// function to tidy up data and generate smaller UI bits
		${this.createHighlightsTemplate(this.highlights)}
	  }

then this.highlights is passed to highlights.mjs in shopping-container.mjs via:

	render() {
		return html`
		<review-highlights highlights=${this.highlights}></review-highlights>
		`
	  }
Assignee: nobody → achurchwell
Depends on: 1841086
Whiteboard: [fidefe-shopping]
See Also: → 1844112
Attachment #9344306 - Attachment description: WIP: Bug 1842662 - update highlights component to receive data from ShoppingContainer. r=#shopping-reviewers → Bug 1842662 - update highlights component to receive data from ShoppingContainer. r=#shopping-reviewers
Pushed by achurchwell@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e8835158ccf9 update highlights component to receive data from ShoppingContainer. r=shopping-reviewers,Gijs
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 117 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: