Comments (5)
Fixed in #23
from react-native-responsive-grid.
Glad to be of help and that you're open to merging the PR.
The ScreenInfo code never evaluates MEDIUM_Width
. It compares the width with the small and large cutoffs, and assumes that medium will be in there. The size ranges are difficult to grok because the small cutoff is the high end of the range, the medium cutoff somewhere in between small and large, and the large cutoff is at the low end of the range. I documented in the PR the actual computed ranges and updated the code to be consistent with where the cutoff occurs.
from react-native-responsive-grid.
Thank you very much for this contribution.
I’m traveling without my laptop but will take a look a merge tonight or tomorrow after I get back home.
I think the Readme on size “cut offs” was out of sync with the code. I believe in the code the logic was consistent as far as the intervals go. I appreciate setCutoffs but would like to name it setResponsiveRanges or something like that.
Will take a look at Hidden and RTL
Much gratitude.
from react-native-responsive-grid.
Oh that’s great. Sorry about the oversight.
When Ibhave time, I’d like to add unit unit tests (for size ranges) and snapshot tests for RTL, hidden, and the responsive behavior in general.
Will add you to Contributors.md and happy to incorporate any fixes and improvements.
I built this library for a project I was working on just over a year ago and have not used it since but I hope that will change at some point as I go back to RN.
Looking forward, if I get any time to spend with RN, it would be nice to support display:grid behaviors (at least common use cases) in userland. I don’t think Yoga is going to give us that capability any time soon. If you run into use cases for display:grid please feel free to create an issue so we can track it.
Will merge tonight. Thank you!
from react-native-responsive-grid.
display:grid is an interesting idea. We don't have a need for it yet and there's a lot on my plate before I can get to it. Initial thoughts are to create a wrapper that automatically computes the % of each column based on the number of columns (e.g. 10 display:grid columns creates 10 of 10% each). But that could be too simplistic and due to me not fully digesting the code.
Thanks for creating and sharing this library. It works quite well and hopefully we can keep improving it 👍
from react-native-responsive-grid.
Related Issues (20)
- Question not an issue HOT 2
- Column heights and row widths HOT 1
- Errors on Column 'fullWidth' and on vAlign['stretch'] HOT 2
- Topic typo: univcersal -> universal HOT 1
- Parameterize cutoff points HOT 1
- 'Hidden' props not working HOT 1
- React 16.x causes exception with setState on unmounted component HOT 21
- setScreenInfo() recalculates unnecessarily HOT 6
- Bringing Pseudo Elements to RN HOT 5
- Keeping state when Grid is unmounted (for nested Grids) HOT 6
- Feature request: variable sizes HOT 9
- Uncaught TypeError: e.persist is not a function HOT 8
- How to create list of images with different sizes HOT 2
- Elements following the grid are over-writing the gird HOT 5
- web support HOT 2
- Is ImageBackground supported? HOT 1
- helpers.js uses module.exports while Column.js uses imports HOT 10
- Support typescript? HOT 1
- diffrent sizes grid doesn't work good HOT 1
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-responsive-grid.