User navigation fix and error handling #1014
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request Description
This PR has a couple of fixes for issues related to navigation.
First, I noticed that our regexes for communities were accidentally matching a particular username syntax, like this:
/u/[email protected]
, because we were essentially looking foranything@anything
. With this fix, if the community checker parses a name starting with/u/
, it will be ignored.Secondly, I added some error handling around the community navigation page. While we're now less likely to get into this error scenario, it would still be nice to know if the navigation is failing because we are trying to load a community we can't find, so now there is a snackbar indicating when a community load fails.
Issue Being Fixed
Issue Number: Could possibly be related to #1006.
Screenshots / Recordings
This video demonstrates the new error handling prior to fixing the community detection. This would clue us in that we're trying to load this user as a community, and something else is wrong to be investigated!
nav1.mp4
This video demonstrates the correct user navigation after applying the community detection fix.
nav2.mp4
Checklist
semanticLabel
s where applicable for accessibility?