Backbone Routing doesn't support query arguments as parseable route components. WordPress uses them extensively, so it'd be worthwhile to support them in wp-backbone.js for ease of use.
|Reported by:||matveb||Owned by:|
We currently have a few pieces of wp-admin relying on Backbone. One issue is that we cannot use pushState navigation with GET params natively from Backbone's routing system, and WordPress uses them extensively.
The current approaches at solving this complicate the code unnecessarily, and mostly miss the chance of using events to handle location changes on the front end. (Basically, the routing system becomes blind to location changes.)
We should instead extend Backbone.History to support basic query type fragments as routes so we can natively use
route:events instead of the way we are handling it now — parsing the URL with PHP and sending the values to localize_script and triggering stuff blindly.
Instead of hacking solutions every time we do a Backbone implementation, let's provide some helper code from
Revisions and Themes would benefit greatly from it and the simplified code. Any subsequent Backbone implementation on the admin would also be able to easily register ?param=value routes.