Skip to content
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

docs: change v6 test readme to use expo install #258

Merged
merged 2 commits into from
Sep 9, 2021

Conversation

kkalavantavanich
Copy link
Contributor

Issue: Expo warning while following v6 test readme

What I did

  • Change documentation for v6 test readme. Previously, there was a warning
Some dependencies are incompatible with the installed expo package version:
- @react-native-community/slider - expected version: 3.0.3 - actual version installed: 4.1.3
Your project may not work correctly until you install the correct versions of the packages.
To install the correct versions of these packages, please run: expo install [package-name ...]

This is caused by not using expo install to install @react-native-community/slider and maintain compatibility versions. I updated documentation to use expo install instead of yarn add to maintain compatibility with expo.

How to test

Please explain how to test your changes and consider the following questions

  • Does this need a new example in examples/native? No
  • Does this need an update to the documentation? This is an documentation update.

If your answer is yes to any of these, please make sure to include it in your PR.

Use expo install instead of yarn add to maintain compatibility with expo.
@kkalavantavanich kkalavantavanich changed the title feat: change v6 test readme to use expo install docs: change v6 test readme to use expo install Aug 28, 2021
@dannyhw
Copy link
Member

dannyhw commented Aug 28, 2021

Thanks for your contribution 🙇‍♂️.

Will give it a try :)

@dannyhw
Copy link
Member

dannyhw commented Aug 28, 2021

@kkalavantavanich do you think it would be better to have a separate set of steps for expo? I'm fine with either way but would be good to have your opinion :).

(Not suggesting to do that as part of this pr)

I'm also thinking about adding some scripts to the @storybook/react-native package that would automate the setup. Later these could live in the storybook cli.

@kkalavantavanich
Copy link
Contributor Author

kkalavantavanich commented Aug 28, 2021 via email

@kkalavantavanich
Copy link
Contributor Author

Done

@kkalavantavanich
Copy link
Contributor Author

Oh, I guess I misunderstood your point. I guess it depends on how you want to test this. Separating them out would obviously be clearer for the alpha testers. People can just look at what they use.

On the other hand though, the steps can start to diverge between vanilla and expo, which might affect the final installation process after the new version is released as well. People are less likely to notice this divergence if they exist in separate file.

I'm also thinking about adding some scripts to the @storybook/react-native package that would automate the setup. Later these could live in the storybook cli.

What do you have in mind? I'm particularly curious because I come from the learnstorybook repo and the installation guide is way out of date. I followed the rabbit hole to update the learnstorybook repo and found this nice repo. I would like to update the guide for this version too.

@dannyhw
Copy link
Member

dannyhw commented Aug 29, 2021

Oh, I guess I misunderstood your point. I guess it depends on how you want to test this. Separating them out would obviously be clearer for the alpha testers. People can just look at what they use.

I think the way you did it is fine for now, later two separate guides can be made if necessary.

What do you have in mind? I'm particularly curious because I come from the learnstorybook repo and the installation guide is way out of date. I followed the rabbit hole to update the learnstorybook repo and found this nice repo. I would like to update the guide for this version too.

Yeah I'm aware the tutorial is very outdated, after 6.0 is out of alpha I'll focus on making a good tutorial. The tutorial is part of a separate repository and I usually suggest just following the getting started in this repo's readme until that tutorial can be updated.

What I mean by adding some scripts is just having some basic scripts for easier alpha testing that could be later worked into the existing storybook cli which is used for the current setup on stable versions. I already have a script made in a gist that works for regular react native, it could be adjusted to make an expo one too.

Copy link
Member

@dannyhw dannyhw left a comment

Choose a reason for hiding this comment

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

I'm ok with this but see my comment in the review I think it could be possible to use expo install for all dependencies

For Expo, we need to separately install the react native packages so Expo can maintain the compatibility for us.

```shell
yarn add @storybook/react-native@next \
Copy link
Member

Choose a reason for hiding this comment

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

I think you could list all the dependencies with expo install, I believe it will just do a regular yarn install for packages without native dependencies. Something like this:

expo install @storybook/react-native@next \
            @storybook/addon-ondevice-actions@next \
            @storybook/addon-ondevice-controls@next \
            @storybook/addon-ondevice-backgrounds@next \
            @storybook/addon-ondevice-notes@next \
            @storybook/addon-actions \
            @storybook/addon-controls \
            @react-native-async-storage/async-storage \
            @react-native-community/datetimepicker \
            @react-native-community/slider

@dannyhw
Copy link
Member

dannyhw commented Sep 9, 2021

Sorry for the delay on this one. Will merge now, thanks for your contribution.

@dannyhw dannyhw merged commit 7c366f4 into storybookjs:next-6.0 Sep 9, 2021
dannyhw pushed a commit to raychanks/react-native that referenced this pull request Feb 7, 2022
* feat: change v6 test readme to use expo install

Use expo install instead of yarn add to maintain compatibility with expo.

* doc: separate out expo from vanilla js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants