-
Notifications
You must be signed in to change notification settings - Fork 734
Live Code - support more components 2 #3272
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…code-add-more-components-2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
About what you wrote
General issue: react-native’s Animated is not working properly on web (see docs)
We'll have to figure it out, let's create a list with problematic components and the reason to tackle later
Carousel - cannot drag (probably because of Animated) and initial page is bugged (starts on first page but then scrolls to the correct page, probably fixable)
It doesn't drag, you scroll to move the carousel.. it makes sense because in mobile you drag scrollviews and in web you just scroll with the mouse
Assets: can we use web assets somehow so we don’t need to set icon’s sizes?
Maybe create a config for Icon component to have a size, I think we do the same in private uilib
Wrote my suggestion in another comment (lets continue there).
Makes sense 🤦♂️
I'll take a look |
Something else, do you like the |
I can make this work (override |
setState?: React.Dispatch<React.SetStateAction<boolean>>; | ||
} | ||
|
||
export function renderBooleanOption(title: string, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great, it can help with the playground controls..
Anyway, I know this is how we did it before (render methods), what if we'll change it actual components to make it more readable and also maybe adjust the names a little.
We can have ToggleControl
(instead of BooleanOption) and later on more controls like SegmentsControl
, SliderControl
, etc..
We can have them share a similar interface for state
and setState
, etc..
@ethanshar
Icon example:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved, I see you didn't set any fixed size in the Icon config, I assume you didn't need it?
There's a default for web (16), the code is old - around a year and a half |
Description
Live Code - support more components 1
Go over each commit alone (or don't)
General issue:
react-native
’sAnimated
is not working properly on web (see docs)Carousel - cannot drag (probably because of
Animated
) and initial page is bugged (starts on first page but then scrolls to the correct page, probably fixable)Drawer - not working (probably because of
Animated
)Assets: can we use web assets somehow so we don’t need to set icon’s sizes?
Changelog
None
Additional info
None