leecade / leecade/react-native-swiper

Question: Why default to full screen height instead of allowing dynamic height?

Open
#1,191 5 comments 8 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

question
Dominant language
JavaScript
Stars
10.5k
Forks
2.3k
PR merge metrics
No merged PRs in 30d

Description

Which OS ?

Both

Version

Which versions are you using:

  • react-native-swiper v1.6.0.rc
  • react-native v0.62.2
Problem / Question

In the implementation, it is setting the initial height state to window height if we do not provide a height prop to it.

In order to place the swiper perfectly, I would need to calculate the height and width of the content beforehand which is kind of unnecessary work.

Wouldn't it be more flexible to not do anything with the initial height and let the container fit dynamically with the content? We can always control the dimension ourselves.

PS. If there's a way to have dynamic height control already that I missed, please let me know thanks!

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the swiper implementation that initializes height from the window height when no height prop is supplied. Check whether the current version already supports dynamic content sizing, then determine the intended behavior and validate it on both operating systems before proposing a documented, tested change.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react-native
Domain
mobile
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.