meliorence / meliorence/react-native-snap-carousel

Extra Padding Between Carousel and parent View with marginTop

Open
#633 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Is this a bug report, a feature request, or a question?

Question

Have you followed the required steps before opening a bug report?

(Check the step you've followed - put an x character between the square brackets ([]).)

Have you made sure that it wasn't a React Native bug?

Yes

Is the bug specific to iOS or Android? Or can it be reproduced on both platforms?

Currently tested it with only Android

Is the bug reproductible in a production environment (not a debug one)?

Haven't tried in production environment

Environment

Environment:
React: 16.9.0
React native: 0.61.2
react-native-snap-carousel: ^3.8.4

Target Platform:
Android (6.0)

Expected Behavior

When I use marginTop in my parent View of Horizontal Carousel, I am getting some extra padding in the bottom. The padding increases as I increase the marginTop.
not_working

I already tried the suggestions mentioned in https://github.com/archriss/react-native-snap-carousel/issues/489 and it didn't resolve the problem.

Actual Behavior

There shouldn't be any padding at the bottom when I use marginTop in style of my parent View.

Reproducible Demo

https://snack.expo.io/B1S-Ht96B

Steps to Reproduce
  1. Change marginTop value from 0 to 50%
  2. You will observe the bottom padding keeps increasing with the same

Contributor guide

Open the contributing guide

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 with the linked Expo Snack and reproduce the Android behavior using the stated React Native and carousel versions. Compare the layout with marginTop set to 0 and 50%, and review the related issue #489 for context. Done means identifying the source of the increasing bottom space and confirming whether the component or its usage needs a documented or code-level change.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react-native
Domain
mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.