diff --git a/v3/assets/actor_colour_theme_plugin/settings_change_theme_colours.png b/v3/assets/actor_colour_theme_plugin/settings_change_theme_colours.png
new file mode 100644
index 0000000..10dc178
Binary files /dev/null and b/v3/assets/actor_colour_theme_plugin/settings_change_theme_colours.png differ
diff --git a/v3/assets/actor_colour_theme_plugin/settings_change_theme_colours2.png b/v3/assets/actor_colour_theme_plugin/settings_change_theme_colours2.png
new file mode 100644
index 0000000..19dd3cf
Binary files /dev/null and b/v3/assets/actor_colour_theme_plugin/settings_change_theme_colours2.png differ
diff --git a/v3/assets/actor_colour_theme_plugin/settings_change_theme_colours3.png b/v3/assets/actor_colour_theme_plugin/settings_change_theme_colours3.png
new file mode 100644
index 0000000..e66af5c
Binary files /dev/null and b/v3/assets/actor_colour_theme_plugin/settings_change_theme_colours3.png differ
diff --git a/v3/assets/actor_colour_theme_plugin/settings_change_theme_colours4.png b/v3/assets/actor_colour_theme_plugin/settings_change_theme_colours4.png
new file mode 100644
index 0000000..c8bbe88
Binary files /dev/null and b/v3/assets/actor_colour_theme_plugin/settings_change_theme_colours4.png differ
diff --git a/v3/feed.rss b/v3/feed.rss
index 3001781..5de5421 100644
--- a/v3/feed.rss
+++ b/v3/feed.rss
@@ -2,10 +2,79 @@
The Oomox plugin main class catches the "PopulateProfileSettingsTabs" event upon visiting user panel.
+ +public function onPopulateProfileSettingsTabs(Request $request, array &$tabs): bool
+{
+ $tabs[] = [
+ 'title' => 'Light theme colours',
+ 'desc' => 'Change the theme colours.',
+ 'controller' => C\Oomox::oomoxSettingsLight($request),
+ ];
+
+ $tabs[] = [
+ 'title' => 'Dark theme colours',
+ 'desc' => 'Change the theme colours.',
+ 'controller' => C\Oomox::oomoxSettingsDark($request),
+ ];
+
+ return Event::next;
+}
+
+
+As made evident by the code, two new tabs are added to profile settings, light and dark theme colours. +Since the page styling follows the system theme, actors may want to style each theme differently, therefore they are treated separately.
+ +The actor's defined colours are then saved in the respective entity and cached. +Finally, the colour preferences are used to render the corresponding CSS file which defines the various colour variables used:
+ +public function oomoxCSS(): Response
+{
+ $user = Common::ensureLoggedIn();
+
+ $oomox_table = PluginOomox::getEntity($user);
+ if (is_null($oomox_table)) {
+ throw new ClientException(_m('No custom colours defined', 404));
+ }
+
+ $content = Formatting::twigRenderFile('/oomox/root_override.css.twig', ['oomox' => $oomox_table]);
+ return new Response($content, status: 200, headers: ['content-type' => 'text/css']);
+}
+
+
+Please note, upon rendering for the first time, page render may be blocked until the resulting file is served. Nonetheless, subsequent page renders +won't experience the issue again. That is, if the file is cached by the browser.
+ +Tabs added using the "PopulateProfileSettingsTabs" event: +
+ +Changing the dark theme colours! +
+ +The result of given changes, please note it's no longer a 'dark' theme. +Given a valid colour, it's the actor's responsibility whether or not the colours make sense. So, go wild! +
+ + +]]>https://gnusocial.rocks/v3/milestone-actor-colour-theme-plugin.html +Contrary to the original plan, we have merged The Free Network Module, WebFinger and LRDD into a single component named FreeNetwork. Likewise, ActivityPub and ActivityStreams 2.0 was kept the same plugin instead of separated.
+ +The FreeNetwork component adds WebFinger (RFC7033) lookup and implements Link-based Resource Descriptor Discovery (LRDD) based on RFC6415, Web Host Metadata. It takes and produces both Extensible Resource Descriptor (XRD) and JSON (JavaSript Object Notation). Furthermore, and different from v2, every federation protocol will use the same distribution queue maintained by this component instead of holding its own.
+ +We originally intended to have data modelling plugins that would extend the GS's "language". We then understood that it added more complexity than we wanted without any considerable advantage because we cannot dissociate data reception handling of the protocol itself.
+ +ActivityPub already translates between activity and entity and allows plugins to extend it (thus serving a similar purpose to data modelling and representation plugins).
+ +GNU social v3 now supports mentions, which is a process that starts in the Posting component. The processing of local mentions naturally finds its entire handling here.
+ +For remote ActivityPub mentions, ActivityPub handles it aided by the FreeNetwork component).
+ +We still have to port OStatus (and ActivityStreams 1.0) and implement the distribution by FreeNetwork, although the base work is done. Regarding ActivityPub, although some of it already works, expanding the existing plugins to supplement ActivityPub, and full validation isn't ready yet. We will most likely finish the implementation of the whole federation stack in the next week.
+ + + + + + +]]>GNU social now has its documentation available in +https://docs.gnusocial.rocks/. It features four +different books. These are automatically generated from the source using mdBook.
+ +++ +Only the development book is in an elaborated state, the other books are +holding for more ready code.
+
And two of them are new:
+ +And two of them are updates from existing documentation:
+ +Together with the documentation we've introduced a +wiki. Its purpose is to walk-through decisions, +convention, terminology. It's where we document the reasoning the development team went +through before implementing more sophisticated functionalities.
+ +Finally, when the documentation doesn't explain, and to ensure the whole code +is properly tested, we have the +tests. And the coverage is available here. At the time of writing the coverage has 98.76% code lines tested.
+ + + + + + + + + + + + + + + + + + +]]>... All right, all right, it's not just it.
+ +First, the user panel section where the desired preferences are selected: +
+ +Upon sending the previous form, the user is redirected to order their selection: +
+ +Finally, when posting the language with the highest priority is selected by default.
+ +However, by accessing "Additional options", another language may be selected. The resulting +note will have the lang attribute according to it.
+ +The posting widget itself: +
+ +We can now show you the notes you can read, but for groups, this mean that you +can access umbrella groups and filter the feeds to see what's in your language +and even region.
+ +For too long the fediverse struggled with languages, this step makes it easier +for actual internationalization of the free network.
+ + + + + + +]]>File Storage in GNU social is used for avatars, for notes containing +attachments, and for notes containing links (in which case is an Embed preview). +Notes can be created by local users or fetched from remote actors. Filehash is +used to reduce file duplication.
+ +When a user shares a Link that uses OpenGraph tags or has an OEmbed provider, +the Embed plugin generates a preview for it that may contain a thumbnail.
+ +When a user shares a Link to an image, the StoreRemoteMedia plugin can fetch the +file and make it available as an attachment, and will generate a thumbnail.
+ +When an image, video, or other file type is uploaded or retrieved, an Attachment +entity is created. When a thumbnail is requested, one is generated if an +EncoderPlugin that supports the mime type is available.
+ +There are two EncoderPlugins implemented:
+ +Another helpful plugin is FileQuota which ensures a user stays under the file quota.
+ +There are various entities related to attachment and thumbnail handling. +The key ones are:
+ + + +The plugins are able to act by means of the Events system, as elaborated in the +documentation.
+ + + + + + + + + + + + + + + + + + + +]]>... All right, all right, it's not just it.
- -We can now show you the notes you can read, but for groups, this mean that you -can access umbrella groups and filter the feeds to see what's in your language -and even region.
- -For too long the fediverse struggled with languages, this step makes it easier -for actual internationalization of the free network.
- - - - - -]]>Contrary to the original plan, we have merged The Free Network Module, WebFinger and LRDD into a single component named FreeNetwork. Likewise, ActivityPub and ActivityStreams 2.0 was kept the same plugin instead of separated.
- -The FreeNetwork component adds WebFinger (RFC7033) lookup and implements Link-based Resource Descriptor Discovery (LRDD) based on RFC6415, Web Host Metadata. It takes and produces both Extensible Resource Descriptor (XRD) and JSON (JavaSript Object Notation). Furthermore, and different from v2, every federation protocol will use the same distribution queue maintained by this component instead of holding its own.
- -We originally intended to have data modelling plugins that would extend the GS's "language". We then understood that it added more complexity than we wanted without any considerable advantage because we cannot dissociate data reception handling of the protocol itself.
- -ActivityPub already translates between activity and entity and allows plugins to extend it (thus serving a similar purpose to data modelling and representation plugins).
- -GNU social v3 now supports mentions, which is a process that starts in the Posting component. The processing of local mentions naturally finds its entire handling here.
- -For remote ActivityPub mentions, ActivityPub handles it aided by the FreeNetwork component).
- -We still have to port OStatus (and ActivityStreams 1.0) and implement the distribution by FreeNetwork, although the base work is done. Regarding ActivityPub, although some of it already works, expanding the existing plugins to supplement ActivityPub, and full validation isn't ready yet. We will most likely finish the implementation of the whole federation stack in the next week.
- - - - - - -]]>We hope you like it!
- --- -Modern looking, consistent and accessible UI across all browsers. -Non-JS version as the primary focus, JS is optional and should be regarded as such.
-
The Web is 95% typography, the art and technique of arranging type to make text more readable and pleasing. -To achieve this, a textual hierarchy is fundamental, text should present a clear, readable structure to the reader. -In much of the same fashion, the way we perceive Web pages relies upon the same fundamentals. As such, by focusing on the -markup, we hope to achieve an accessible, fast and polished structure by which any browser and screen reader relies upon.
- -The git -history is clear (we believe), but it can be challenging and obscure to outsiders and non-technical people.
- -With the introduction of this blog made with -bashblog, we hope to make all the progress more visible and easier of following :)
- -It has a RSS feed so, don't -forget to subscribe!
- - - - - - - - - - - - - - - - - - - - - -]]>StoreRemoteMedia
-fetches remote files when they are Linked
to in a note. I.e., when the major mime type isn't text
. It triggers thumbnail generation.
Embed
-attempts to generate a page preview from open graph and oembed. I.e., acts when the major mime type is text
.
We've changed so much with GNU social v3 that, regarding SRM there was no possible port, just a complete rewrite. Both plugins became smaller and easier to understand while promoting the same functionality with more stability.
- - - - - - - - - - - - - - - -]]>It's always important to start with the original code as that allows us -to review past decisions and understand all the corner cases previously -considered.
- -Sadly, what motivated us to re-design the attachment system were the -non-considered corner cases. In particular:
- -title
from attachment, as it's part of the relation between attachment and note.actor
from attachment, many actors may publish the same attachment.is_local
from attachment, as it's part of the relation between attachment and note.remote_url
from attachment, different urls can return the same attachment.Key commits:
- -The structural changes and how it compares to v2 is detailed in our -wiki.
- -Some relevant observations:
- -Link
is now part of GNU social Data Representation terms. It represents
-any remote URL being shared in a note.GNU social comes with two plugins that add relevant media functionality. +Not talking neither about ImageEncoder nor VideoEncoder this time, but rather about StoreRemoteMedia and Embed.
-GNU social now has its documentation available in -https://docs.gnusocial.rocks/. It features four -different books. These are automatically generated from the source using mdBook.
+StoreRemoteMedia
+fetches remote files when they are Linked
to in a note. I.e., when the major mime type isn't text
. It triggers thumbnail generation.
-+Only the development book is in an elaborated state, the other books are -holding for more ready code.
-
Embed
+attempts to generate a page preview from open graph and oembed. I.e., acts when the major mime type is text
.
And two of them are new:
+We've changed so much with GNU social v3 that, regarding SRM there was no possible port, just a complete rewrite. Both plugins became smaller and easier to understand while promoting the same functionality with more stability.
+ + + + + + + + + + + + + + + +]]>It's always important to start with the original code as that allows us +to review past decisions and understand all the corner cases previously +considered.
+ +Sadly, what motivated us to re-design the attachment system were the +non-considered corner cases. In particular:
title
from attachment, as it's part of the relation between attachment and note.actor
from attachment, many actors may publish the same attachment.is_local
from attachment, as it's part of the relation between attachment and note.remote_url
from attachment, different urls can return the same attachment.And two of them are updates from existing documentation:
+Key commits:
Together with the documentation we've introduced a -wiki. Its purpose is to walk-through decisions, -convention, terminology. It's where we document the reasoning the development team went -through before implementing more sophisticated functionalities.
- -Finally, when the documentation doesn't explain, and to ensure the whole code -is properly tested, we have the -tests. And the coverage is available here. At the time of writing the coverage has 98.76% code lines tested.
+The structural changes and how it compares to v2 is detailed in our +wiki.
+Some relevant observations:
+Link
is now part of GNU social Data Representation terms. It represents
+any remote URL being shared in a note.Actors are now able to set their own colours, through a brand new plugin: "Oomox". +Those accustomed to customising their own desktop should know where the name comes from ;)
+ +The Oomox plugin main class catches the "PopulateProfileSettingsTabs" event upon visiting user panel.
+ +public function onPopulateProfileSettingsTabs(Request $request, array &$tabs): bool
+{
+ $tabs[] = [
+ 'title' => 'Light theme colours',
+ 'desc' => 'Change the theme colours.',
+ 'controller' => C\Oomox::oomoxSettingsLight($request),
+ ];
+
+ $tabs[] = [
+ 'title' => 'Dark theme colours',
+ 'desc' => 'Change the theme colours.',
+ 'controller' => C\Oomox::oomoxSettingsDark($request),
+ ];
+
+ return Event::next;
+}
+
+
+As made evident by the code, two new tabs are added to profile settings, light and dark theme colours. +Since the page styling follows the system theme, actors may want to style each theme differently, therefore they are treated separately.
+ +The actor's defined colours are then saved in the respective entity and cached. +Finally, the colour preferences are used to render the corresponding CSS file which defines the various colour variables used:
+ +public function oomoxCSS(): Response
+{
+ $user = Common::ensureLoggedIn();
+
+ $oomox_table = PluginOomox::getEntity($user);
+ if (is_null($oomox_table)) {
+ throw new ClientException(_m('No custom colours defined', 404));
+ }
+
+ $content = Formatting::twigRenderFile('/oomox/root_override.css.twig', ['oomox' => $oomox_table]);
+ return new Response($content, status: 200, headers: ['content-type' => 'text/css']);
+}
+
+
+Please note, upon rendering for the first time, page render may be blocked until the resulting file is served. Nonetheless, subsequent page renders +won't experience the issue again. That is, if the file is cached by the browser.
+ +Tabs added using the "PopulateProfileSettingsTabs" event: +
+ +Changing the dark theme colours! +
+ +The result of given changes, please note it's no longer a 'dark' theme. +Given a valid colour, it's the actor's responsibility whether or not the colours make sense. So, go wild! +
+ + + +