react-native-windows icon indicating copy to clipboard operation
react-native-windows copied to clipboard

Share timer implementation

Open acoates-ms opened this issue 1 year ago • 3 comments

We have two implementations of the TimingModule in the repo. One that we use in Office and one used in XAML apps. With this change we will move to the implementation that does not depend on XAML functions, which also makes it easier for people hooking RNW to run against a different UI platforms, to no longer need to provide a custom Timer module.

Since its likely that replacing the TimingModule could have weird affects on apps, I've provided a quirk setting to revert back to the old implementation until we get confirmation that the new one doesn't cause undue regressions.

Microsoft Reviewers: Open in CodeFlow

acoates-ms avatar Jul 28 '22 16:07 acoates-ms

Since its likely that replacing the TimingModule could have weird affects on apps, I've provided a quirk setting to revert back to the old implementation until we get confirmation that the new one doesn't cause undue regressions.

I think we would want the quirk to work the other way by default, if it's not set, we should default to what already works for UWP apps, until we have confirmation it doesn't break anything

I dont think we'll get much in app test coverage with it off by default. Most apps are not going to go through and do the extra work to enable it.

acoates-ms avatar Jul 28 '22 20:07 acoates-ms

IIRC the Office timer doesn't have correct semantics to support requestAnimationFrame() as polyfilled by react-native. https://github.com/facebook/react-native/blob/1af2beaaa34ac01f04b14035acdfe0a5ecb329d8/Libraries/Core/Timers/JSTimers.js#L259

See https://github.com/microsoft/react-native-windows/issues/6032 and Eric's fix for some more context.

NickGerleman avatar Jul 29 '22 10:07 NickGerleman

+1 @NickGerleman. I'm all for ridding the implementation of DispatcherTimer, but all other platforms fire RAF callbacks on frame boundaries, so I'd be concerned that this would break JS -driven Animated xplat consistency. Given the bugs in NativeAnimated, we should ensure those work properly.

rozele avatar Jul 30 '22 03:07 rozele

ping @vmoroz

chiaramooney avatar Mar 29 '23 21:03 chiaramooney

@acoates-ms Can you put this as a draft?

jonthysell avatar Sep 18 '23 18:09 jonthysell