Gracefully handle non-existant tags
You can see all proposals tagged with any given tag at: speakerline.io/tags/
If you visit a page for a tag that doesn't yet exist, you will see the following page:

We need a more graceful way of handling this scenario.
Should the user be directed somewhere else or shown a custom error page?
I see two good options here:
- Use
redirect_back_or_toin the controller if the tag isn't found with the root as a fallback location and display a flash alert that the tag doesn't exist yet- Simpler option with less UX upside
- Create an index page for tags and navigating to a non-existent show page will send you back to the index with a flash alert.
- This one is slightly more work just because we'd have to come up with a tag index design
- More UX upside than then first option because it may help them find the tag they are actually looking for or discover new ones.
WDYT?
Oh hi, @andrewmcodes! 👋🏾
I prefer the second one because of the discoverability aspect you mention! Right now, there's no way to see a complete list of the tags!
To start with the UI could be incredibly simple, i.e. exactly the same as the other list views, with the tag names in alphabetical order?
Working on this one at Hack Day for RailsConf 2024 :)
@hilarysk Great stuff! Thank you!
Just one more addition: if someone attempts to just change the URL to a non-existent tag, we still get a 500. Can we handle that more gracefully? Perhaps with the redirect to the new wonderful index route?
Note: This is going to be handled in PR #571 as that built on top of this PR.