RUM-11121: Make accessibility send only mutations#2806
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #2806 +/- ##
===========================================
+ Coverage 69.93% 70.02% +0.09%
===========================================
Files 834 834
Lines 31225 31296 +71
Branches 5243 5259 +16
===========================================
+ Hits 21837 21914 +77
+ Misses 7908 7907 -1
+ Partials 1480 1475 -5
🚀 New features to boost your workflow:
|
63e97a5 to
97fa265
Compare
b4fe983 to
4c0300a
Compare
4c0300a to
d674678
Compare
edfd0ad
| } | ||
|
|
||
| /** | ||
| * Whether to collect accessibility attributes inside the RUM view update event. |
There was a problem hiding this comment.
Customers unlikely know that RUM View update event is. Maybe we can simply remove inside the RUM view update event part?
| // for a give viewId in the batch, because backend will do the same during the reduce process | ||
| @Suppress("UnsafeThirdPartyFunctionCall") // if there is a meta, there is a max doc version | ||
| viewMeta.documentVersion == maxDocVersionByViewId.getValue(viewMeta.viewId) | ||
| viewMeta.hasAccessibility == true || |
There was a problem hiding this comment.
so if we have accessibility enabled, we simply don't have any view reducing on the client side? do I get it right?
Or not every view update has hasAccessibility even if accessibility collection is enabled?
| textSize = forge.aNullable { forge.aString() }, | ||
| rtlEnabled = forge.aNullable { forge.aBool() }, | ||
| screenReaderEnabled = forge.aNullable { forge.aBool() }, | ||
| increaseContrastEnabled = forge.aNullable { forge.aBool() }, | ||
| reducedAnimationsEnabled = forge.aNullable { forge.aBool() }, | ||
| invertColorsEnabled = forge.aNullable { forge.aBool() }, | ||
| singleAppModeEnabled = forge.aNullable { forge.aBool() } |
There was a problem hiding this comment.
minor, aNullable already has Forge as a receiver in the lambda, so it can be forge.aNullable { aString }, etc.
What does this PR do?
Previous state:
Accessibility attributes were collected and sent only when the flag
collectAccessibilitySettingswas set, this flag being an internal flag inRumInternalProxy. Attributes were sent as custom tags in view update events.New state:
Accessibility attributes will be sent for all users who set the feature flag
collectAccessibility(which is now public inRumConfigurationand has been renamed to match the ios api). The attributes will be sent as part of the view schema and not as custom tags. Additionally these attributes aresend-only-once, meaning that accessibility attributes are only sent the first time they have a non-null value, and subsequently only if they change.Api for accessibility:
.collectAccessibility(enabled = true/false)
Motivation
Part of the effort to expand metadata visibility.
Additional Notes
Contains an update to the RUM schema to support sending the RTL Enabled attribute - this attribute indicates whether right-to-left layout was set on the user's device.
Contains a change to how view filtering works. Previously we sent only the view update with the max doc version, however this causes issues with the send-only-once mechanism. Therefore we now send if either the previous condition was true OR the update contains accessibility changes.
Review checklist (to be filled by reviewers)