fix(map): invoke leaflet-tile-url instead of passing it by name - #320
Merged
Conversation
Opening a place's details threw "A resolved helper cannot be passed as a named argument" and the details tab failed to render. The tile layers passed the helper bare, as @url={{leaflet-tile-url}}, which Glimmer reads as ambiguously a reference or an invocation and refuses. They invoke it now, as @url={{(leaflet-tile-url)}}. The same line was in the zone and service area details and the place details and point map modals, all from the configurable tile provider change (a5a4f1c), so each of them failed the same way. The helper's own usage comment showed the broken form and is corrected.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## release/v0.6.66 #320 +/- ##
===================================================
Coverage 100.00% 100.00%
Complexity 10274 10274
===================================================
Files 545 545
Lines 39684 39684
===================================================
Hits 39684 39684
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
What
Opening a place's details throws, and the details tab doesn't render:
The map's tile layer passed the
leaflet-tile-urlhelper by name,<layers.tile @url={{leaflet-tile-url}} />. With no arguments, Glimmer can't tell whether that means pass the helper or call it, so it refuses and the whole template fails. It is now called in parentheses,@url={{(leaflet-tile-url)}}.Where
The same line was in five templates, all from the configurable tile provider change (a5a4f1c), so each failed the same way:
place/details.hbs, the reported onezone/details.hbsservice-area/details.hbsmodals/place-details.hbsmodals/point-map.hbsIt has shipped in every release since, v0.6.62 through v0.6.65, so this targets the
release/v0.6.66branch (#321).The helper's own usage comment showed the broken form. It now shows the invocation and says why.
Validation
{{leaflet-tile-url}}is left in the addon's templates. The calls that passtheme=were never affected, because an argument makes it an unambiguous invocation.Not checked in a browser.