Git Product home page Git Product logo

Comments (5)

peacechen avatar peacechen commented on May 19, 2024 1

Fixed in #23

from react-native-responsive-grid.

peacechen avatar peacechen commented on May 19, 2024 1

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.

idibidiart avatar idibidiart commented on May 19, 2024

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.

idibidiart avatar idibidiart commented on May 19, 2024

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.

peacechen avatar peacechen commented on May 19, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.