Closed jeluard closed 5 years ago
Issue Status: 1. Open 2. Started 3. Submitted 4. Done
This issue now has a funding of 300.0 DAI (300.0 USD @ $1.0/DAI) attached to it as part of the Status.im fund.
@eswarasai Are you still interested in this one?
@jeluard -- Looks like someone had already applied for this. I'll let @grigio take a shot at this while I get the color palette story done :)
@eswarasai Sorry about that!
@jeluard Hi, I did some tests and it seems storybook 5 is still incompatible with storybook 5.x
A possible solution could be to downgrade the project to storybook 4.x or wait until storybook 5.x reenable the RN support source: https://github.com/storybooks/storybook/issues/5893
SGTM!
Can you detail what you plan to do (based on the issue details)?
I can't estimate when it will be fixed in mainstream.So I'd try to downgrade your project to 4.x and follow https://gist.github.com/johnwylie70/1f019c643641f56b400acc78415d398d as specified in the issue. Is OK for you?
@grigio I mean how do you plan to support both react and react-native components? See this issue description for examples approaches.
I'd rather have you detail your plan before you invest time in it, just to make sure we are on the same page.
@jeluard Ah ok, because in Gitcoin the issue hasn't been updated. If you are referring to react-native-web
it is an abstraction and some components couldn't be available to the web.
My proposal to complete this issue is to have a working react-native version and check some basic react-native-web compatibility (bc you wrote you are interested in a React-Native first project)
The goal of the issue is to have a strategy and the repo ready so that components supported on both react-native and react can be created. React support is already setup. By react-native first I mean the syntax used to declare the components (probably react-native like and use react-native-web if needed for web support).
Sorry if that wasn't clear enough.
Sure, If the project has RN style components it should also work with RNW. I just wanted to specify that some features could need a different implementation from platform to platform. (es. in-app purchases)
Perfect! Just wanted to make sure that we are on the same page! :D Ideally you could create a dumb button or something simplistic to demo the usage.
Most of our components are pretty low level so I feel like we can achieve high reuse>
https://github.com/grigio/status-components-sandbox
Issue Status: 1. Open 2. Started 3. Submitted 4. Done
Work for 300.0 DAI (300.0 USD @ $1.0/DAI) has been submitted by:
@StatusSceptre please take a look at the submitted work:
Is that a PR on top of this repository?
Also please describe the technical solution you chose and why it's the right one from the different example I shared.
Is that a PR on top of this repository? No
Also please describe the technical solution you chose and why it's the right one from the different example I shared.
This https://github.com/status-im/status-components/issues/3#issuecomment-473814654 I tried all the links you suggested and others I considered. I think this is the right one because:
packages/status-components
.packages/status-components
in a more "standard" RN/RNW Storybook ecosystem@grigio Unless I am missing something, this is not a PR but a fork of a repo. It's not usable for us as is.
What I am expecting is one commit on top of this repo that address this issue with minimal changes.
Have you considered microsoft approach? At first glance it looks very well maintained.
@jeluard Yes it's a fork, I also thought to "just" add Storybook to your project but currently to have a working combo RN (web+native) other behind the scene efforts are required.
The best approch would be https://github.com/khronedev/react-native-hybrid-storybook but it doesn't work anymore because it requires even older deps
It doesn't have a Storybook support and MS doesn't care about it https://github.com/Microsoft/reactxp/issues/255#issuecomment-328003205
other behind the scene efforts are required.
Do you have more details about that?
Most important is to have a sound approach to create shared components for both reat/react-native, storybook support for react-native can come later on.
The main missing component is @kiwicom/margarita-mobile-storybook
which also depends on other kiwicom internal projects.
If it isn't a priority React Native
now, the simplest approch is to use react-native-web
(not React) and it officially support Storybook 3.x https://github.com/necolas/react-native-web/blob/master/packages/website/package.json#L12
Just a prove that the code below supports RNW on Web and on Android
Yes react-native-web
sounds great! I'd rather wait for RN support, I saw somewhere something is cooking with regards to latest storybook.
If you use react-native-web
in the way I did the react-native
support should be very easy when possible https://github.com/status-im/status-components/pull/9
Thanks! What do you mean by react-native
support should be easy?
Some more links that can be useful:
I mean if the components will be made just with RNW apis https://github.com/necolas/react-native-web#components it's OK, but if you use also browser specific features your RNW components will work on the Web Browser but will need to be adapter to also work in RN
Looking at https://github.com/necolas/react-native-web#examples I see they are using react-native
API.
WDYT? Can we do that? I'd rather not depend on `react-native-web
API.
Also we can forget specific web features.
I've enable the alias, now you can do import { Button as Btn } from 'react-native';
even if you are using rnw behind the scene
Nice thanks! Have you seen my other comment in your PR?
@jeluard can you summarize what is missing to merge this changes?
Some things I would consider for a complete PR:
Also I would like to validate the result so probably will require #5 to be fully available.
This PR is a bit specific as it is foundation work. It's more about making sure we are ready to create new components, required changes are not very technical.
Is there some medium we could use to chat? I am available in status #status-core channel.
OK I've implemented them here https://github.com/status-im/status-components/pull/9#commits-pushed-e41893f
I consider the task complete. The #5 is not related, because the code works and also the tests
@grigio Can you squash your commits?
Fixed by #9
Our end shows that you were paid out. https://etherscan.io/tx/0xa9e55e44cdfdccd6c6f5cba0fdd87c32c35334dfb0a460354706cf60e139d493
Yes received, thanks
Setup storybook so that it supports react-native.
As much as possible it would be great to have everything in a single source tree. Even sharing code if that's feasible. Something like https://github.com/necolas/react-native-web could be useful? Components would be react-native first then. Also see: