From e8b46c970a3f46be42abfe4ef401c3b5a07af74a Mon Sep 17 00:00:00 2001 From: James Rich Date: Thu, 25 Jun 2026 20:59:13 -0500 Subject: [PATCH] docs: register Widget and Help pages in the in-app DocBundleLoader MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The new widget.md and help-and-docs.md pages must be registered in DocBundleLoader.kt (in-app docs index) — the "Docs quality gates" CI check greps for every page slug. Adds their UserPageDef entries, the doc_title_*/doc_keywords_* string resources, and DocPageIconResolver icons. Co-Authored-By: Claude Opus 4.8 --- .skills/compose-ui/strings-index.txt | 4 ++++ .../composeResources/values/strings.xml | 4 ++++ .../feature/docs/data/DocBundleLoader.kt | 20 +++++++++++++++++++ .../feature/docs/ui/DocPageIconResolver.kt | 4 ++++ 4 files changed, 32 insertions(+) diff --git a/.skills/compose-ui/strings-index.txt b/.skills/compose-ui/strings-index.txt index 6dfcd0fe9..0e8f3ec7b 100644 --- a/.skills/compose-ui/strings-index.txt +++ b/.skills/compose-ui/strings-index.txt @@ -444,6 +444,7 @@ doc_keywords_connections doc_keywords_desktop doc_keywords_discovery doc_keywords_firmware +doc_keywords_help doc_keywords_map doc_keywords_measurement doc_keywords_messages @@ -458,6 +459,7 @@ doc_keywords_tak doc_keywords_telemetry doc_keywords_translate doc_keywords_units +doc_keywords_widget doc_search_placeholder doc_section_developer doc_section_user @@ -467,6 +469,7 @@ doc_title_connections doc_title_desktop doc_title_discovery doc_title_firmware +doc_title_help doc_title_map doc_title_measurement doc_title_messages @@ -481,6 +484,7 @@ doc_title_tak doc_title_telemetry doc_title_translate doc_title_units +doc_title_widget done dont_show_again_for_device double_tap_as_button_press diff --git a/core/resources/src/commonMain/composeResources/values/strings.xml b/core/resources/src/commonMain/composeResources/values/strings.xml index a301622c2..fd5d0b68d 100644 --- a/core/resources/src/commonMain/composeResources/values/strings.xml +++ b/core/resources/src/commonMain/composeResources/values/strings.xml @@ -468,6 +468,7 @@ desktop,linux,macos,windows,serial discovery,topology,network,scan,neighbor firmware,update,ota,flash,version,recovery + help,documentation,docs,chirpy,assistant,search,offline map,waypoint,gps,position,location,marker formatter,metric,number,locale,temperature,conversion,api message,channel,encryption,direct,broadcast,quick-chat @@ -482,6 +483,7 @@ telemetry,sensor,temperature,humidity,pressure,power translate,crowdin,localization,language,i18n,contribute units,locale,metric,imperial,temperature,distance + widget,home screen,local stats,glance,battery,utilization Search documentation… Developer Guide User Guide @@ -491,6 +493,7 @@ Desktop App Discovery Firmware Updates + Help & In-App Docs Map & Waypoints Measurement & Formatting Messages & Channels @@ -505,6 +508,7 @@ Telemetry & Sensors Translate the App Units & Locale + Home Screen Widget Done Don't show again for this device Double Tap as Button diff --git a/feature/docs/src/commonMain/kotlin/org/meshtastic/feature/docs/data/DocBundleLoader.kt b/feature/docs/src/commonMain/kotlin/org/meshtastic/feature/docs/data/DocBundleLoader.kt index 7798895bb..431694eca 100644 --- a/feature/docs/src/commonMain/kotlin/org/meshtastic/feature/docs/data/DocBundleLoader.kt +++ b/feature/docs/src/commonMain/kotlin/org/meshtastic/feature/docs/data/DocBundleLoader.kt @@ -431,6 +431,26 @@ class DefaultDocBundleLoader : DocBundleLoader { 2750, "app-functions", ), + UserPageDef( + "widget", + CoreRes.string.doc_title_widget, + CoreRes.string.doc_keywords_widget, + "en/user/widget.html", + 20, + listOf("widget", "home-screen-widget", "local-stats-widget"), + 1700, + "widget", + ), + UserPageDef( + "help-and-docs", + CoreRes.string.doc_title_help, + CoreRes.string.doc_keywords_help, + "en/user/help-and-docs.html", + 21, + listOf("help", "docs-browser", "chirpy", "assistant"), + 1900, + "help", + ), ) private suspend fun buildUserGuideIndex(): List = userPages.map { def -> diff --git a/feature/docs/src/commonMain/kotlin/org/meshtastic/feature/docs/ui/DocPageIconResolver.kt b/feature/docs/src/commonMain/kotlin/org/meshtastic/feature/docs/ui/DocPageIconResolver.kt index d7dd2fd24..5b4ec0698 100644 --- a/feature/docs/src/commonMain/kotlin/org/meshtastic/feature/docs/ui/DocPageIconResolver.kt +++ b/feature/docs/src/commonMain/kotlin/org/meshtastic/feature/docs/ui/DocPageIconResolver.kt @@ -85,6 +85,10 @@ internal fun DocPage.resolveIcon(): ImageVector = when (iconId) { "app-functions" -> MeshtasticIcons.Api + "widget" -> MeshtasticIcons.Chart + + "help" -> MeshtasticIcons.Notes + // Developer Guide "architecture" -> MeshtasticIcons.ForkLeft