Merge ~andersson123/autopkgtest-cloud:fix-package-page-nonexistent-package into autopkgtest-cloud:master
Status: | Merged | ||||
---|---|---|---|---|---|
Merged at revision: | 133ca4c30253ec85868f957d19a9686b7a821db7 | ||||
Proposed branch: | ~andersson123/autopkgtest-cloud:fix-package-page-nonexistent-package | ||||
Merge into: | autopkgtest-cloud:master | ||||
Diff against target: |
138 lines (+64/-30) 4 files modified
charms/focal/autopkgtest-web/webcontrol/browse.cgi (+6/-1) charms/focal/autopkgtest-web/webcontrol/templates/browse-package.html (+40/-21) charms/focal/autopkgtest-web/webcontrol/templates/browse-results.html (+12/-8) charms/focal/autopkgtest-web/webcontrol/templates/macros.html (+6/-0) |
||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Skia | Approve | ||
Brian Murray | Needs Fixing | ||
Review via email:
|
Commit message
fix: web: Don't show package pages for packages that don't exist
This commit changes the behaviour when a user tries to reach a package
or results page for a package that doesn't exist.
The results page used to throw an error stating that the package doesn't
exist, however, I think this is slightly innaccurate - the package could
exist, but we could just have no test results for it. This is infact
not really, an error, and not something we should surface *as* an error.
The behaviour, with this commit, is as follows:
On the results and package pages, if the user goes to one of these pages
for a package that doesn't exist, they get the following message:
```
Oops! Looks like this package has no previous results. The package
itself may not exist - you can check by clicking the Launchpad icon.
```
I think this is better because, a, we are no longer throwing an error,
and b, because the user can now validate the package exists by clicking
on the Launchpad icon.
Overall I think this is just an accurate representation of all the
potential possibilities when going to either of these pages with an
"invalid" package name.
There is the possibility of checking if the package exists via
Launchpad, but that'd be an http request to Launchpad every time a user
views a package or results page, which is a waste of resources, and
seems unnecessary.
Fixes bug LP: #2058059
Description of the change
This MP changes the message we surface to users when they request a package or results page for an "invalid" package, and no longer surfaces it as an error, but instead with a verbose message about the two possibilities in this scenario.
Overall, it's a small change for improved UX. It's low priority but worth taking a look at.
Looking good!