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

Request for Comments: Remove browser UI from React-Native #3293

Closed
danielduan opened this issue Mar 26, 2018 · 6 comments
Closed

Request for Comments: Remove browser UI from React-Native #3293

danielduan opened this issue Mar 26, 2018 · 6 comments
Labels
maintenance User-facing maintenance tasks react-native

Comments

@danielduan
Copy link
Member

danielduan commented Mar 26, 2018

To continue the discussion from this PR: #3278

I'd like to get some opinions on these removing the browser side of the UI

Pros:

  • Reduce steps to run RN from 2 terminal processes (RN packager & Storybook) to 1 (RN packager)
  • Get rid of the confusion of nothing displaying in the web Storybook preview
  • Create possibility of distributing SB RN app (through Expo, Test Flight, etc) Feature Request - Standalone React Native Build #3224, Build react native static app?  #3235
  • Simplify SB RN development process by removing dependency on @sb/react
  • Enables more thorough testing (storyshot only works for the SB UI, not the actual stories)
  • Run more than one instance of RN storybook at a time

Cons:

  • Breaks compatibility with all current addons
@danielduan danielduan added maintenance User-facing maintenance tasks react-native labels Mar 26, 2018
@danielduan
Copy link
Member Author

@Gongreg @shilman @Hypnosphi @ndelangen opinions?

@f0rr0
Copy link

f0rr0 commented Mar 27, 2018

  1. With haul, currently, you'd only need to run 1 terminal process I guess?
  2. The only part of the web UI that's not used at all is the Preview. Hiding it should be a storybook wide option configurable via storybook options addon.
  3. This is currently possible.
  4. Not familiar enough with storybook to comment.
  5. Not familiar enough with storybook to comment.
  6. Not familiar enough with storybook to comment.

@Gongreg
Copy link
Member

Gongreg commented Mar 27, 2018

I don't agree with removing browser side ui. I like having option to integrate storybook with ide addons (like in vscode or webstorm). They are expecting rn to use websockets. Also when developing I like to have multiple devices running at same time on same storybook (android, ios, multiple ios devices and so on).
I feel like we should improve onDeviceUI to support addons, so there would be feature parity between what you can achieve with browser, but we shouldn't remove browser completely.

@danielduan
Copy link
Member Author

We currently only have 2 RN compatible addons that require the side panel in the browser - actions and knobs. I'm not aware of any third party RN addons.

We can easily build a logger for actions in the onDeviceUI although knobs would be a bit harder. I'm curious to see how users use knobs in conjunction with Storybook RN.

I don't think cross platform addons are achievable quite yet. I have yet to see a truly cross platform (react & react-native) set of UI components that doesn't require significant configuration and maintenance.

I'm pretty neutral about this support for browser UI. I think this PR will solve most of the pain points I have in using Storybook RN as a developer #3278.

I brought this up because it's probably the buggiest stable framework we support. RN is least tested piece of code we have in this repo and we don't have any tests for web UI + RN UI working together in conjunction. The only thing we test for is if the CLI works and is able to start, and if snapshots can be taken in a vanilla app.

@Gongreg
Copy link
Member

Gongreg commented Mar 30, 2018

Well to make addons work we could additionally add renders for RN part. But that would mean that now we have to update two renders instead of one.

One ugly solution that could theoretically allow us to still use same addons (react) would be to integrate browser in phone to render addons? Just an idea.

@danielduan
Copy link
Member Author

Yeah, I think we can probably have addons render in a drawer in an RN webview type thing. That'll be a nice to have. Gonna close this since it doesn't seem like a good idea to deprecate the browser UI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance User-facing maintenance tasks react-native
Projects
None yet
Development

No branches or pull requests

3 participants