Redirect to a visible config page if the current one doesn't exist.

Review Request #7355 — Created May 29, 2015 and submitted — Latest diff uploaded

Information

Djblets
release-0.8.x
7cf9ecb...

Reviewers

On a config forms page, if the selected page doesn't exist (for example, if it
decides it should hide itself), the view would end up showing the nav and
nothing else. This is kind of a crummy experience, especially in the case where
the user was on one page but then it decided to hide itself.

This change adds a check to make sure we're trying to navigate to a visible
page, and if not, will select the first one in the list.

Used this with a config page that would hide itself when requested. Instead of
saving and then showing an empty page, it saves and then shows the first page
in the nav.

    Loading...