pushy icon indicating copy to clipboard operation
pushy copied to clipboard

Update pushy to allow SPA apps w/ URI fragments.

Open ieure opened this issue 7 years ago • 9 comments

Here's a SWAG at how I think this should work. It's passed an extremely rigorous test suite, by which I mean it wasn't completely broken when I tried it on my laptop exactly once.

re #14

ieure avatar Nov 22 '16 05:11 ieure

The tests didn't even run at all on Travis although it confusing says it passed. I suggest you take a look at errors from the build.

You'll also need to add tests for the new functionality. So we can see how the new functionality works and so we don't regress in the future.

Thanks!

thomasmulvaney avatar Dec 13 '16 12:12 thomasmulvaney

I'm happy to do this, but can you please take a look at the overall approach and give me feedback on that?

I've had occasions where I've gone to great lengths, including printing out a contributor agreement, signing it, getting my employer to sign it, and physically mailing it out, only to be told that there was no chance the changes or anything like them would ever be accepted. So I'd like to get opinions on the actual changes before investing effort that's ultimately wasted.

ieure avatar Dec 14 '16 16:12 ieure

Overall I like the approach. My only issue so far is that the new-history has lost its 0-arity version. I like that path-prefix is passed in via the options map.

Thanks for working on this. Hope you can make it work!

thomasmulvaney avatar Dec 15 '16 11:12 thomasmulvaney

I'd like to see this merged, too. Is the only remaining issue the now missing 0-arity new-history? That seems like a trivial change. Happy to make it if it unblocks this PR.

solussd avatar Feb 01 '17 16:02 solussd

As mentioned earlier, the approach looks good but needs tests. Travis has green lighted, but the CLJS failed to build: https://travis-ci.org/kibu-australia/pushy/builds/177871223

thomasmulvaney avatar Feb 01 '17 16:02 thomasmulvaney

Okay, so. I spent literally hours of my weekend trying to make a test that passed, but I'm out of time and patience. I fixed a couple issues & added tests for some things, but the async test of dispatch etc refuses to pass. I think it might not be possible, since secretary's config is global, but the core & hash-based tests run at the same time.

ieure avatar Feb 27 '17 05:02 ieure

There's a non-passing test if someone wants to figure out how to wrangle this mess. Or I can remove it, leaving the tests for the new things I added, which are in the existing core tests.

ieure avatar Feb 27 '17 05:02 ieure

This approach forces a choice between fragment navigates and html5 navigates. If the flag is not set, pushy should let the native event through unhandled (no dispatch). It should not drop the event.

dustingetz avatar Jul 18 '17 16:07 dustingetz

Is #25 a simpler fix?

dijonkitchen avatar Aug 08 '18 16:08 dijonkitchen