Okay/Sketchbook: Difference between revisions
Created page with "right|frameless Multiple days in a row now I have woken up in a cold sweat having dreamt new Okay markup. I'm writing it here so I can gather feedback and iterate before specifying. I think this is what normal spec writers do already. == Room Directory == === Initial Concept === <syntaxhighlight lang="html"> <main class="ok-rooms"> <h1>Rooms</h1> <p>Here are all the rooms on this server.</p> <ul> <li><a rel="ok-room" href="/roo..." |
No edit summary |
||
(One intermediate revision by one other user not shown) | |||
Line 29: | Line 29: | ||
* Is the section syntax silly | * Is the section syntax silly | ||
* Do we want to require them to be in a list element. | * Do we want to require them to be in a list element. | ||
** In that case, what happens if you put another list INSIDE a list ?????????!!!? | |||
* I had a thought that it would be fun for clients to just load the room directory page inside a little window or something and then when you click one of the rooms it opens it in the client's own interface. You could probably do this as a browser extension actually. | * I had a thought that it would be fun for clients to just load the room directory page inside a little window or something and then when you click one of the rooms it opens it in the client's own interface. You could probably do this as a browser extension actually. | ||
== Pagination == | |||
<syntaxhighlight lang="html"> | |||
<div class="ok-messages"> | |||
<a href="/room/1/page/2" rel="prev">Previous</a> | |||
<!-- messages here --> | |||
<a href="/room/1/page/4" rel="next">Next</a> | |||
</div> | |||
</syntaxhighlight>This is kind of nice because | |||
* It doesn't really require any effort from the client. It's basically just a linked list. | |||
* If there isn't a next page you can just omit it from the output. very HATEOAS | |||
* This is already used by many sites for pagination, so search engines etc understand it. | |||
Thoughts: | |||
* What happens when you want to find a specific message | |||
* Do we want to require each page have an immutable address (I think yes, for caching and so on ([[Okay|Ok]] but then what do we do about deleted messages)) | |||
* What direction do the pages go in. Does the first page have the latest message or the first message. Mulch to consider | |||
** [[Okay]] so I think when you request the room url without specifying a page it should redirect you to the last page (so the page containing the latest message) and then you can continually fetch the previous page to get the backlog. That makes sense i think. |