[wp-trac] [WordPress Trac] #35457: Theme installer upload button improvements

WordPress Trac noreply at wordpress.org
Sun May 1 17:16:52 UTC 2016


#35457: Theme installer upload button improvements
-------------------------------------+-------------------------------------
 Reporter:  afercia                  |       Owner:  afercia
     Type:  defect (bug)             |      Status:  assigned
 Priority:  normal                   |   Milestone:  4.6
Component:  Themes                   |     Version:
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch has-           |     Focuses:  ui, accessibility,
  screenshots ui-feedback            |  javascript
-------------------------------------+-------------------------------------

Comment (by afercia):

 I'm sorry this ticket is getting a bit complicated :) Investigated a bit
 about the `upload` route and to see the original behavior before the
 latest changes in 4.4 and 4.5 you should check the Theme Installer on
 WordPress 4.3 or previous versions.


 The `upload` route was added in [27636]. Reading the related ticket the
 only reference I could find is:
 https://core.trac.wordpress.org/ticket/27055#comment:33
 > Add a route listener for ?upload, push ?upload to the url stack.


 By the way, this route uses the `replace` option set to `true` so the URL
 is updated without creating an entry in the browser's history, see
 http://backbonejs.org/#Router-navigate
 This way, while navigating through "Featured Popular Latest Favorites" and
 then clicking on the "Upload Theme" button, the last entry in the history
 gets replaced without creating a new one for "upload". At this point, when
 clicking the browser's "Back" button:
 - the uploader panel stays open
 - history is broken (will skip the last entry)
 Moreover, clicking the "Upload Theme" button to close the uploader panel,
 will remove any route breaking again the browser's history.

 I'd propose to:
 - completely remove the `upload` route
 - let the uploader be just something that expands and collapses above the
 themes list: it's just a part of the UI that gets revealed and it
 shouldn't look like a new page
 - don't hide the themes
 This way, the browser's history will work regardless of the theme uploader
 expanded/collapsed state, not to mention code will be a bit simplified.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/35457#comment:18>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list