From 9cbc9cfdccaf9bd99c6652c2fcb06de0300e4c35 Mon Sep 17 00:00:00 2001 From: Diego Beraldin Date: Wed, 14 Feb 2024 08:52:43 +0100 Subject: [PATCH] chore: update documentation --- CONTRIBUTING.md | 8 +++----- docs/tech_manual/module_structure.md | 2 +- docs/tech_manual/tech_stack.md | 23 ++++++++++++++++++++--- 3 files changed, 24 insertions(+), 9 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2d8419288..38ddeec68 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -271,12 +271,10 @@ The modules can be grouped into five groups: `:core:md module` (Markdown rendering) that includes `:core:commonui:components` because Markdown requires some custom UI components to be rendered. -For more detailed information: +For more detailed information about the contents of each group and the purpose of each module, +please refer +to [this page](https://diegoberaldin.github.io/RaccoonForLemmy/tech_manual/main#module-structure). -- about the contents of each group and the purpose of each module, please refer - to [this page](https://diegoberaldin.github.io/RaccoonForLemmy/tech_manual/main#module-structure) -- about dependency flow between the modules, have a look to the diagrams you can find - in [this page](https://github.com/diegoberaldin/RaccoonForLemmy/blob/master/MODULE_DIAGRAMS.md). ## 6. Conventions diff --git a/docs/tech_manual/module_structure.md b/docs/tech_manual/module_structure.md index 38bf6ba07..35af9041d 100644 --- a/docs/tech_manual/module_structure.md +++ b/docs/tech_manual/module_structure.md @@ -30,7 +30,7 @@ Here is a description of the dependency flow: uses `:core:preferences` / `:core:appearance`) and nothing else; they are in turn used by all the other types of modules. -### Special and top-level modules +### Top-level modules The main module (Android-specific) is `:androidApp`, which contains the Application subclass (`MainApplication`) and the main activity (`MainActivity`). The latter in diff --git a/docs/tech_manual/tech_stack.md b/docs/tech_manual/tech_stack.md index 50ef18f01..dc9da6ca2 100644 --- a/docs/tech_manual/tech_stack.md +++ b/docs/tech_manual/tech_stack.md @@ -14,6 +14,7 @@ two different concepts and should not be confused) in a `di` package inside each can include each other and all top-level modules are included in the shared module, more on it in "Module overview and dependencies". +
Navigation
For navigation the Voyager library has been @@ -28,20 +29,24 @@ Something similar was done for the navigation drawer in Ktor which has great multiplatform support. Instead of using Retrofit, to create network adapters the Ktorfit library is used, which uses KSP to parse annotations and generate code.
+
Resource management
Initially the project used the Moko resources library to load fonts, icons and all the localized messages used in the UI. It worked great, since in those areas -Compose multiplatform missed the needed functionalities. Since resource management was introduced in Compose multiplatform -1.6.0, I migrated the project to the built-in system. And, for localization, the project was migrated to the -Lyricist library which better handles dynamic language changes. +Compose multiplatform missed the needed functionalities. But as long as the project grew in size and +more complex KSP configurations were needed, having all modules depend on resources became unmaintainable. +This is why I migrated drawable and font loading to Compose build-in system. And, for localization, the choice was the +Lyricist library, which better handles dynamic language changes.
+
Image loading
This was something that was expected to be simpler but unfortunately it wasn't. Popular kotlin libraries @@ -53,11 +58,13 @@ continues using it (Raccoon for iOS has by far bigger problems than image render inexistent platform) while the Android counterpart was migrated to Coil. Things will change when Coil 3.x will be release, because it will go multiplatform as well.
+
Preference storage
Here the choice was the Multiplatform settings libary which not only works great but also offers support for encryption.
+
Primary persistence
This project was a chance to experiment with SQLDelight @@ -65,6 +72,7 @@ This project was a chance to experiment with SQLCipher Android, formerly Android Database SQLCipher.
+
Markdown rendering
This was another part, like image loading, where KMP is still lacking and things are far more @@ -81,15 +89,24 @@ like Lemmy URL references have to be managed). The big star here is Markwo DefaultMarkwonProvider.kt. Parts of the Markwon configuration and usage is inspired by Jerboa for Lemmy.
+
Video playback
This had to be native, the Android implementation relies on Exoplayer whereas the iOS implementation on AVPlayer as usual.
+
Theme generation
The application allows to select a custom color and generate a Material 3 color scheme as a palette originate from that seed color. This is achieved by using the MaterialKolor library which was designed to be multiplatform and works as a charm for the purpose. Thanks!
+ +
Reorderable lists
+
+The ability to reorder lists is achieved thanks to the Reorderable +library which starting from version 1.3.1 has become multiplatform. This functionality is still +experimental and is used only in the instance selection bottom sheet for anonymous users. +