Spectrum: Support human readable thread slugs

Created on 6 Apr 2018  路  6Comments  路  Source: withspectrum/spectrum

We should support human readable thread slugs. Instead of https://spectrum.chat/thread/bedc19a6-f9e5-47b6-9b40-ced2104a6c92 it should be https://spectrum.chat/thread/fr-allow-us-to-like-a-thread-6c92 or something like that.

Feature

Most helpful comment

I'm not sure why you wouldn't want that to be nested routes? What's better about /specfm-programming-is-java-good-asdf123 vs /specfm/programming/is-java-good-asdf123? The second one seems a lot more idiomatic to the web.

seems like a lot of complication for very little benefit versus just leaving the channel out of the url in the first place.

As I showed above, we can't just leave it out. I understand what you mean with /general/ not being very helpful, but it could make a huge difference on the semantics of the slug and what it means. If we tackle this (pretty big) change, let's do it right this time because it'll be very hard to change again.

All 6 comments

I think we can use this pattern
https://spectrum.chat/thread/<community>-<thread-title>.

If anything it should be spectrum.chat/<community>/<channel>/<thread-slug>, right? So it's nested accurately.

Threads can move between channels.

Is the implication here that we shouldn't have the channel in the slug because that can be changed? Channels are nothing but a sub-grouping of threads within the broader grouping of a community, leaving that out of the URL entirely just because they can be moved seems backwards.

For example, it makes a big difference whether the URL for a thread with the title "Is Java good?" is spectrum.chat/specfm/programming/is-java-good-asdf123 or spectrum.chat/specfm/coffee/is-java-good-asdf123.

We will have to handle redirects-on-moves I assume.

Is the implication here that we shouldn't have the channel in the slug because that can be changed?

Yeah, sorry that was the implication. I don't think we should worry about redirects-on-moves, seems like a lot of complication for very little benefit versus just leaving the channel out of the url in the first place.

If we just had a human-readable id like title-of-post-unique-identifier-123 then the following would be improved:

  • inbox: ?t=title-of-post-unique-identifier-123
  • slider: ?thread=title-of-post-unique-identifier-123

And then we could add routing like:
/communityName/thread/title-of-post-unique-identifier-123
and
/communityName/channelName/thread/title-of-post-unique-identifier-123

If the channel is moved, the problem is that we could still technically resolve /communityName/channelName/thread/title-of-post-unique-identifier-123 to the proper thread, but then google would not know what the new canonical url should be for that thread, right?

I think we would improve our SEO overall though by having the human readable id follow the format <community-name>-<human readable thread title>-<unique id>- getting the community name in there will be huge for organic search. Having the channel name in there could help, but would be weird if the channel moves or if you had <community-name>-general-<human-readable-thread-title>-<unique id> because general channel adds no value.

I'm not sure why you wouldn't want that to be nested routes? What's better about /specfm-programming-is-java-good-asdf123 vs /specfm/programming/is-java-good-asdf123? The second one seems a lot more idiomatic to the web.

seems like a lot of complication for very little benefit versus just leaving the channel out of the url in the first place.

As I showed above, we can't just leave it out. I understand what you mean with /general/ not being very helpful, but it could make a huge difference on the semantics of the slug and what it means. If we tackle this (pretty big) change, let's do it right this time because it'll be very hard to change again.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

flaki picture flaki  路  5Comments

ArturKlajnerok picture ArturKlajnerok  路  7Comments

brianlovin picture brianlovin  路  5Comments

mxstbr picture mxstbr  路  5Comments

mattgaunt picture mattgaunt  路  4Comments