The first commit allows to lazy-load the diagrams, which should improve the loading time of the CS API on mobile. In the process it also improves the alt text of the images.
The second commit serves the diagrams as high-resolution WebPs. Encoding a high resolution diagram as WebP gives a file of approximately the same size as the lower resolution PNG. For maximum compatibility we also serve them as a lower resolution WebP and a fallback PNG. WebP was chosen because it is one of the export formats of draw.io/diagrams.net, and it is widely available in modern browsers.
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
The `<>` delimiters are not necessary for the shortcode to be rendered inline, and in some cases they break some expectations: a shortcode that is separated from other text to be in its own paragraph is not actually wrapped by a `p` element, breaking the spacing between paragraphs.
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
* Fix ToC for room versions pages
Like for the cs-module shortcode, use .RenderShortcodes
instead of .Content for the rver-fragment shortcode,
so the headings are detected by Hugo.
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
* Change the way "this version" is detected in added-in and changed-in shortcodes
Now that we use .RenderShortcodes in the rver-fragment shortcode,
we cannot remove the output of these shortcodes dynamically
because they are replaced by a temporary placeholder due to Hugo's internals.
Instead, since the `this` parameter was only used for room version,
we always use the `v` parameter and compare with the version
provided in the page's front matter.
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
* Add changelog
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
* Add version front matter for v11
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
* Update changelogs/room_versions/newsfragments/1884.clarification
---------
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
Co-authored-by: Travis Ralston <travpc@gmail.com>
* Allow to specify a prefix for generated HTML IDs of API endpoints
Allows to deduplicate IDs of duplicate endpoints
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
* Add changelog
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
---------
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
* Include method in all API endpoint children's IDs
Avoids duplicate IDs for object of endpoints
that use the same path but a different method.
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
* Differentiate API endpoints' request and response children's IDs
Ensures that the objects have a unique ID compared to other parts of the endpoint.
Mostly useful for the Error type that can be used for responses with different status codes.
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
* Differentiate the names of both SessionData formats
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
* Add changelog
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
---------
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
* Add tr as child of thead in HTML tables
It is invalid HTML for th to be the direct children of thead
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
* Remove unnecessary HTML code end tag
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
* Avoid nesting p HTML elements
A p HTML element cannot contain other block elements,
so the "parent" element is closed when the first "child" one is opened.
We need to use Page.RenderString with options
to force Hugo to keep the wrapping p elements
even if the content contains a single paragraph.
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
* Add missing HTML details end tags
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
* Replace HTML a self-closing tag with start and end tags
The a element start and end tags are mandatory.
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
* Replace obsolete HTML name attribute with id
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
* Add changelog
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
* C2S: Deprecate now-legacy endpoints
* C2S: Fix MXC URI code block while we're here
* C2S: Describe the authentication and deprecation requirements
* C2S: Intro the upload/download endpoints differently
* C2S: Literally copy/paste the `content-repo.yaml` spec
* C2S: Drop `/upload` and `/create` because we aren't replacing them today
* C2S: Fix notes while we're here
* C2S: Update metadata for new endpoints
* C2S: Add authentication to new endpoints
* C2S: Drop `allow_remote` and `allow_redirect` on new endpoints
* C2S: Append backwards compatibility notes
* C2S: Decorate old media endpoints with pointers to the new ones
The server-server spec might have a harder time linking to these, but that can be fixed with verbiage.
* C2S: Annotate IdP icon spec with media auth implications
* S2S: Modernize section text
* S2S: Create content repository API
This is largely a copy/paste of the new authed content repo API in the Client-Server API, though some keywords (like "client") have been changed. Paths and response formats have also been changed to support the federation-specific requirements.
* C2S & S2S: Add plethora of changelogs
* Reference RFC 1341
* Upgrade keywords in changed text
* Mention caching
* Cross-reference IdP icons
* Update content/client-server-api/modules/content_repo.md