Comments (11)
@hazmah0 great thanks, will take a look soon
from react-native.
What is the tvos fork? How would i test this?
from react-native.
The repository is here https://github.com/react-native-tvos/react-native-tvos. It's basically a fork of react-native that adds support for tv platforms like tvOS and Android TV. Since Im building an app that should target both mobile and tv platforms Im currently using this fork.
The easiest way to test this would be to follow the official tutorial from the Storybook docs to generate a project, but instead use the tvos fork by modifying the dependencies:
"react-native": "npm:react-native-tvos@^0.73.6-1"
My specific setup uses expo and these changes are documented here but should apply for non expo applications as well.
from react-native.
@hazmah0 can you provide me a repo with your specific setup which reproduces the problem?
from react-native.
Sure, here you go.
- Clone the repo
- Install dependencies
- Open either ios or android emulator with
storybook:ios
orstorybook:android
- Once the app is loaded, open the sidebar. There should be stories here but the sidebar is empty
from react-native.
This seems like an issue with flatlist on the tvos fork, the items are there they just don't get the right height
from react-native.
@hazmah0 I found the issue, the flex:1
on the FlatList style seems to break it, if you patch this line in the @storybook/react-native package you can see it works
node_modules/@storybook/react-native/dist/index.js
var styles = import_react_native2.StyleSheet.create({
sectionList: { flex: 1 }, <---
sectionListContentContainer: {
paddingBottom: 6,
},
});
If you make it this instead it works
var styles = import_react_native2.StyleSheet.create({
sectionList: { height: "100%"}, <----
sectionListContentContainer: {
paddingBottom: 6,
},
});
Seems to me like a bug in the flatlist implementation on tv os react native
from react-native.
Thanks for looking into this! I asked one of the maintainer of the tvos fork about this but they haven't tried running storybook unfortunately. Iv'e made them aware of the problem and the issue I created here so maybe they can pitch in on this.
from react-native.
I can also probably just change this flex:1 on sb side but ran out of time today, will take a look soon.
from react-native.
@dannyhw you can close this if needed, see link above to the PR in the TV repo that fixes the issue.
from react-native.
@douglowder awesome, thanks!
from react-native.
Related Issues (20)
- Unable to resolve module @storybook/addon-links/register HOT 1
- Issue running react-native-server on the example app HOT 10
- Custom font usage HOT 4
- Removing demo component from causes issues HOT 3
- use with ``react-native-linear-gradient`` in storybook project HOT 4
- [Regression] Stories configuration object not working with auto titles HOT 2
- using `configure` leads to CSF story not showing in the stories list until hot reload is triggered HOT 4
- Unable to resolve "@storybook/react/dist/config" from "node_modules/@storybook/react-native/dist/preview.js" HOT 4
- Unit tests for Storybooks failing in React Native 0.73.1 HOT 3
- Headless render tests: @storybook/test-runner support or Storyshots alternative? HOT 4
- Unable to resolve module react/jsx-runtime in low version of React
- ColumnWrapperStyle not supported for single column lists HOT 8
- Android Bundling failed 3112ms Unable to resolve "@storybook/react-native" from ".storybook/index.tsx" HOT 12
- Add 'check' option in @storybook/addon-ondevice-controls HOT 5
- Documentation improvement request
- HMR issues HOT 4
- [Bug]: Passing props to TextInput causes error HOT 4
- @storybook/react-native webpack bundler support HOT 2
- Generates TypeScipt while project is JS HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native.