From d311b8e95527fc2b55a34571d25427c8a964dbd3 Mon Sep 17 00:00:00 2001 From: avashilling <165050625+avashilling@users.noreply.github.com> Date: Wed, 5 Nov 2025 11:44:37 -0500 Subject: [PATCH] update analytics access request copy change copy to reflect that only requesting admins can view analytics (from both ends), and also includes a list of requesting admins to see who user is giving access to. --- lib/l10n/intl_en.arb | 9 ++++++--- .../analytics_request_indicator.dart | 12 +++++++----- .../space_analytics_requested_dialog.dart | 13 ++++++++----- 3 files changed, 21 insertions(+), 13 deletions(-) diff --git a/lib/l10n/intl_en.arb b/lib/l10n/intl_en.arb index 05946591b..1df054795 100644 --- a/lib/l10n/intl_en.arb +++ b/lib/l10n/intl_en.arb @@ -5052,8 +5052,8 @@ "requestSummaries": "Request summaries", "loadingActivitySummary": "Loading activity summary...", "generatingNewActivities": "You're the first user of this language pair! Please give us a minute, we're preparing activities just for you.", - "requestAccessTitle": "Request to analytics view access?", - "requestAccessDesc": "Would you like to request access to view participant analytics?\n\nIf participants agree, admins of this course will be able to view their:\n • total vocabulary\n • total grammar concepts\n • total activity sessions completed\n • the specific grammar concepts used, correctly and incorrectly\n\nThey will not be able to view their:\n • messages in chats outside the course\n • vocabulary list", + "requestAccessTitle": "Request analytics access?", + "requestAccessDesc": "Would you like to request access to view participant analytics?\n\nIf participants agree, you will be able to view their:\n • total vocabulary\n • total grammar concepts\n • total activity sessions completed\n • the specific grammar concepts used, correctly and incorrectly\n\nYou will not be able to view their:\n • messages in chats outside the course\n • vocabulary list", "requestAccess": "Request access ({count})", "@requestAccess": { "type": "String", @@ -5066,10 +5066,13 @@ "analyticsInactiveTitle": "Requests to inactive users couldn’t be sent", "analyticsInactiveDesc": "Inactive users who haven't logged in since this feature was introduced won't see your request.\n\nThe Request button will appear once they return. You can resend the request later by clicking the Request button under their name when it's available.", "accessRequestedTitle": "Analytics Access Request", - "accessRequestedDesc": "The administrators of “{space}” are requesting to view your learning analytics.\n\nIf you agree, admins of this course will be able to view your:\n • total vocabulary\n • total grammar concepts\n • total activity sessions completed\n • the specific grammar concepts used, correctly and incorrectly\n\nThey will not be able to view your:\n • messages in chats outside the course\n • vocabulary list", + "accessRequestedDesc": "Requesting admin(s): {admin} \n\nAdmins from “{space}” are requesting to view your learning analytics.\n\nIf you agree, They will be able to view your:\n • total vocabulary\n • total grammar concepts\n • total activity sessions completed\n • the specific grammar concepts used, correctly and incorrectly\n\nThey will not be able to view your:\n • messages in chats outside the course\n • vocabulary list", "@accessRequestedDesc": { "type": "String", "placeholders": { + "admin": { + "type": "String" + }, "space": { "type": "String" } diff --git a/lib/pangea/space_analytics/analytics_request_indicator.dart b/lib/pangea/space_analytics/analytics_request_indicator.dart index 4a63dd23f..e1f976a20 100644 --- a/lib/pangea/space_analytics/analytics_request_indicator.dart +++ b/lib/pangea/space_analytics/analytics_request_indicator.dart @@ -1,15 +1,13 @@ import 'dart:async'; -import 'package:flutter/material.dart'; - -import 'package:matrix/matrix.dart'; - import 'package:fluffychat/config/app_config.dart'; import 'package:fluffychat/config/themes.dart'; import 'package:fluffychat/l10n/l10n.dart'; import 'package:fluffychat/pangea/analytics_misc/client_analytics_extension.dart'; import 'package:fluffychat/pangea/space_analytics/space_analytics_requested_dialog.dart'; import 'package:fluffychat/widgets/future_loading_dialog.dart'; +import 'package:flutter/material.dart'; +import 'package:matrix/matrix.dart'; class AnalyticsRequestIndicator extends StatefulWidget { final Room room; @@ -70,10 +68,14 @@ class AnalyticsRequestIndicatorState extends State { } Future _onTap(BuildContext context) async { + final requestingUsers = _knockingAdmins.keys.toList(); final resp = await showDialog( context: context, builder: (context) { - return SpaceAnalyticsRequestedDialog(room: widget.room); + return SpaceAnalyticsRequestedDialog( + room: widget.room, + requestingUsers: requestingUsers, + ); }, ); diff --git a/lib/pangea/space_analytics/space_analytics_requested_dialog.dart b/lib/pangea/space_analytics/space_analytics_requested_dialog.dart index 399f5f294..26ffc5df7 100644 --- a/lib/pangea/space_analytics/space_analytics_requested_dialog.dart +++ b/lib/pangea/space_analytics/space_analytics_requested_dialog.dart @@ -1,20 +1,20 @@ -import 'package:flutter/material.dart'; - import 'package:cached_network_image/cached_network_image.dart'; -import 'package:material_symbols_icons/symbols.dart'; -import 'package:matrix/matrix.dart'; - import 'package:fluffychat/config/app_config.dart'; import 'package:fluffychat/config/themes.dart'; import 'package:fluffychat/l10n/l10n.dart'; import 'package:fluffychat/pangea/analytics_page/analytics_page_constants.dart'; import 'package:fluffychat/pangea/common/widgets/full_width_dialog.dart'; +import 'package:flutter/material.dart'; +import 'package:material_symbols_icons/symbols.dart'; +import 'package:matrix/matrix.dart'; class SpaceAnalyticsRequestedDialog extends StatelessWidget { final Room room; + final List requestingUsers; const SpaceAnalyticsRequestedDialog({ super.key, required this.room, + required this.requestingUsers, }); @override @@ -39,6 +39,9 @@ class SpaceAnalyticsRequestedDialog extends StatelessWidget { ), Text( L10n.of(context).accessRequestedDesc( + requestingUsers + .map((u) => u.calcDisplayname()) + .join(", "), room.getLocalizedDisplayname(), ), style: TextStyle(fontSize: isColumnMode ? 16.0 : 14.0),