Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure transition.abort() works properly for query param only transitions. #293

Merged
merged 2 commits into from
Jul 20, 2020

Conversation

richgt
Copy link
Contributor

@richgt richgt commented Jul 17, 2020

@richgt richgt force-pushed the richgt/handle-aborted-qp-transition branch from 8da70ea to a4bb230 Compare July 17, 2020 19:01
Copy link
Collaborator

@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.

Can you add a previously failing test (to make sure we don't regress in the future)?

@rwjblue rwjblue added the bug label Jul 17, 2020
@richgt
Copy link
Contributor Author

richgt commented Jul 17, 2020

Can you add a previously failing test (to make sure we don't regress in the future)?

Yup. In the plans, trying to work through figuring out if everything actually works first :-D.

@rwjblue
Copy link
Collaborator

rwjblue commented Jul 17, 2020

I think either a new test similar or a modification of this test would work:

https://github.com/tildeio/router.js/blob/master/tests/router_test.ts#L1416-L1501

router.updateURL = function(updateUrl) {
url = updateUrl;
if (!initial) {
assert.ok(false, 'updateURL should not be called');
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@rwjblue - I was looking for something like currentURL(), but being in router.js, couldn't really find it, so this was the best I could come up with. If you have other ideas I'm certainly open. This does fail without the fix and pass with it.

@richgt richgt force-pushed the richgt/handle-aborted-qp-transition branch from 1ef9a3b to 3163b0d Compare July 19, 2020 23:28
@richgt richgt requested a review from rwjblue July 20, 2020 20:27
tests/router_test.ts Show resolved Hide resolved
tests/router_test.ts Outdated Show resolved Hide resolved
tests/router_test.ts Outdated Show resolved Hide resolved
@richgt richgt force-pushed the richgt/handle-aborted-qp-transition branch 3 times, most recently from 3a04795 to 68ca41e Compare July 20, 2020 21:14
tests/router_test.ts Outdated Show resolved Hide resolved
@richgt richgt force-pushed the richgt/handle-aborted-qp-transition branch from 68ca41e to e2780dc Compare July 20, 2020 21:21
Copy link
Collaborator

@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.

Thanks @richgt!

@rwjblue rwjblue merged commit ca25143 into tildeio:master Jul 20, 2020
@rwjblue rwjblue changed the title Update queryParamsTransition to not change QueryParams if transition has been aborted Ensure transition.abort() works properly for query param only transitions. Jul 20, 2020
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.

2 participants