mapbox / mapbox/mapbox-gl-geocoder

Padding and margin issues at bottom-right. Increasing the viewport size and pushing the copyright down.

Open
#516 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

auto-triaged bug
Dominant language
JavaScript
Stars
388
Forks
181
PR merge metrics
No merged PRs in 30d

Description

Placing the component with config
```
const geocoder = new MapboxGeocoder({
accessToken: mapboxgl.accessToken,
mapboxgl: mapboxgl,
collapsed: true,
flyTo: { duration: 0 },
clearOnBlur: true,
});
map.addControl(geocoder, "bottom-right");
```
will creating a padding css issue that will create an horizontal scroll and some white background on the right.

![Screenshot from 2023-11-07 00-17-23](https://github.com/mapbox/mapbox-gl-geocoder/assets/284394/710e7c54-1b8a-4baa-a354-4605e661964f)

expanding it using the mouse would fix the right padding but create a bottom margin that is pushing the copyright out of the map and create a vertical scroll.

![Screenshot from 2023-11-07 00-16-44](https://github.com/mapbox/mapbox-gl-geocoder/assets/284394/17a83fcc-a453-4a59-8331-babb790623a8)

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

Reproduce the issue with the MapboxGeocoder configuration in the report and the control positioned at bottom-right. Inspect the geocoder control's layout and CSS while collapsed and expanded at different viewport sizes. Done means neither state creates horizontal or vertical overflow, unwanted right padding, or pushes the map copyright outside the map.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.