browse: Improve display of 404 errors for content and directory
When trying to browse a content or a directory in another object context (snapshot, revision, directory), if the targetted object can not be found (for instance after changing the current branch in a snapshot) display a 404 error while keeping display of context related UI to ease the navigation.
Also improve the displayed error message when a directory entry with a given path can not be found from a root directory.
To better understand the introduced changes, below are some illustrative screenshots.
Previously when an object could not be found when changing context (for instance when changing the current branch of a snapshot), a plain 404 error page was displayed and the current browsing context UI was not displayed anymore.
With the changes in that diff, the 404 error will now be rendered while keeping the browsing context UI to continue navigation without having to use the browser history.
The previous examples was related to snapshot context browsing but the same behavior has also been implemented for revision and directory context.
Closes #2353 (closed)
Migrated from D4639 (view on Phabricator)