alexeyinkin commented on code in PR #24957:
URL: https://github.com/apache/beam/pull/24957#discussion_r1131054023


##########
learning/tour-of-beam/frontend/lib/models/event_context.dart:
##########
@@ -18,27 +18,31 @@
 
 import 'package:equatable/equatable.dart';
 
-class AnalyticsEvent with EquatableMixin {
-  final String action;
-  final String category;
-  final String? label;
-  final Map<String, String>? parameters;
-  final int? value;
+const _none = 'none';
 
-  AnalyticsEvent({
-    required this.action,
-    required this.category,
-    this.label,
-    this.parameters,
-    this.value,
+/// Basic information of the Tour of Beam state to augment analytics events.
+class TobEventContext with EquatableMixin {
+  const TobEventContext({
+    required this.sdkId,
+    required this.unitId,
   });
 
+  final String? sdkId;
+  final String? unitId;
+
+  static const empty = TobEventContext(
+    sdkId: null,
+    unitId: null,
+  );

Review Comment:
   1. I would rather keep it `Tob` because we have many classes that need to 
emphasize their belonging to TourOfBeam. With this many classes we may assume 
the reader will soon be familiar with `Tob`. Some of the classes are long 
already. Some of them will become ambiguous if expanded, like is 
`TourOfBeamMarkdown` a 'Tour of BeamMarkdown'? 
   
   
![image](https://user-images.githubusercontent.com/44893228/224039942-01f4c619-c3f8-453e-a0f5-216df858f8ee.png)
   
   2. We need to compare objects in tests. `EqualityMixin` takes care of both 
`operator ==` and `hashCode`.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to