HugoGresse / open-feedback

Open Feedback is an opened SaaS platform destined to organisers to gather feedback from users. OpenFeedback
https://openfeedback.io
GNU Affero General Public License v3.0
106 stars 16 forks source link

Make urls prettier using a slug instead of ids #535

Open martinbonnin opened 4 years ago

martinbonnin commented 4 years ago

It would be nice to have pretty urls:

For an exemple:

https://openfeedback.io/fraug/meetup-de-mars

instead of:

https://openfeedback.io/fraug1/2020-03-18/T8TKoqFcsVo0ugLVgSXl

That would make it easier to remember and link the urls.

HugoGresse commented 4 years ago

I believe changing an event id shouldn't be complicated, some logic as already been done for the "project/event" id.

HugoGresse commented 4 years ago

Quick update as of today:

  1. Event custom id is possible when creating a new event below the event name (and only when creating it)
  2. If all talks don't have startTime, the talk url will look like openfeedback.io/eventid/0/talkId

The only missing part is the custom talk id though it is possible to achieve that using the JSON or Hoverboard event type where the id is given by the external db.

It seems weird to have a choosable talk id, do you think having just an incremental number starting from 1 as the id is ok?

martinbonnin commented 4 years ago

Ideally, it would be great to have another level of indirection. A table that maps from a slug to the talkId and remembers when the slug changes so that it can redirect:

https://openfeedback.io/fraug1/2020-03-18/le-point-sur-les-applis-covid => talkId0
https://openfeedback.io/fraug1/2020-03-18/lancement-android-11 => talkId1
// Now we decide to change the title of talkId1
https://openfeedback.io/fraug1/2020-03-18/android-11-all-the-things => still uses talkId1 behind the scenes. 
// Extra points for making https://openfeedback.io/fraug1/2020-03-18/lancement-android-11 redirect to the new slug

It might not be easy to do though 😁