[wp-trac] [WordPress Trac] #26543: 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.

WordPress Trac noreply at wordpress.org
Wed Dec 11 19:49:57 UTC 2013


#26543: 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.
-------------------------+-----------------------------
 Reporter:  matveb       |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  General      |    Version:  trunk
 Severity:  normal       |   Keywords:
-------------------------+-----------------------------
 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
 {{{wp-backbone.js}}}.

 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.

 Concept: https://cloudup.com/c0ZdVFJ1Sky

--
Ticket URL: <http://core.trac.wordpress.org/ticket/26543>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list