Repository navigation
fix: pass @resource to ExtensionCard on the purchased page - #40
Merged
Merged
Conversation
purchased.hbs passed @extension, but ExtensionCard reads @resource, so every purchased card rendered with no name or icon, a Free badge, an empty Last Modified, and a click handler that dereferenced undefined. Also fix the card's footer, which read @extension.description and so never showed a description on any page, and rename the misspelled onExtenstionUpdated action to the onExtensionUpdated name its did-update modifier binds.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
addon/templates/purchased.hbsrendered<ExtensionCard @extension={{extension}}>, butExtensionCardreads@resource(the explore, category and developer extension pages all pass@resource). On/extensions/purchasedevery card showed no name or icon, a "Free" badge and an empty "Last Modified" (seen in console v0.7.68). Clicking a card would also fail, since the component setsthis.extensionfromresource.Changes
purchased.hbs: pass@resource={{extension}}; the yielded "Installed" badge is unchanged.extension-card.hbs: the footer read@extension.description, so no card on any page showed a description. It now reads@resource.description.extension-card.js: rename theonExtenstionUpdatedaction toonExtensionUpdated, the name the template's{{did-update}}binds. Before this, the modifier receivedundefinedand would throw if@resourcechanged.installed.hbsrenders its own markup and doesn't useExtensionCard. No other callers pass@extension.Not built or tested locally; relying on CI.