Skip to content

[BUGFIX beta] provide transition to setupContext for internal transit…#308

Merged
rwjblue merged 2 commits intoemberjs:masterfrom
rreckonerr:fix/provide-transition-object-for-internal-transitions
Nov 6, 2020
Merged

[BUGFIX beta] provide transition to setupContext for internal transit…#308
rwjblue merged 2 commits intoemberjs:masterfrom
rreckonerr:fix/provide-transition-object-for-internal-transitions

Conversation

@rreckonerr
Copy link
Contributor

…ions

Prior e792f2c we were calling this.setupContext(newState, transition) for intermediate transitions, which got replaced with this.setupContexts(newState). This results in buggy behavior when query params get lost in certain scenarios.

Refs: emberjs/ember.js#14438

Closes emberjs/ember.js#14438 (hopefully)

Copy link
Member

@rwjblue rwjblue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally seems good, but we will need a test (that failed previously, and passes now) in order to confirm and to ensure we don't accidentally regress in the future...

@rreckonerr
Copy link
Contributor Author

@rwjblue Do we need a test case in this repo or in ember.js? I've already checked that this change fixes failing reproduction in ember.js emberjs/ember.js#16986

@rwjblue
Copy link
Member

rwjblue commented Nov 4, 2020

Do we need a test case in this repo or in ember.js?

I'd say both actually.

…ions

Prior emberjs@e792f2c we were calling `this.setupContext(newState, transition)` for intermediate transitions, which got replaced with `this.setupContexts(newState)`. This results in buggy behavior when query params get lost in certain scenarios.

Refs: emberjs/ember.js#14438
@rreckonerr rreckonerr force-pushed the fix/provide-transition-object-for-internal-transitions branch from 26765a3 to 0be0d19 Compare November 5, 2020 13:47
@rreckonerr rreckonerr requested a review from rwjblue November 5, 2020 19:43
@rreckonerr
Copy link
Contributor Author

@rwjblue I've prepared a PR in ember.js repo with failing tests fixed by this PR emberjs/ember.js#19249
Also, I've added a failing test to this PR

@rwjblue
Copy link
Member

rwjblue commented Nov 6, 2020

Awesome, thank you @rreckonerr!

@rwjblue rwjblue merged commit b9ada56 into emberjs:master Nov 6, 2020
@rwjblue rwjblue added the bug label Nov 6, 2020
@rwjblue
Copy link
Member

rwjblue commented Nov 6, 2020

Just released as v7.1.1, would you mind sending an Ember PR with the previously failing test (along with the upgrade)?

@rreckonerr
Copy link
Contributor Author

@rwjblue Cool! Updated PR with the most recent 7.1.1 route.js version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: updating one query param causes the other QP to reset to its default value

2 participants