Skip to content

[core][ui] update jetpack compose apis to support the showcase#42734

Merged
Kudo merged 5 commits intomainfrom
@kudo/ui/support-wiki-reader
Feb 17, 2026
Merged

[core][ui] update jetpack compose apis to support the showcase#42734
Kudo merged 5 commits intomainfrom
@kudo/ui/support-wiki-reader

Conversation

@Kudo
Copy link
Copy Markdown
Contributor

@Kudo Kudo commented Jan 30, 2026

Why

add jetpack compose apis that to support the wiki reader show case

How

  • [core][ui] ad RNHostView as swift-ui
  • [core] add nestedScrollConnection composableScope that allows descendants to access it
  • [core] add Children with filter support. that to support SlotView for compound components
  • [core] add onGlobalEvent as default registered event. this aligns with swift-ui implementation and to support modifier.clickable(() => { ... })
  • [core] RecordTypeConverter to support convertFromMap with nested map
  • [ui] add Icon which supports loading material symbol xml, e.g. <Icon source={require('./path/to/symbol.xml'} />. that to align modern material symbol usage.
  • [ui] add BasicAlertDialog (m3 api), Card, FlowRow, DockedSearchBar, SearchBar, FilterChip (for aligned naming), HorizontalFloatingToolbar, LazyColumn, ListItem, PullToRefreshBox, RadioButton (for aligned naming), Spacer, Surface, ToggleButton
  • [ui] add modifiers: width, height, wrapContentWidth, wrapContentHeight, align, clickable, selectable
  • [ui] rename BottomSheetView to ModalBottomSheet that to align compose api naming
  • [ui] change clip modifier usage. remove the coupling from Shape component and use predefined constants directly. e.g. clip(Shapes.RoundedCorner(16))
  • [ui] support <Switch.ThumbContent>
  • [ui] add broder style support for Text

Test Plan

in upstack showcase

Checklist

Copy link
Copy Markdown
Contributor Author

Kudo commented Jan 30, 2026

@expo-bot
Copy link
Copy Markdown
Collaborator

expo-bot commented Jan 30, 2026

The Pull Request introduced fingerprint changes against the base commit: a089c97

Fingerprint diff
[
  {
    "op": "changed",
    "beforeSource": {
      "type": "dir",
      "filePath": "../../packages/expo-modules-core",
      "reasons": [
        "expoAutolinkingIos",
        "expoAutolinkingAndroid",
        "expoAutolinkingIos"
      ],
      "hash": "9e80db6fd0fe039df0d3b2d9fb2c25c454ff20ba"
    },
    "afterSource": {
      "type": "dir",
      "filePath": "../../packages/expo-modules-core",
      "reasons": [
        "expoAutolinkingIos",
        "expoAutolinkingAndroid",
        "expoAutolinkingIos"
      ],
      "hash": "5f49b983bc0e2a9be3208b27936882877bc34ce0"
    }
  },
  {
    "op": "changed",
    "beforeSource": {
      "type": "dir",
      "filePath": "../../packages/expo-ui/android",
      "reasons": [
        "expoAutolinkingAndroid"
      ],
      "hash": "71d911e821ffd35179576dca47381d2033001f6e"
    },
    "afterSource": {
      "type": "dir",
      "filePath": "../../packages/expo-ui/android",
      "reasons": [
        "expoAutolinkingAndroid"
      ],
      "hash": "87fb316fee431b5fc82327b27ee5735df86ceb2d"
    }
  }
]

Generated by PR labeler 🤖

@expo-bot expo-bot added bot: passed checks ExpoBot has nothing to complain about and removed bot: suggestions ExpoBot has some suggestions labels Jan 30, 2026
@Kudo Kudo force-pushed the @kudo/ui/fix-compose-fast-refresh branch from d3212c3 to ba0e240 Compare January 31, 2026 13:08
@Kudo Kudo force-pushed the @kudo/ui/support-wiki-reader branch from 1cb8820 to eb47ce5 Compare January 31, 2026 13:08
@Kudo Kudo marked this pull request as ready for review January 31, 2026 18:30
@github-actions
Copy link
Copy Markdown
Contributor

Subscribed to pull request

File Patterns Mentions
packages/expo-modules-core/** @lukmccall, @tsapeta
packages/expo-ui/** @aleqsio, @behenate, @douglowder

Generated by CodeMention

var drawable by remember { mutableStateOf<Drawable?>(null) }

// Load icon from URI asynchronously
LaunchedEffect(source) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit

Suggested change
LaunchedEffect(source) {
val uriString = source?.let { resolveUri(it) }
// Load icon from URI asynchronously
LaunchedEffect(uriString) {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i would lean toward to keep LaunchedEffect(source) here. it reflects the fact of props.source. if people intentionally pass the same { uri }, the recompose is fine though.

}

when (props.variant) {
"elevated" -> {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we going to split them into separate components ElevatedCard, OutlinedCard in future?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, will leave it for future work. we still have many variant views somewhere else

expanded = false,
onExpandedChange = {},
inputField = @Composable {
SearchBarDefaults.InputField(
Copy link
Copy Markdown
Contributor

@intergalacticspacehighway intergalacticspacehighway Feb 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Later maybe we can export it to JS as a compound component DockedSearchBar.InputField

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

leaving for future work. we need to find a way to expose SearchBarDefaults.InputField or other custom input field. may need to find a better way to support this use case

let leadingIconContent: React.ReactNode = null;
const regularChildren: React.ReactNode[] = [];

Children.forEach(props.children as any, (child) => {
Copy link
Copy Markdown
Contributor

@intergalacticspacehighway intergalacticspacehighway Feb 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: passing children as it is to native might be better. can help if there's a react component in between in the hierarchy. e.g. Fragment, Suspense or a component defined by user.

For example, we could do below with current setup:

export const DockedSearchBarNativeView.Placeholder = ({children}) => <SlotNativeView slotName="placeholder">{children}</SlotNativeView>

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's a great suggestion. added in the latest commit

Copy link
Copy Markdown
Contributor

@intergalacticspacehighway intergalacticspacehighway left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👏 . Added some comments/questions. Can be done in separate PR too.

@Kudo Kudo force-pushed the @kudo/ui/support-wiki-reader branch from eb47ce5 to 410ddc3 Compare February 16, 2026 17:40
@Kudo Kudo force-pushed the @kudo/ui/fix-compose-fast-refresh branch from ba0e240 to fb3baa9 Compare February 16, 2026 17:40
@Kudo
Copy link
Copy Markdown
Contributor Author

Kudo commented Feb 16, 2026

👏 . Added some comments/questions. Can be done in separate PR too.

much appreciated for the great review. updating changes or leaving inline comments. thanks!

@Kudo Kudo force-pushed the @kudo/ui/support-wiki-reader branch from 410ddc3 to 96e077d Compare February 16, 2026 17:51
@Kudo Kudo force-pushed the @kudo/ui/fix-compose-fast-refresh branch from fb3baa9 to baa1223 Compare February 17, 2026 06:30
@Kudo Kudo force-pushed the @kudo/ui/support-wiki-reader branch from 96e077d to bff1687 Compare February 17, 2026 06:30
@Kudo Kudo changed the base branch from @kudo/ui/fix-compose-fast-refresh to graphite-base/42734 February 17, 2026 07:35
@Kudo Kudo force-pushed the graphite-base/42734 branch from baa1223 to cdb81aa Compare February 17, 2026 07:36
@Kudo Kudo force-pushed the @kudo/ui/support-wiki-reader branch from bff1687 to a18b66f Compare February 17, 2026 07:36
@graphite-app graphite-app bot changed the base branch from graphite-base/42734 to main February 17, 2026 07:36
---------

Co-authored-by: nishan (o^▽^o) <nishanbende@gmail.com>
@Kudo Kudo force-pushed the @kudo/ui/support-wiki-reader branch from a18b66f to d689237 Compare February 17, 2026 07:36
@Kudo Kudo merged commit cac0c20 into main Feb 17, 2026
14 of 17 checks passed
@Kudo Kudo deleted the @kudo/ui/support-wiki-reader branch February 17, 2026 07:38
benjaminkomen pushed a commit to benjaminkomen/expo that referenced this pull request Feb 25, 2026
…42734)

# Why

add jetpack compose apis that to support the wiki reader show case

# How

- [core][ui] ad RNHostView as swift-ui
- [core] add `nestedScrollConnection` composableScope that allows descendants to access it
- [core] add Children with filter support. that to support SlotView for compound components
- [core] add `onGlobalEvent` as default registered event. this aligns with swift-ui implementation and to support `modifier.clickable(() => { ... })`
- [core] `RecordTypeConverter` to support convertFromMap with nested map
- [ui] add Icon which supports loading material symbol xml, e.g. `<Icon source={require('./path/to/symbol.xml'} />`. that to align modern material symbol usage.
- [ui] add BasicAlertDialog (m3 api), Card, FlowRow, DockedSearchBar, SearchBar, FilterChip (for aligned naming), HorizontalFloatingToolbar, LazyColumn, ListItem, PullToRefreshBox, RadioButton (for aligned naming), Spacer, Surface, ToggleButton
- [ui] add modifiers: width, height, wrapContentWidth, wrapContentHeight, align, clickable, selectable
- [ui] rename BottomSheetView to ModalBottomSheet that to align compose api naming 
- [ui] change clip modifier usage. remove the coupling from Shape component and use predefined constants directly. e.g. `clip(Shapes.RoundedCorner(16))`
- [ui] support `<Switch.ThumbContent>`
- [ui] add broder style support for Text

---------

Co-authored-by: nishan (o^▽^o) <nishanbende@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot: fingerprint changed bot: passed checks ExpoBot has nothing to complain about

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants