Closed jiji14 closed 4 months ago
@JGreenlee Please review this when you have time :)
This works well and helps UX!
There are many different ways you could conditionally render things in Dash. Although setting
display='none'
works, I think it might be more elegant to conditionally return the "No trip data available..." H4 from one of the existing functions. I'm providing you with a patch file showing how I would I have done it. But it is up to you which method seems cleaner or more elegant
Thanks! It seems much clearer. Applying patch kept failing so I directly added the code. I also changed the <h4>
tag to a <div>
tag since the heading tag is not suitable for error messages and can negatively affect accessibility.
Overview
The current map page shows the map feature even though there is no trip data, which can appear as a bug to users. To prevent confusion, I added the 'no data' text when there is no trip data instead of displaying an empty map.
screenshots
[ No trip data ]![Screenshot 2024-03-26 at 11 45 35 AM](https://github.com/e-mission/op-admin-dashboard/assets/47590587/a7a1e6f5-2b9f-4034-8657-a5a0b7228737)