Fix KV Version History queryParams on the component LinkedBlock #12079
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.
The bug: Originally
versions.hbs
was calling the componentListItem
(which passes params through to LinkedBlock) using an ember helperquery-params
. However, there appear to be some issues with this helper—see the issue here. (As an aside I could not find solid Ember documentation on this helper and suspect though we use it in other places in the app, it's not something we should continue to use). Because of this, the actual query param?version=X
was not be amended onto the params object that made its way here. Thus thetransitionTo
method was borked.How I fixed it: The
LinkedBlock
component was previously setup to handlequeryParams
by passing in the object directly. We followed this pattern and it fixed the bug. Additionally, I added test coverage and documentation on LinkedBlock so it would be a little easier to understand how to use it.Bug before to reproduce you have to click on the linkedblock. there is another nested link in the block that works. to hit it, just click on the edges of the block, away from the text.
Fixed bug