From 28f868b089d76c3ce51bd0462d50eee465940a73 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Thu, 15 Jan 2026 06:00:38 +0000 Subject: [PATCH] Add Upcoming Events View user documentation - Create docs/features/UPCOMING_EVENTS_README.md with user-facing guide - Add help preference in Navigation settings with in-app dialog - Add 'View Full Documentation' button to open GitHub docs - Create ic_help_outline_24dp drawable icon - Update docs/README.md with new Features section - Add string resources for help dialog and docs URL Co-authored-by: wharris --- .../prefs/NavigationSettingsFragmentX.kt | 26 ++++ .../res/drawable/ic_help_outline_24dp.xml | 12 ++ android/app/src/main/res/values/strings.xml | 8 ++ .../main/res/xml/navigation_preferences.xml | 7 + docs/README.md | 6 + docs/features/UPCOMING_EVENTS_README.md | 123 ++++++++++++++++++ 6 files changed, 182 insertions(+) create mode 100644 android/app/src/main/res/drawable/ic_help_outline_24dp.xml create mode 100644 docs/features/UPCOMING_EVENTS_README.md diff --git a/android/app/src/main/java/com/github/quarck/calnotify/prefs/NavigationSettingsFragmentX.kt b/android/app/src/main/java/com/github/quarck/calnotify/prefs/NavigationSettingsFragmentX.kt index 7855c4edc..836b0ff89 100644 --- a/android/app/src/main/java/com/github/quarck/calnotify/prefs/NavigationSettingsFragmentX.kt +++ b/android/app/src/main/java/com/github/quarck/calnotify/prefs/NavigationSettingsFragmentX.kt @@ -20,6 +20,7 @@ package com.github.quarck.calnotify.prefs import android.content.Intent +import android.net.Uri import android.os.Bundle import android.os.Handler import android.os.Looper @@ -45,6 +46,12 @@ class NavigationSettingsFragmentX : PreferenceFragmentCompat() { override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) { setPreferencesFromResource(R.xml.navigation_preferences, rootKey) + // Set up click handler for "About Upcoming Events" help + findPreference("upcoming_events_help")?.setOnPreferenceClickListener { + showUpcomingEventsHelpDialog() + true + } + // Set up click handler for "Switch to Classic View" button findPreference("switch_to_classic_view")?.setOnPreferenceClickListener { showSwitchToClassicViewDialog() @@ -58,6 +65,25 @@ class NavigationSettingsFragmentX : PreferenceFragmentCompat() { } } + private fun showUpcomingEventsHelpDialog() { + val ctx = context ?: return + AlertDialog.Builder(ctx) + .setTitle(R.string.upcoming_events_help_dialog_title) + .setMessage(R.string.upcoming_events_help_dialog_message) + .setPositiveButton(R.string.upcoming_events_help_view_full_docs) { _, _ -> + openUpcomingEventsDocumentation() + } + .setNegativeButton(android.R.string.ok, null) + .show() + } + + private fun openUpcomingEventsDocumentation() { + val ctx = context ?: return + val docsUrl = ctx.getString(R.string.upcoming_events_docs_url) + val intent = Intent(Intent.ACTION_VIEW, Uri.parse(docsUrl)) + startActivity(intent) + } + private fun showSwitchToClassicViewDialog() { val ctx = context ?: return AlertDialog.Builder(ctx) diff --git a/android/app/src/main/res/drawable/ic_help_outline_24dp.xml b/android/app/src/main/res/drawable/ic_help_outline_24dp.xml new file mode 100644 index 000000000..0073d4286 --- /dev/null +++ b/android/app/src/main/res/drawable/ic_help_outline_24dp.xml @@ -0,0 +1,12 @@ + + + + + diff --git a/android/app/src/main/res/values/strings.xml b/android/app/src/main/res/values/strings.xml index 2ba192112..327bf02dd 100644 --- a/android/app/src/main/res/values/strings.xml +++ b/android/app/src/main/res/values/strings.xml @@ -733,4 +733,12 @@ Enable new UI and restart with the tabbed navigation view Switch to new view? The app will restart. Restarting… + + + About Upcoming Events + Learn how the Upcoming tab works + Upcoming Events + The Upcoming tab shows calendar events that are scheduled to fire reminders within your configured lookahead window.\n\n• Events appear based on when their reminder fires, not the event start time\n• Once a reminder fires, the event moves to the Active tab\n• Configure how far ahead to look in the settings below\n\nLookahead Modes:\n• Fixed hours: Show events X hours ahead (default: 8 hours)\n• Day boundary: Show events until a configurable \"new day\" time (for night owls) + View Full Documentation + https://github.com/williscool/CalendarNotification/blob/master/docs/features/UPCOMING_EVENTS_README.md diff --git a/android/app/src/main/res/xml/navigation_preferences.xml b/android/app/src/main/res/xml/navigation_preferences.xml index 0ed4e3f33..da197c2e7 100644 --- a/android/app/src/main/res/xml/navigation_preferences.xml +++ b/android/app/src/main/res/xml/navigation_preferences.xml @@ -13,6 +13,13 @@ android:summary="@string/use_new_navigation_ui_summary" android:defaultValue="true" /> + + +