yavin-dev / framework

A framework for rapidly building production quality analytics applications
https://yavin.dev
MIT License
85 stars 35 forks source link

"Unsaved dashboard changes" dialog is not shown when navigating directly to a different dashboard #1641

Open daniellevinson opened 2 years ago

daniellevinson commented 2 years ago

Describe the bug It's probably not a likely scenario, but if you navigate from an unsaved dashboard directly to a different dashboard, the dialog is not shown. The fix might be easier than writing this ticket (copying/moving the dashboard id comparison from cacheQuery to willTransition https://github.com/yavin-dev/framework/blob/master/packages/dashboards/addon/routes/dashboards/dashboard.ts#L232) but probably requires some more thorough testing to see that nothing else breaks.

To Reproduce

  1. Go to https://yavin-dev.github.io/framework/#/dashboards/2/view
  2. Click on Home (breadcrumb link)
  3. Go to Coin Health Check dashboard
  4. Add "Coin counts" to dashboard
  5. Don't save ☠️
  6. Navigate directly 2 steps back to dashboard 2 Screen Shot 2022-05-25 at 1 24 11 PM

Expected behavior Show dialog unless same dashboard id.