Okay/Spec: Difference between revisions

No edit summary
No edit summary
Line 15: Line 15:
}}
}}


'''OKAY'''
'''Okay''' dares to ask the big questions. What if group chat was hypertext? What if discord let you write arbitrary HTML? What if protocols were bad?
 
Okay dares to ask the big questions. What if group chat was hypertext? What if discord let you write arbitrary HTML? What if protocols were bad?


== in summary ==
== in summary ==
Line 64: Line 62:
<pre>
<pre>
<nav class=“ok-discover”>
<nav class=“ok-discover”>
<a href=“/rooms/” rel=“ok-rooms”>Rooms</a>
  <a href=“/rooms/” rel=“ok-rooms”>Rooms</a>
<a href=“/register/” rel=“ok-register”>Registration</a>
  <a href=“/register/” rel=“ok-register”>Registration</a>
<a href=“/prefs/” rel=“ok-prefs”>Preferences</a>
  <a href=“/prefs/” rel=“ok-prefs”>Preferences</a>
</nav>
</nav>
</pre>
</pre>


The discovery element is defined as any element with the “ok-discover” class. Any non-void element can be the discovery element, but it really should be a “nav” if you can help it. The discovery element must contain one or more anchor (a) elements with valid rel and href attributes. Any invalid anchors should be ignored by the client. The inner text of the anchor elements is not significant and must be ignored by clients.
The discovery element is defined as any element with the <code>ok-discover</code> class. Any non-void element can be the discovery element, but it really should be a <code>nav</code> if you can help it. The discovery element must contain a number of anchor (<code>a</code>) elements with valid <code>rel</code> and <code>href</code> attributes. Any invalid anchors should be ignored by the client. The inner text of the anchor elements is not significant and must be ignored by clients.


A list of valid anchor rel attributes and their purposes is described below:
A list of valid anchor <code>rel</code> attributes and their purposes is described below:


Key: <span class="required">◈ Required</span>, <span class="optional>◇ Optional</span>, <span class="multiple">❖ Can be specified multiple times<span>
Key: <span class="required">◈ Required</span>, <span class="optional>◇ Optional</span>, <span class="multiple">❖ Can be specified multiple times
 
{| class="wikitable"
<span class="required">ok-rooms</span> Points to a list of all rooms hosted by the server;
|+
 
|<span class="required">◈</span>
<span class="required">◈ ok-register</span> Points to the server’s registration endpoint;
|<span class="required">'''ok-rooms'''</span>
 
|Points to the server's [[Okay#the directory|room directory]].
<span class="required">◈ ok-prefs</span> Points to the server’s preferences endpoint.
|-
|<span class="required">◈</span>
|<span class="required">'''ok-register'''</span>
|Points to the server’s registration endpoint.
|-
|<span class="required">◈</span>
|<span class="required">'''ok-prefs'''</span>
|Points to the server’s preferences endpoint.
|}


== initiation ==
== initiation ==
Line 92: Line 98:
== profiles ==
== profiles ==
== subscriptions ==
== subscriptions ==
== settings ==