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

Use compose to render Switch in Fabric

Open ShikaSD opened this issue 3 years ago • 5 comments

Summary: This change is a proof of concept to try Compose integration with RN component on Android by measuring and drawing Switch component through a Composable function.

To interface Composable nodes with the view system, we use a "classic" view interoperability layer to plug Compose-based Switch into existing ViewManager and propagate props and events as we do with “classic” views.

Fabric also requires initial measure during layout, which was implemented through custom background Recomposer and LayoutNode hacks to avoid creating full-blown view.

Differential Revision: D31657259

ShikaSD avatar Jan 11 '22 16:01 ShikaSD

This pull request was exported from Phabricator. Differential Revision: D31657259

facebook-github-bot avatar Jan 11 '22 16:01 facebook-github-bot

For reference: screencap + Flipper layout view

image (1)

ShikaSD avatar Jan 11 '22 16:01 ShikaSD

Messages
:book:

:clipboard: Missing Changelog - Can you add a Changelog? To do so, add a "## Changelog" section to your PR description. A changelog entry has the following format: [CATEGORY] [TYPE] - Message.

CATEGORY may be:
  • General
  • iOS
  • Android
  • JavaScript
  • Internal (for changes that do not need to be called out in the release notes)

TYPE may be:

  • Added, for new features.
  • Changed, for changes in existing functionality.
  • Deprecated, for soon-to-be removed features.
  • Removed, for now removed features.
  • Fixed, for any bug fixes.
  • Security, in case of vulnerabilities.

MESSAGE may answer "what and why" on a feature level. Use this to briefly tell React Native users about notable changes.

Generated by :no_entry_sign: dangerJS against ac9eb363b931756b4fe99422f6f4be4e9a727efb

pull-bot avatar Jan 11 '22 16:01 pull-bot

Platform Engine Arch Size (bytes) Diff
ios - universal n/a --

Base commit: 0fccbd53af86083a8742a33282dc183d07eb27a2 Branch: main

analysis-bot avatar Jan 11 '22 17:01 analysis-bot

This PR is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] avatar Jul 11 '22 02:07 github-actions[bot]