• tommycli's avatar
    Settings: Fix Site Details subpage routing · 1e19d86e
    tommycli authored
    Goal is: A site details subpage that's accessible both from /siteSettings/all, /siteSettings/bluetooth, /siteSettings/plugins, etc. (all the categories).
    
    Previous way it was done was: Separate route for each category, so there was /siteSettings/all/details, /siteSettings/bluetooth/details, /siteSettings/plugins/details.
    
    And it relied on a quirk of how settings-animated-pages used to work to coalesce all those routes to a single card.
    
    New way I'm proposing: One single /siteSettings/siteDetails route.
    
    But here are some extra needed changes:
     - settings-animated-pages must slide right / left based on route depth instead of based on .contains()
     - subpage-back button needs to call window.history.back() whenever there is a previous route, even if the previous route doesn't strictly contain the current route.
    
    I think the above two changes are harmless and the new version is overall an improvement.
    
    BUG=637865
    CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation
    
    Review-Url: https://codereview.chromium.org/2249873003
    Cr-Commit-Position: refs/heads/master@{#412605}
    1e19d86e
route.js 11.2 KB