Replies: 3 comments 12 replies
-
You have to define the modifiers that you want to support in your design system. Our test app, for example, does define a background color modifier: redwood/test-app/schema/src/main/kotlin/com/example/redwood/testapp/schema.kt Lines 143 to 147 in 689eb56 Redwood is not a UI toolkit so it does not offer general-purpose widgets or modifiers. It is a system for defining a shared design system and binding common composables to platform-specific implementations of that design system (using platform-specific UI toolkits). |
Beta Was this translation helpful? Give feedback.
-
I got your point ,will check and try to fix it as we can't wait for next
year !!
Will post here if required any guidance
…On Wed, 5 Mar, 2025, 22:34 Jake Wharton, ***@***.***> wrote:
Our layout system is shared by multiple UI toolkits and they all need to
behave the same way. So we have a single layout engine that every platform
uses based on flexbox.
From what we can tell, we need to change our view type from @composable
() -> Unit to @composable (Modifier) -> Unit, and then we need to change
the callback for unscoped modifiers which exist on the widget factory to
also return a new instance. This would allow you do something like
fun backgroundModifier(modifier: BackgroundModifier, view: @composable (Modifier) -> Unit): @composable (Modifier) -> Unit {
return {
view(it.backgroundColor(modifier.color))
}
}
Frankly, I do not expect this to be an easy change to make which is why we
haven't done it yet either. Compose UI support is going to be a focus of
ours later in the year, so it should get fixed that.
—
Reply to this email directly, view it on GitHub
<#2564 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BNJQBC32I2HNCWTZA5YQPT32S4VAHAVCNFSM6AAAAABXS3BE5WVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTENBQGQZDOMI>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
@JakeWharton seems we need to make -compose for guest/host protocol as well , as required @composable annotatoion, |
Beta Was this translation helpful? Give feedback.
-
Hi @JakeWharton ,
While writing code we realize all the modifier and param are not available in the redwood compose which can we available in compose ui for Row,Column, Box like background color,clip padding ,clickable.. width/height custom value
Currently it seems not open for extend..
could you please suggest way to easily get control and add these param and modifier?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions