+semver:minor Added PrivacyDlg to allow control over analytics tracking#1493
+semver:minor Added PrivacyDlg to allow control over analytics tracking#1493
Conversation
…tics tracking is allowed Added elements to TestApp to exercise the new Privacy dialog
Palaso Tests 4 files ±0 4 suites ±0 10m 12s ⏱️ -1s Results for commit 751a8f3. ± Comparison against base commit ce83cef. This pull request skips 1 test.♻️ This comment has been updated with latest results. |
tombogle
left a comment
There was a problem hiding this comment.
@tombogle made 2 comments and resolved 2 discussions.
Reviewable status: 0 of 11 files reviewed, all discussions resolved (waiting on andrew-polk, mark-sil, and megahirt).
Fixed incomplete comment.
tombogle
left a comment
There was a problem hiding this comment.
@tombogle made 1 comment.
Reviewable status: 0 of 12 files reviewed, 3 unresolved discussions (waiting on andrew-polk, mark-sil, and megahirt).
# Conflicts: # CHANGELOG.md
…omponents. Includes a Privacy dialog to enable users to opt out of analytics reporting. Added PathUtilities.ParentDirectories extension method. Added FileLocationUtilities.DistFilesFolderPath extension method. Added installer for SIL.Windows.Forms.TestApp - not intended for deployment, just a testbed for the wxs files in SIL.Installer
b81717a to
a579667
Compare
# Conflicts: # CHANGELOG.md
…rPath set by app. This addresses a concern raised by Devin (which in practice is probably not really a problem).
4cc5955 to
38929ff
Compare
38929ff to
df546f8
Compare
… reinstall Fixed problem of shared fixed GUID being used across all products
| <Component Id="GlobalAnalyticsSetting" Guid="{5D729D52-F0E1-443F-AA40-664AA754F1C1}"> | ||
| <Condition><![CDATA[SIL_ANALYTICS_APPLY_GLOBALLY = "1"]]></Condition> | ||
| <RegistryKey Root="HKCU" Key="$(var.GlobalAnalyticsRegistryKey)"> | ||
| <RegistryValue | ||
| Name="Enabled" | ||
| Type="integer" | ||
| Value="[SIL_ANALYTICS_ENABLED_GLOBALLY]" | ||
| KeyPath="yes" /> | ||
| </RegistryKey> | ||
| </Component> |
There was a problem hiding this comment.
🚩 WiX GlobalAnalyticsSetting component uses fixed GUID shared across all SIL products
The GlobalAnalyticsSetting component at line 81 uses a hardcoded GUID {5D729D52-F0E1-443F-AA40-664AA754F1C1} so all SIL products share ownership of the global Software\SIL\Analytics registry key. MSI reference counting means the key is only removed when the last product referencing it is uninstalled. However, the component condition SIL_ANALYTICS_APPLY_GLOBALLY = "1" is evaluated per-product on each install/upgrade. If a product was previously installed with this condition true (global applied) and on reinstall the condition becomes false (e.g., user set a product-specific override via the C# dialog), MSI could deregister this product's reference to the shared component. If no other SIL product is installed, this would delete the global registry key. This edge case is mitigated by the fact that the C# AnalyticsProxy.Update method (not the installer) is the primary mechanism for changing settings at runtime.
Was this helpful? React with 👍 or 👎 to provide feedback.
There was a problem hiding this comment.
This concern requires two simultaneous conditions:
GLOBAL_ANALYTICS_SETTINGis non-null (the shared component is installed for this product)- The Privacy dialog runs and the user unchecks the global checkbox →
SIL_ANALYTICS_ENABLED_GLOBALLYbecomes null → Transitive schedules removal
But condition 2 can't happen when condition 1 is true, because AnalyticsNavigation.wxs only routes to PrivacyDlg when NOT PRODUCT_ANALYTICS_SETTING AND NOT GLOBAL_ANALYTICS_SETTING. If the global key exists, the dialog is bypassed entirely, the normalization CAs set SIL_ANALYTICS_ENABLED_GLOBALLY from the existing value, and the component condition stays TRUE throughout. The shared component's reference count is never at risk from this code path.
…not set for the current user in the registry
| <Project> | ||
| <Import Project="..\Directory.Build.props" /> | ||
|
|
||
| <PropertyGroup> | ||
| <Product>$(AssemblyName)</Product> | ||
| </PropertyGroup> | ||
| </Project> No newline at end of file |
There was a problem hiding this comment.
🚩 New TestApps/Directory.Build.props changes Product metadata for all test apps
This new file overrides <Product> from libpalaso (root Directory.Build.props:7) to $(AssemblyName) for all projects under TestApps/. This affects Application.ProductName in WinForms apps. Currently only SIL.Windows.Forms.TestApp uses Application.ProductName (at Program.cs:72 for the AnalyticsProxy). Other test apps under TestApps/ (ArchivingTestApp, ClipboardTestApp, etc.) don't reference Application.ProductName, so they're not affected functionally. However, their assembly metadata will change, which could affect things like user settings file paths (Application.UserAppDataPath includes ProductName).
Was this helpful? React with 👍 or 👎 to provide feedback.
There was a problem hiding this comment.
I think this is desirable. In practice, it really shouldn't matter much since these are just test apps. In theory, it could affect another developer's experience in minor ways when re-running a test app, but I doubt it will. Going forward, it just makes more sense for each app to have a distinct identity.
Properly parameterized and documented some overridable installer values. Added targets to compile the WiX fragments with candle.exe to catch syntax and schema errors early. Also fixed race condition that causes net462 build to fail
| <Component Id="GlobalAnalyticsSetting" Guid="{5D729D52-F0E1-443F-AA40-664AA754F1C1}"> | ||
| <Condition><![CDATA[SIL_ANALYTICS_APPLY_GLOBALLY = "1"]]></Condition> | ||
| <RegistryKey Root="HKCU" Key="$(var.GlobalAnalyticsRegistryKey)"> | ||
| <RegistryValue | ||
| Name="Enabled" | ||
| Type="integer" | ||
| Value="[SIL_ANALYTICS_ENABLED_GLOBALLY]" | ||
| KeyPath="yes" /> | ||
| </RegistryKey> | ||
| </Component> |
There was a problem hiding this comment.
This concern requires two simultaneous conditions:
GLOBAL_ANALYTICS_SETTINGis non-null (the shared component is installed for this product)- The Privacy dialog runs and the user unchecks the global checkbox →
SIL_ANALYTICS_ENABLED_GLOBALLYbecomes null → Transitive schedules removal
But condition 2 can't happen when condition 1 is true, because AnalyticsNavigation.wxs only routes to PrivacyDlg when NOT PRODUCT_ANALYTICS_SETTING AND NOT GLOBAL_ANALYTICS_SETTING. If the global key exists, the dialog is bypassed entirely, the normalization CAs set SIL_ANALYTICS_ENABLED_GLOBALLY from the existing value, and the component condition stays TRUE throughout. The shared component's reference count is never at risk from this code path.
tombogle
left a comment
There was a problem hiding this comment.
@tombogle made 2 comments and resolved 3 discussions.
Reviewable status: 0 of 31 files reviewed, 1 unresolved discussion (waiting on andrew-polk, mark-sil, and megahirt).
| <Project> | ||
| <Import Project="..\Directory.Build.props" /> | ||
|
|
||
| <PropertyGroup> | ||
| <Product>$(AssemblyName)</Product> | ||
| </PropertyGroup> | ||
| </Project> No newline at end of file |
There was a problem hiding this comment.
I think this is desirable. In practice, it really shouldn't matter much since these are just test apps. In theory, it could affect another developer's experience in minor ways when re-running a test app, but I doubt it will. Going forward, it just makes more sense for each app to have a distinct identity.


Added new
SIL.Installerpackage for common installer components. Includes a Privacy dialog to enable users to opt out of analytics reporting.Added two public members currently just used in Test App but potentially useful elsewhere:
Added elements to TestApp to exercise the new Privacy dialog
Added installer for SIL.Windows.Forms.TestApp - not intended for deployment, just a testbed for the wxs files in SIL.Installer
Added elements to TestApp to exercise the new Privacy dialog
This change is