From 490c8b1ac67f9f03be32076e8751910e75bbf3be Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 20 Oct 2025 16:04:09 +0100 Subject: [PATCH 1/6] MS-1177 Progress bar (indeterminate) at the last moment of logout --- .../settings/syncinfo/SyncInfoFragment.kt | 2 +- .../main/res/layout/fragment_sync_info.xml | 40 ++++++++++++++----- 2 files changed, 32 insertions(+), 10 deletions(-) diff --git a/feature/dashboard/src/main/java/com/simprints/feature/dashboard/settings/syncinfo/SyncInfoFragment.kt b/feature/dashboard/src/main/java/com/simprints/feature/dashboard/settings/syncinfo/SyncInfoFragment.kt index bb5c777d72..99ac37e8d4 100644 --- a/feature/dashboard/src/main/java/com/simprints/feature/dashboard/settings/syncinfo/SyncInfoFragment.kt +++ b/feature/dashboard/src/main/java/com/simprints/feature/dashboard/settings/syncinfo/SyncInfoFragment.kt @@ -263,7 +263,7 @@ internal class SyncInfoFragment : Fragment(R.layout.fragment_sync_info) { // Footer val isFooterSyncInProgressVisible = config.isSyncInfoLogoutOnComplete && records.isFooterSyncInProgressVisible binding.textFooterRecordSyncInProgress.isGone = !isFooterSyncInProgressVisible - binding.textFooterRecordLoggingOut.isGone = !records.isFooterReadyToLogOutVisible + binding.layoutFooterRecordLoggingOut.isGone = !records.isFooterReadyToLogOutVisible binding.textFooterRecordSyncIncomplete.isGone = !records.isFooterSyncIncompleteVisible binding.textFooterRecordLastSyncedWhen.isGone = !records.isFooterLastSyncTimeVisible binding.textFooterRecordLastSyncedWhen.text = records.footerLastSyncMinutesAgo diff --git a/feature/dashboard/src/main/res/layout/fragment_sync_info.xml b/feature/dashboard/src/main/res/layout/fragment_sync_info.xml index 92dbd89cb8..5d935330a9 100644 --- a/feature/dashboard/src/main/res/layout/fragment_sync_info.xml +++ b/feature/dashboard/src/main/res/layout/fragment_sync_info.xml @@ -552,16 +552,39 @@ android:text="@string/sync_info_footer_sync_incomplete" android:visibility="gone" /> - + android:visibility="gone"> + + + + + + @@ -815,4 +838,3 @@ - From bfb788a627b9e12d14b6ea718f1e1b2a4406ba07 Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 20 Oct 2025 16:04:49 +0100 Subject: [PATCH 2/6] MS-1177 Emphasis on automatic operation in logout instructions --- infra/resources/src/main/res/values/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/infra/resources/src/main/res/values/strings.xml b/infra/resources/src/main/res/values/strings.xml index 66b290aedb..fa42049863 100644 --- a/infra/resources/src/main/res/values/strings.xml +++ b/infra/resources/src/main/res/values/strings.xml @@ -440,7 +440,7 @@ Logout Log out without sync - There are records on your device that need to be synchronised before logging out. Please allow the synchronisation process to complete.\n\nOnce the synchronization is finished you will be able to log out. + Records on your device will be automatically synchronised before logging out. Please allow the synchronisation process to complete.\n\nOnce the synchronization is finished you will be able to log out. Warning Data synchronisation is essential for ensuring your project has up-to-date records. Failing to synchronise your data without a valid reason will impact your colleagues\' access to important records and the project\'s ability to report accurately.\n\nFailing to synchronise data without a valid reason may also be a breach of data collection protocol and may result in unwanted consequences for you and the project. Logout From 42fec45934a9891b29239c6dd9c76ab1069d6899 Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 20 Oct 2025 16:05:40 +0100 Subject: [PATCH 3/6] MS-1177 Outdated translations removed - subject to re-translation --- infra/resources/src/main/res/values-am-rET/strings.xml | 1 - infra/resources/src/main/res/values-am/strings.xml | 1 - infra/resources/src/main/res/values-bn/strings.xml | 1 - infra/resources/src/main/res/values-fr/strings.xml | 1 - infra/resources/src/main/res/values-hi/strings.xml | 1 - infra/resources/src/main/res/values-om/strings.xml | 1 - 6 files changed, 6 deletions(-) diff --git a/infra/resources/src/main/res/values-am-rET/strings.xml b/infra/resources/src/main/res/values-am-rET/strings.xml index b2eb63d2ce..72468fbc8c 100644 --- a/infra/resources/src/main/res/values-am-rET/strings.xml +++ b/infra/resources/src/main/res/values-am-rET/strings.xml @@ -443,7 +443,6 @@ መውጣት ሳይመሳሰል ውጣ - በመሳሪያዎ ላይ ከመውጣትዎ በፊት መመሳሰል ያለባቸው መዝገቦች አሉ። እባክህ የማመሳሰል ሂደቱ እንዲጠናቀቅ ፍቀድ። ማመሳሰል እንደጨረሰ ዘግተህ መውጣት ትችላለህ። ማስጠንቀቂያ የእርስዎ ፕሮጀክት ወቅታዊ መዛግብት እንዳለው ለማረጋገጥ የውሂብ ማመሳሰል አስፈላጊ ነው። ያለ ትክክለኛ ምክንያት የእርስዎን ውሂብ ማመሳሰል አለመቻል የስራ ባልደረቦችዎ ጠቃሚ መዝገቦችን ማግኘት እና የፕሮጀክቱን ትክክለኛ ሪፖርት የማድረግ ችሎታ ላይ ተጽእኖ ያሳድራል። እና ለእርስዎ እና ለፕሮጀክቱ የማይፈለጉ ውጤቶችን ሊያስከትል ይችላል. መውጣት diff --git a/infra/resources/src/main/res/values-am/strings.xml b/infra/resources/src/main/res/values-am/strings.xml index e23aa9b1cb..7c3aa86392 100644 --- a/infra/resources/src/main/res/values-am/strings.xml +++ b/infra/resources/src/main/res/values-am/strings.xml @@ -446,7 +446,6 @@ መውጣት ሳይመሳሰል ውጣ - በመሳሪያዎ ላይ ከመውጣትዎ በፊት መመሳሰል ያለባቸው መዝገቦች አሉ። እባክህ የማመሳሰል ሂደቱ እንዲጠናቀቅ ፍቀድ።\n\nአንዴ ማመሳሰል እንደተጠናቀቀ ዘግተህ መውጣት ትችላለህ። ማስጠንቀቂያ የእርስዎ ፕሮጀክት ወቅታዊ መዛግብት እንዳለው ለማረጋገጥ የውሂብ ማመሳሰል አስፈላጊ ነው። ያለ ትክክለኛ ምክንያት የእርስዎን ውሂብ ማመሳሰል አለመቻል የስራ ባልደረቦችዎ ጠቃሚ መዝገቦችን ማግኘት እና የፕሮጀክቱን ትክክለኛ ሪፖርት የማድረግ ችሎታ ላይ ተጽእኖ ያሳድራል። እና ለእርስዎ እና ለፕሮጀክቱ የማይፈለጉ ውጤቶችን ሊያስከትል ይችላል. መውጣት diff --git a/infra/resources/src/main/res/values-bn/strings.xml b/infra/resources/src/main/res/values-bn/strings.xml index 60c02e6ff8..4e5533982e 100644 --- a/infra/resources/src/main/res/values-bn/strings.xml +++ b/infra/resources/src/main/res/values-bn/strings.xml @@ -442,7 +442,6 @@ লগআউট করুন সিঙ্ক ব্যাতিত লগ আউট করুন - আপনার এই ডিভাইসে কিছু তথ্য সংরক্ষিত আছে যা সিঙ্ক করা প্রয়োজন। অনুগ্রহ করে সিঙ্ক প্রক্রিয়া সম্পন্ন করুণ। \n\nসিঙ্ক প্রক্রিয়া সম্পন্ন হলে লগ আউট করতে পারবেন। সতর্কতা আপনার প্রকল্পের সকল রেকর্ড আপ-টু-ডেট রয়েছে তা নিশ্চিত করার জন্য ডেটা সিঙ্ক্রোনাইজেশন অপরিহার্য। কোনো বৈধ কারণ ছাড়া ডেটা সিঙ্ক্রোনাইজ করতে ব্যর্থ হলে তা আপনার সহকর্মীদের গুরুত্বপূর্ণ রেকর্ডে অ্যাক্সেস এবং প্রকল্পের সঠিকভাবে রিপোর্ট করার ক্ষমতাকে প্রভাবিত করবে।\n\nকোনও বৈধ কারণ ছাড়া ডেটা সিঙ্ক্রোনাইজ করতে ব্যর্থ হওয়া ডেটা সংগ্রহ প্রোটোকলের লঙ্ঘনও হিসেবে গণ্য হতে পারে যার ফলে প্রকল্পের অবাঞ্ছিত পরিণতি হবার সুযোগ থাকে। লগআউট করুন diff --git a/infra/resources/src/main/res/values-fr/strings.xml b/infra/resources/src/main/res/values-fr/strings.xml index 080f591f29..9775d05dc2 100644 --- a/infra/resources/src/main/res/values-fr/strings.xml +++ b/infra/resources/src/main/res/values-fr/strings.xml @@ -446,7 +446,6 @@ Déconnexion Se déconnecter sans synchronisation - Il y a des enregistrements sur votre appareil qui doivent être synchronisés avant de vous déconnecter. Veuillez laisser le processus de synchronisation se terminer.\n\nUne fois la synchronisation terminée, vous pourrez vous déconnecter. Avertissement La synchronisation des données est essentielle pour garantir que votre projet dispose d\'enregistrements à jour. Ne pas synchroniser vos données sans raison valable aura un impact sur l\'accès de vos collègues aux enregistrements importants et sur la capacité du projet à générer des rapports précis.\n\nNe pas synchroniser les données sans raison valable peut également constituer une violation du protocole de collecte de données et peut entraîner des conséquences indésirables pour vous et le projet. Déconnexion diff --git a/infra/resources/src/main/res/values-hi/strings.xml b/infra/resources/src/main/res/values-hi/strings.xml index 9772a83bfc..b99c1cec26 100644 --- a/infra/resources/src/main/res/values-hi/strings.xml +++ b/infra/resources/src/main/res/values-hi/strings.xml @@ -438,7 +438,6 @@ लॉग-आउट डेटा सिंक किए बिना लॉग आउट करें - आपके डिवाइस पर ऐसे रिकॉर्ड हैं जिन्हें लॉग आउट करने से पहले सिंक्रनाइज़ करने की आवश्यकता है। कृपया सिंक्रोनाइज़ेशन प्रक्रिया को पूरा होने दें।\n\nएक बार सिंक्रोनाइज़ेशन समाप्त हो जाने पर आप लॉग आउट कर सकेंगे। चेतावनी यह सुनिश्चित करने के लिए कि आपके प्रोजेक्ट में अद्यतन रिकॉर्ड हैं, डेटा सिंक्रनाइज़ेशन आवश्यक है। बिना किसी वैध कारण के आपके डेटा को सिंक्रोनाइज़ करने में विफल रहने से आपके सहकर्मियों की महत्वपूर्ण रिकॉर्ड तक पहुंच और प्रोजेक्ट की सटीक रिपोर्ट करने की क्षमता प्रभावित होगी।\n\nबिना किसी वैध कारण के डेटा को सिंक्रोनाइज़ करने में विफल होना भी डेटा संग्रह प्रोटोकॉल का उल्लंघन हो सकता है और इसके परिणामस्वरूप आपके और प्रोजेक्ट के लिए अवांछित परिणाम हो सकते हैं। लॉग-आउट diff --git a/infra/resources/src/main/res/values-om/strings.xml b/infra/resources/src/main/res/values-om/strings.xml index 95f3c09178..95a1416894 100644 --- a/infra/resources/src/main/res/values-om/strings.xml +++ b/infra/resources/src/main/res/values-om/strings.xml @@ -347,7 +347,6 @@ Keessaa bahi Walsimsiisaa malee ba\'aa - Meeshaa keessan irratti galmeewwan osoo hin ba\'iin dura walsimsiisuu qaban jiru. Mee adeemsi walsimsiisaa akka xumuramu hayyami.Erga walsimsiisni xumurame bahuu ni dandeessa. Akeekkachiisa Pirojektiin kee galmee yeroo ammaa akka qabu mirkaneessuuf walsimsiisni deetaa barbaachisaa dha. Sababa sirrii malee deetaa kee walsimsiisuu dadhabuun galmeewwan barbaachisoo ta\'uu fi dandeettii pirojektichi sirritti gabaasuu irratti dhiibbaa qaba.\n\nSababni sirrii malee deetaa walsimsiisuu dadhabuunis pirootokoolii walitti qabuu deetaa cabsuu ta\'uu danda\'a akkasumas bu’aa hin barbaachifne siifi pirojektichaaf fiduu danda’a. Keessaa bahi From eb5c9003ef4edf6c9388738ad9c0839d32966d74 Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 20 Oct 2025 16:06:22 +0100 Subject: [PATCH 4/6] MS-1177 Sync button default hint removed for logout case when the button is hidden --- .../settings/syncinfo/usecase/ObserveSyncInfoUseCase.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/feature/dashboard/src/main/java/com/simprints/feature/dashboard/settings/syncinfo/usecase/ObserveSyncInfoUseCase.kt b/feature/dashboard/src/main/java/com/simprints/feature/dashboard/settings/syncinfo/usecase/ObserveSyncInfoUseCase.kt index 4652e62a35..082901a8b8 100644 --- a/feature/dashboard/src/main/java/com/simprints/feature/dashboard/settings/syncinfo/usecase/ObserveSyncInfoUseCase.kt +++ b/feature/dashboard/src/main/java/com/simprints/feature/dashboard/settings/syncinfo/usecase/ObserveSyncInfoUseCase.kt @@ -287,7 +287,7 @@ internal class ObserveSyncInfoUseCase @Inject constructor( counterRecordsToDownload = recordsToDownload?.let { "${it.count}${if (it.isLowerBound) "+" else ""}" }.orEmpty(), isCounterImagesToUploadVisible = isPreLogoutUpSync, counterImagesToUpload = imagesToUpload?.toString().orEmpty(), - isInstructionDefaultVisible = eventSyncVisibleState == OnStandby, + isInstructionDefaultVisible = eventSyncVisibleState == OnStandby && !isPreLogoutUpSync, isInstructionCommCarePermissionVisible = eventSyncVisibleState == CommCareError, isInstructionNoModulesVisible = eventSyncVisibleState == NoModulesError, isInstructionOfflineVisible = eventSyncVisibleState == OfflineError, From faaefba5bb1127f6e8ec4a1040ac7ddbd8dd331e Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 20 Oct 2025 16:33:11 +0100 Subject: [PATCH 5/6] MS-1177 Sync button default hint removed for logout case when the button is hidden - test added --- .../usecase/ObserveSyncInfoUseCaseTest.kt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/feature/dashboard/src/test/java/com/simprints/feature/dashboard/settings/syncinfo/usecase/ObserveSyncInfoUseCaseTest.kt b/feature/dashboard/src/test/java/com/simprints/feature/dashboard/settings/syncinfo/usecase/ObserveSyncInfoUseCaseTest.kt index 6778a0a733..9c2c7a59e4 100644 --- a/feature/dashboard/src/test/java/com/simprints/feature/dashboard/settings/syncinfo/usecase/ObserveSyncInfoUseCaseTest.kt +++ b/feature/dashboard/src/test/java/com/simprints/feature/dashboard/settings/syncinfo/usecase/ObserveSyncInfoUseCaseTest.kt @@ -1050,6 +1050,24 @@ class ObserveSyncInfoUseCaseTest { assertThat(result.syncInfoSectionRecords.isInstructionDefaultVisible).isTrue() } + @Test + fun `should hide default instruction for pre-logout sync`() = runTest { + createUseCase() + + val result = useCase(isPreLogoutUpSync = true).first() + + assertThat(result.syncInfoSectionRecords.isInstructionDefaultVisible).isFalse() + } + + @Test + fun `should not hide default instruction for regular non-pre-logout sync`() = runTest { + createUseCase() + + val result = useCase().first() + + assertThat(result.syncInfoSectionRecords.isInstructionDefaultVisible).isTrue() + } + @Test fun `sync button should be disabled when not on standby`() = runTest { val mockSyncingEventSyncState = mockk(relaxed = true) { From 69e6c8bbeb279b4b89bd038091d99cad898a07a1 Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 20 Oct 2025 18:32:57 +0100 Subject: [PATCH 6/6] MS-1177 sync_info_last_sync restored (external regression) --- infra/resources/src/main/res/values/strings.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/infra/resources/src/main/res/values/strings.xml b/infra/resources/src/main/res/values/strings.xml index da431434bc..b1ceb968d1 100644 --- a/infra/resources/src/main/res/values/strings.xml +++ b/infra/resources/src/main/res/values/strings.xml @@ -372,6 +372,8 @@ Total records + Last sync: %1$s + Sync in progress Sync incomplete Sync complete, logging you out…