Skip to content

Empty toggle attribution button #4665

Open
@rderollepot

Description

@rderollepot

I found out what looks like an aesthetic bug, and I did not find any reference to it.

Bug:

In the bottom right corner, in the attribution area, there is an empty button with "Toggle attribution" tooltip showing that I think should not.

image

The HMTL code of the button is:

<button class="mapboxgl-ctrl-attrib-button" title="Toggle attribution" aria-label="Toggle attribution"></button>

Basic dashboard to reproduce the bug:

import dash
from dash import dcc, html
import plotly.express as px
import pandas as pd

# Sample data
df = pd.DataFrame({
    'lat': [37.77, 40.71, 34.05, 51.51],
    'lon': [-122.41, -74.00, -118.25, -0.12],
    'city': ['San Francisco', 'New York', 'Los Angeles', 'London']
})

# Create a Plotly express scatter mapbox
fig = px.scatter_mapbox(df,
                        lat='lat',
                        lon='lon',
                        hover_name='city',
                        zoom=3,
                        height=600)

# Set Mapbox style
fig.update_layout(mapbox_style="open-street-map")

# Initialize the Dash app
app = dash.Dash(__name__)

# Define the layout of the app
app.layout = html.Div([
    html.H1("Simple Dashboard with Mapbox"),
    dcc.Graph(id='map', figure=fig)
])

# Run the app
if __name__ == '__main__':
    app.run_server(debug=True)

I tested with Python 10, 11 & 12, with the latest available version of the involved packages, and the bug is present.
However, with one of my existing environment on Python 10, the bug was not present (see below).

image

I was not able to identify which different version of which package triggered the difference, I hope your expert eyes will see it. I'm using Chrome Version 126.0.6478.127 (Build officiel) (x86_64), on MacOS Sonoma 14.5. Both environment are defined below:

Python 10, working environment (that's one I used for a project, hence not the smallest possible one):

anyio==4.0.0
appnope==0.1.3
argon2-cffi==23.1.0
argon2-cffi-bindings==21.2.0
arrow==1.3.0
asttokens==2.4.0
async-lru==2.0.4
attrs==23.1.0
Babel==2.13.0
backcall==0.2.0
beautifulsoup4==4.12.2
bleach==6.1.0
blinker==1.8.2
certifi==2023.5.7
cffi==1.16.0
charset-normalizer==3.1.0
click==8.1.4
click-plugins==1.1.1
cligj==0.7.2
comm==0.1.4
contourpy==1.1.0
cycler==0.11.0
dash==2.17.1
dash-core-components==2.0.0
dash-html-components==2.0.0
dash-table==5.0.0
debugpy==1.8.0
decorator==5.1.1
defusedxml==0.7.1
exceptiongroup==1.1.3
executing==2.0.0
fastjsonschema==2.18.1
Fiona==1.9.4.post1
Flask==3.0.3
fonttools==4.40.0
fqdn==1.5.1
geopandas==0.13.2
greenlet==2.0.2
idna==3.4
importlib_metadata==8.0.0
ipykernel==6.25.2
ipython==8.16.1
isoduration==20.11.0
itsdangerous==2.2.0
jedi==0.19.1
Jinja2==3.1.2
json5==0.9.14
jsonpointer==2.4
jsonschema==4.19.1
jsonschema-specifications==2023.7.1
jupyter-events==0.7.0
jupyter-lsp==2.2.0
jupyter_client==8.3.1
jupyter_core==5.3.2
jupyter_server==2.7.3
jupyter_server_terminals==0.4.4
jupyterlab==4.0.6
jupyterlab-pygments==0.2.2
jupyterlab_server==2.25.0
kiwisolver==1.4.4
MarkupSafe==2.1.3
matplotlib==3.7.2
matplotlib-inline==0.1.6
mistune==3.0.2
nbclient==0.8.0
nbconvert==7.9.2
nbformat==5.9.2
nest-asyncio==1.5.8
networkx==3.1
notebook_shim==0.2.3
numpy==1.25.0
osmnx==1.5.0
overrides==7.4.0
packaging==23.1
pandas==2.0.3
pandocfilters==1.5.0
parso==0.8.3
pexpect==4.8.0
pickleshare==0.7.5
Pillow==10.0.0
platformdirs==3.11.0
plotly==5.16.1
prometheus-client==0.17.1
prompt-toolkit==3.0.39
psutil==5.9.5
ptyprocess==0.7.0
pure-eval==0.2.2
pycparser==2.21
Pygments==2.16.1
pyparsing==3.0.9
pyproj==3.6.0
python-dateutil==2.8.2
python-json-logger==2.0.7
pytz==2023.3
PyYAML==6.0.1
pyzmq==25.1.1
referencing==0.30.2
requests==2.31.0
retrying==1.3.4
rfc3339-validator==0.1.4
rfc3986-validator==0.1.1
rpds-py==0.10.4
scipy==1.11.1
Send2Trash==1.8.2
shapely==2.0.1
six==1.16.0
sniffio==1.3.0
soupsieve==2.5
SQLAlchemy==2.0.19
stack-data==0.6.3
tenacity==8.2.3
terminado==0.17.1
tinycss2==1.2.1
tomli==2.0.1
tornado==6.3.3
traitlets==5.11.2
types-python-dateutil==2.8.19.14
typing_extensions==4.7.1
tzdata==2023.3
uri-template==1.3.0
urllib3==2.0.3
wcwidth==0.2.8
webcolors==1.13
webencodings==0.5.1
websocket-client==1.6.4
Werkzeug==3.0.3
xarray==2023.7.0
zipp==3.19.2

Python 10, buggy environment:

blinker==1.8.2
certifi==2024.7.4
charset-normalizer==3.3.2
click==8.1.7
dash==2.17.1
dash-core-components==2.0.0
dash-html-components==2.0.0
dash-table==5.0.0
Flask==3.0.3
idna==3.7
importlib_metadata==8.0.0
itsdangerous==2.2.0
Jinja2==3.1.4
MarkupSafe==2.1.5
nest-asyncio==1.6.0
numpy==2.0.0
packaging==24.1
pandas==2.2.2
plotly==5.22.0
python-dateutil==2.9.0.post0
pytz==2024.1
requests==2.32.3
retrying==1.3.4
six==1.16.0
tenacity==8.5.0
typing_extensions==4.12.2
tzdata==2024.1
urllib3==2.2.2
Werkzeug==3.0.3
zipp==3.19.2

Metadata

Metadata

Assignees

Labels

P3backlogbugsomething brokensev-3annoyance with workaround

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions