Skip to content
skermes edited this page Mar 27, 2013 · 1 revision

The routes that a user will ever see show up in the URL bar of their browser. These need to be handled by the Backbone Router object and by Rails.

/ Root page. Picks appropriate topic and conversation to display.

/conversation/conversation-title-as-url-slug/12 Conversation with ID 12. The slug isn't involved in determining the conversation object to retrieve from the backend, it's just there for user-friendliness. If the title has changed since the URL was created, Backbone should pushState the correct slug in (with {silent: true}).

/conversation/slug/12#message5135 Message 5135. If the message has been moved from conversation 12, this should redirect/pushState the correct URL. Note that the message doesn't get a full route of its own to underscore the fact that they aren't a first-class resource - conversations are.

/topic/topic-title-as-url-slug/41 Topic with ID 41. Picks appropriate conversation to display. Slug is treated like the slug in conversation route.

/profile User's profile/settings page.

/admin Admin page for admins.

Note that some routes (like /topic) display more specific information than is contained in the URL. These URLs should remain in the URL bar until the user clicks on a more particular item in the UI (like selecting a conversation or particular message), at which point the URL should get pushStated to that item's URL.

Experimental

I haven't thought these through or tried implementing them. Feedback?

/admin/ux/view-name UI testing page for a particular Backbone View. I'm not sure what granularity these are going to have, or if this is the right way to do it. We also don't want to expose these to users, and I'd prefer to not have them cluttering up our Router.

Clone this wiki locally