[wp-trac] [WordPress Trac] #25963: Appearance Themes: Backbone.Router should use pushState with ?query type urls
WordPress Trac
noreply at wordpress.org
Fri Nov 15 16:57:26 UTC 2013
#25963: Appearance Themes: Backbone.Router should use pushState with ?query type
urls
-------------------------+------------------------------
Reporter: matveb | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Appearance | Version: trunk
Severity: normal | Resolution:
Keywords: |
-------------------------+------------------------------
Comment (by adamsilverstein):
Enabling pushState: true removes the hash marks from URLS so we get pretty
URLS like {{{themes.php/theme/twentyeleven}}}. I think the only reason we
were shooting for routes via query parameter like
{{{themes.php?theme=twentyeleven}}} is to match the layout of the
revisions URLS.
According to the Backbone forums ( see
[https://github.com/jashkenas/backbone/issues/2075 here],
[https://github.com/jashkenas/backbone/issues/891 here] and
[https://github.com/jashkenas/backbone/issues/2801 here] ) query args are
now completely ignored by Backbone.Router, and the authors are of the
opinion that client side code shouldn't use query parameters at all.
I tried matching the setup we used in revisions to map the route, but when
using '?' my route is never fired. There are workarounds, and
[https://github.com/jhudson8/backbone-query-parameters this plugin] adds
query args. I think this deserves further discussion: do we really need
query arg route mapping? I think revisions kept the ?revision=ID mapping
originally to match the previous system's URLS - I don't think we have
that need here and I'm inclined to use regular 'path mapping'.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/25963#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list