Port app to Fabric
chrisglein opened this issue · 8 comments
Summary
Started with this as a basis: https://github.com/chiaramooney/sample-fabric
But in 0.73+ this is now replaced with the official app template: https://github.com/microsoft/react-native-windows/wiki/Using-the-new-architecture-templates
Plan
- Stubbed out all dependencies
- Made a quick JS-only implementation of
Picker
andPopup
- Try to bring in the JS-only dependencies (to get
Markdown
working again, for example) - Take a crack at local native code (version info, but not on UWP) - need to learn about Fabric codegen?
- Non-UWP alternatives for other non-UI module dependencies (If needed?)
- Modify min Fabric app sample to be packaged? Should get access to some of the UWP-style APIs? (e.g. Clipboard via DataTransfer)
-
Clipboard
- Local workaround
- Restore use of "@react-native-clipboard/clipboard"
-
AsyncStorage
- Restore use of "@react-native-async-storage/async-storage"
- UI module dependencies
- Picker
- Local workaround
- Restore use of "@react-native-picker/picker"
- Picker
- Identify the key gaps in what it's implemented for RNW Fabric thus far
- Copy app
.png
assets to.ico
files - Release Fabric version of app to store
Issues Found
- microsoft/react-native-windows#11452 Typing produces double keypresses
- microsoft/react-native-windows#11456 Button text does not render
- microsoft/react-native-windows#11456 Button background/border does not render
- microsoft/react-native-windows#11486 Caret in wrong position
- microsoft/react-native-windows#11549 Bottom border doesn't render
- microsoft/react-native-windows#11564 Need to run Metro in the meantime
- microsoft/react-native-windows#11763 Chat entry has no background plate (will be a difference between Paper and Fabric)
- microsoft/react-native-windows#11764
- Accessibility headers/groups not showing in Accessibility Insights
- Invoke pattern on button components does not invoke them (may need app side to use
onAccessibilityTap
) - microsoft/react-native-windows#12075
ScrollView
does not display a scroll bar - microsoft/react-native-windows#12076
ScrollView
cannot be controlled with keyboard events (page up, page down, home, end) - microsoft/react-native-windows#11489 Components do not respond to dark mode
- microsoft/react-native-windows#12786
Not Yet Implemented
- microsoft/react-native-windows#11457
- microsoft/react-native-windows#11458
- microsoft/react-native-windows#11459
- microsoft/react-native-windows#11460
- microsoft/react-native-windows#11461
- microsoft/react-native-windows#11462
- microsoft/react-native-windows#12074
Screenshot of In-Progress Implementation
Latest comparison of Paper to Fabric:
Paper | Fabric |
---|---|
Technically the left version was on the #114 branch, so it's not quite apples to apples. And the size difference is due to running on different machines. But it gives you the gist.
That previous set of screenshots was across 2 different machines with different resolutions. Here's a more apples to apples comparison (both running side by side on same dev box):
Paper | Fabric |
---|---|
For the dialogs, the Paper version was using the RNW Popup
component, which doesn't exist in Fabric. Alongside some other control dependencies like Picker
. So there are some placeholders here in the meantime:
Paper | Fabric |
---|---|
Are we missing a border in those tables? (The horizontal lines) Any idea what that is? I thought our border implementation on fabric is actually more complete than the paper one.
Are we missing a border in those tables? (The horizontal lines) Any idea what that is? I thought our border implementation on fabric is actually more complete than the paper one.
Yeah, I had noticed that one but haven't had a chance to dig in yet. I'm using a JS-only module for markdown rendering, and the styling for those tables should be here. That table element is using borderBottomWidth
. So it appears that in Fabric the borderBottomWidth
isn't registering. It's marked as completed in the table, so I assume there's a bug somewhere in the handling. I'll poke around and open a bug to track this (update: here's the bug).
Would probably be possible to merge this sooner if there was the ability to have file redirects for fabric components. Example: mycomponent.windows.fabric.js.