mckinsey / vizro

Vizro is a toolkit for creating modular data visualization applications.
https://vizro.readthedocs.io/en/stable/
Apache License 2.0
2.46k stars 109 forks source link

[Bug] Ignore unexpected query parameters rather than raising an exception #539

Closed antonymilne closed 1 week ago

antonymilne commented 1 week ago

Description

Before Going to http://localhost:8050/?species=virginica would raise error:

TypeError: Dashboard._make_page_layout() got an unexpected keyword argument 'species'

This was kind of a bug and kind of expected behaviour that we just didn't care about.

Now The query parameter is just ignored.

This is the solution recommended in https://github.com/AnnMarieW/dash-multi-page-app-demos/?tab=readme-ov-file#5-preventing-query-string-errors. it doesn't prevent us from using query parameters in the future (very likely to do so) and is consistent with behaviour if layout is no longer a function at some point in the future (not so likely).

Notice

antonymilne commented 1 week ago

Not sure why my new integration test isn't work well... We might need to move this to your QA tests instead @l0uden.

l0uden commented 1 week ago

Not sure why my new integration test isn't work well... We might need to move this to your QA tests instead @l0uden.

I'll write in vizro-qa repo