From 7618c2956a8d09d3d69c86f2026af8b669ec6816 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Menrath?= Date: Tue, 10 Oct 2023 16:00:34 +0200 Subject: [PATCH] fix headings --- architecture design proposal.md | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/architecture design proposal.md b/architecture design proposal.md index c1d48c1..4233628 100755 --- a/architecture design proposal.md +++ b/architecture design proposal.md @@ -72,17 +72,15 @@ Nevertheless, we see a lot of other cases that can benefit, if the primary goals # Transformer Management -## User Interface +## Current situation -### Current situation - -#### Frontend +### Frontend The admin user interface in v1.0.0 lets one choose to which object type all post get transformed to. The options are: * [x] Note (default) — Should work with most platforms. * [ ] Article — The presentation of the "Article" might change on different platforms. * [ ] WordPress Post-Format — Maps the WordPress Post-Format to the ActivityPub Object Type. -#### Backend +### Backend Currently, all this functionality is handled via one hard-coded transformer in `includes/transformer/class post.php` ([Source](https://github.com/Automattic/wordpress-activitypub/blob/master/includes/transformer/class-post.php)) and the actual logic that assigns the type is somewhere else. ```php @@ -109,10 +107,10 @@ class Post { ... ``` -### Proposal +## Proposal All publicly accessible WordPress post types can become active for ActivityPub federation when selecting a transformer available for the relevant post type. The transformer determines the target ActivityPub object type, which can vary depending on variables like the post type or post format. If there is no specific transformer available for a given post type, it cannot be assigned through the user interface. -## Frontend +### Frontend | | Note | Post-Format | The Events Calendar Transformer | Custom Event Transformer | | ----------------- |:----:|:-----------:|:-------------------------------:|:------------------------:| | **post** | X | O | - | - | @@ -130,7 +128,7 @@ All publicly accessible WordPress post types can become active for ActivityPub f - Should not differ too much from the current view: Maybe completely hide the current activity object type part of the settings and only show the buttons for `enable` and `disable` and move the transformer table to an advanced settings page. - Maybe make the tables more advanced and clearly show the origin of the transformer (built-in, etc.) and maybe a Pop-Up with a description, or even a link to a configuration page of the transformer. -## Backend +### Backend A solution could be to define a transformer interface and let the transformers be implementations. ```php