-
-
Notifications
You must be signed in to change notification settings - Fork 150
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
fix: Fix https://github.com/storybookjs/react-native/issues/120 #190
fix: Fix https://github.com/storybookjs/react-native/issues/120 #190
Conversation
@lauriharpf hey its really great to see the results of your testing here. I've been planning to add web support to the example which would make this type of stuff easier test. There is a bit of a complication with this PR though. In my controls PR #182 I replace knobs with controls, it will be very similar to knobs (most components are re-used). It might be better to work on these changes once that PR is complete. I'm hoping to get it finished up this week. I'd say keep this PR and we can work on making the necessary changes to controls based on this. The addons probably aren't working yet in the example of next-6.0 because I hadn't added the addon support back in after updating the repo. I've been working on the new way of adding them via config as part of the controls PR, if you like I can go through these changes with you at some point to give more context around it. |
That sounds like a plan! 👍 Things are in a bit of a flux at the moment with the 6.0 work underway, just felt like probing this ticket a bit 🙂 . Sounds reasonable to leave this open for now, get #182 merged first, then check where we are & what is needed.
Thanks, happy to learn more! I have a lot of free time next week (28th of June - 1st of July), so if you have the time for it then it would be interesting to get a quick deep-dive on what's up e.g. via a Google Meet or something. I have to admit that I haven't read through all of #182 😱 😅 . |
Well #182 is still very much in progress so it's kind of hard to understand with all the commented code etc 😅. I also had to redo some eslint stuff and some fixes to notes for some testing I was doing so there are really a lot of changes that aren't 100% related to controls. Main issue I still need to resolve with controls is getting things to update/re-render correctly and then test each type of control then I'll start cleaning it up. |
…don't break Expo's "yarn web"
673ced3
to
3beba7e
Compare
@lauriharpf Fix published in react-native-modal-selector 2.0.4. Apologies for the delay. |
Thanks @peacechen 🙏 |
Issue: Fix #120 by changing knobs dependencies to ones that don't break Expo's "yarn web"
What I did
Changed dependencies of
ondevice-knobs
according to the suggested fix at #120 (comment) .react-native-modal-selector
did not have a compatible version (there's an open PR from May, peacechen/react-native-modal-selector#162), so changed it to@react-native-picker/picker
.How to test
Smoke testing can be done with https://github.com/lauriharpf/react-native-storybook-expo-knobs-test , which was created based on instructions at #120 . Try this:
npm install -g expo-cli
yarn dev
in the root of this branchondevice-knobs
(pulled and set up in previous two steps)yarn install
, followed byyarn start-storybook
and thenyarn web
in another terminalnext-6.0
branch instead of this branch.Known issues and limitations
Select issue on Android
For some reason the select values (apple, banana, cherry) are not visible on Android. What I see is this:
The iOS view looks fine and the values are selectable:
Datepicker does not work in Expo web
The datepicker does not open when clicking on it. Developer tools shows the following error:
react-native-logs.fx.ts:22 DateTimePicker is not supported on: web
Expo issue on iOS
For some reason, the "Knobs Example > with knobs" story breaks for me in Expo on iOS with this error:
This seems to happen when I kill the iOS emulator and Expo, then restart the iOS emulator via Expo. Doing any edit (e.g. just changing comments and saving) to
KnobsExample.stories.js
fixes the problem, but it always reappears. Don't know what is going on and if that is related to the changes or not.