Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion templates/ecosystem/client.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ <h3>{{ page.title }}<div class="maturity {{ page.extra.maturity | lower }}">{{ p
<ul>
{% for feature, supported in page.extra.features %}
<li {% if supported %}class="supported" {% endif %}>
{{ feature | replace(from="_", to=" ") | title }}
{{ clients::feature_label(feature_name=feature) | trim }}
</li>
{% endfor %}
</ul>
Expand Down
68 changes: 60 additions & 8 deletions templates/macros/clients.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,45 @@
{# Client macros for the Matrix.org website Features Schema (all boolean values):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
{# Client macros for the Matrix.org website Features Schema (all boolean values):
{# Client macros for the matrix.org website Features Schema (all boolean values):

#2966

- e2ee: End-to-end encryption support
- spaces: Matrix Spaces support
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what counts as "support" though?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unclear. This existed before with unclear definition :/

- voip_1to1: 1-to-1 voice/video calls
- voip_jitsi: Jitsi-based group calls
- threads: Threading support
- sso: Legacy Single Sign-On (m.login.sso)
- oidc: Native OIDC/OAuth 2.0 authentication (Matrix Authentication Service, added in spec 1.15)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure about namedropping MAS since that's just an implementation. link to spec if clarification necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well it is the one thing most people seem to know it by. I agree with linking to spec though. But I feel like most people will still confuse it with the legacy sso :/ I guess we will find out.

- multi_account: Multiple account support
- multi_language: Internationalization/localization support
#}

{# List of valid feature names for validation #}
{% set VALID_FEATURES = [
"e2ee",
"spaces",
"voip_1to1",
"voip_jitsi",
"threads",
"sso",
"oidc",
"multi_account",
"multi_language"
] %}

{# Human-readable labels for features #}
{% macro feature_label(feature_name) %}
{% if feature_name == "e2ee" %}
E2EE
{% elif feature_name == "sso" %}
Legacy SSO
{% elif feature_name == "oidc" %}
OIDC
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIL its named OAuth2 in spec... Yet everyone talking about it calls oidc...

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"OIDC native" turned out to marketing speech (admittedly it rolls off the tongue a bit easier, e.g. https://areweoidcyet.com/), but concessions have been made in the meantime.

{% elif feature_name == "voip_1to1" %}
VoIP (1:1)
{% elif feature_name == "voip_jitsi" %}
VoIP (Jitsi)
{% else %}
{{feature_name | replace(from="_", to=" ") | title }}
{% endif %}
{% endmacro %}

{% macro classes(client) %}
{% if client.packages.apple_app_store.app_id and client.packages.apple_app_store.org %}
platform-ios
Expand Down Expand Up @@ -33,14 +75,24 @@
{% macro features(features, supported) %}
{% set_global matching = 0 %}
{% for feature_name, supports in features %}
{% if supports == supported %}
{% set_global matching = matching + 1 %}
{% if feature_name == "e2ee" or feature_name == "sso" %}
<p>{{ feature_name | upper }}</p>
{% else %}
<p>{{ feature_name | replace(from="_", to=" ") | title }}</p>
{% endif %}
{% endif %}
{# Validate feature value is boolean before processing #}
{% if supports is same_as(true) or supports is same_as(false) %}
{% if supports == supported %}
{% set_global matching = matching + 1 %}
{# Check if feature is in our known list #}
{% set_global feature_is_valid = false %}
{% for valid in VALID_FEATURES %}
{% if valid == feature_name %}
{% set_global feature_is_valid = true %}
{% endif %}
{%endfor %}
{% if feature_is_valid %}
<p>{{ self::feature_label(feature_name=feature_name) | trim }}</p>
{% else %}
{{ throw(message="Invalid feature found. Make sure it is within the VALID_FEATURES table!") }}
{% endif %}
{% endif %}
{% endif %}
{% endfor %}
{% if matching == 0 %}None!{% endif %}
{% endmacro %}
Expand Down