You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Our motion components read the preference for reduced motion from the browser, which is automatically in sync with the OS setting (e.g. "Animation effects" in Windows):
However, Teams has its own setting to "Turn off animations", and this Teams setting is not connected to the OS setting:
Thus, our motion components currently do not respond to the Teams settings to turn off animations.
Solution to Investigate
Teams has a useDisableAnimationshook for consuming the Teams motion toggle.
However, the motion components should not consume this Teams hook directly:
Architecturally, our components are in Fluent, so they need to be app-agnostic, not reach out to look for specific app settings.
Instead, Teams code should read the setting and configure the motion components from the outside-in.
Lingfan added a new mechanism MotionBehaviourContext which can tell all motion components within it to disable motions, via React context.
Lingfan's immediate use case (for Simple Collab Left Rail) was to temporarily disable motion in Tree, during drag and drop. However, we would like to use the same mechanism at the app level to disable motion for any motion component within Teams.
Prior art: there is a place in Teams code where the Animation component from Fluent v0 (Stardust) is configured to disable animations from the outside in, using a context provider:
We can follow this precedent to try a spike, to feed the Teams setting for disabling motions into a new MotionBehaviourContext, wrapping around Teams at its base.
Testing Considerations
We should confirm with Teams Engineering the intended behavior: whether the Teams motion toggle should completely ignore the OS setting, and override it.
MotionBehaviourContext inside a MotionBehaviourContext: we should check that overriding works as desired, e.g. that the app-level setting and the drag-and-drop use case (see above) work in harmony.
Future Work
Shift and Lingfan would like to see this Teams motion toggle removed, in favor of relying solely on the OS setting.
Shift mentioned the Teams PM for Accessibility is Brett Humphrey, who would be involved in a decision to remove the Teams motion toggle to rely on the OS setting.
The text was updated successfully, but these errors were encountered:
Tasks:
Problem Background
Solution to Investigate
useDisableAnimations
hook for consuming the Teams motion toggle.MotionBehaviourContext
which can tell all motion components within it to disable motions, via React context.MotionBehaviourContext
, wrapping around Teams at its base.Testing Considerations
MotionBehaviourContext
inside aMotionBehaviourContext
: we should check that overriding works as desired, e.g. that the app-level setting and the drag-and-drop use case (see above) work in harmony.Future Work
The text was updated successfully, but these errors were encountered: