[Bug]: The `CameraPadding` lists all edges as being required even though the code allows them to be optional
Open
Nobody has claimed this yet.
bug 🪲
- Dominant language
- Kotlin
- Stars
- 2.9k
- Forks
- 947
- Avg merge
- 6d 37m
- Merged PRs (30d)
- 1
Description
Mapbox Implementation
Mapbox
Mapbox Version
default
React Native Version
0.73.9
Platform
iOS, Android
@rnmapbox/maps version
10.1.30
Standalone component to reproduce
import React from "react";
import { MapView, Camera } from "@rnmapbox/maps";
const aLine = {
type: "LineString",
coordinates: [
[-74.00597, 40.71427],
[-74.00697, 40.71527],
],
};
const BugReportExample: React.FC = () => {
return (
<MapView style={{ flex: 1 }}>
<Camera padding={{ paddingBottom: 10 }} />
</MapView>
);
};
Observed behavior and steps to reproduce
The typescript build fails because the CameraPadding type requires all four padding directions to be specified.
Expected behavior
The build should pass with only the padding directions I actually want to override.
Notes / preliminary analysis
No response
Additional links and references
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the CameraPadding type used by the Camera component and inspect the TypeScript declarations or source that define its four edge properties. Run the TypeScript build with the provided example, then verify that specifying only paddingBottom compiles while the existing Camera padding behavior remains unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react-native, typescript
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100