owid / owid-grapher

A platform for creating interactive data visualizations
https://ourworldindata.org
MIT License
1.37k stars 230 forks source link

The "Restore" button in the chart admin does not work #3643

Closed pabloarosado closed 2 months ago

pabloarosado commented 4 months ago

Description

The "Restore" button in the grapher chart admin "Revisions" tab doesn't work. The "Compare to previous" button right next to it does work though.

Expected behaviour

The "Restore" button should restore a different version of the chart in the preview.

Steps to reproduce

Steps to reproduce the behavior:

  1. Go to any chart admin (for example this one).
  2. Open the "Revisions" tab.
  3. Click on various "Restore" buttons and see that the preview doesn't change (even if, when clicking on "Compare to previous" you see that there were changes).

Screenshots

https://github.com/owid/owid-grapher/assets/12246978/bfff5c4b-cba8-4957-b22d-b98661dd3cda

danyx23 commented 3 months ago

@sophiamersmann my hunch is that this would hopefully be a small thing to fix. Would that be your hunch as well and do you think you could take a look at it in your batch cycle? Probably good to time-box this to, say, two hours or so - what do you think? If you don't have time then assign it to me and I'll see if I can fix it some time soon.

sophiamersmann commented 3 months ago

Yes, I'll have a look (but may re-assign it to you if a fix is not obvious to me)

rakyi commented 2 months ago

It seems the fix doesn't work for older versions. Is it worth fixing further? Maybe we could hide/disable the button for incompatible versions at least. That would be a better UX.

marcelgerber commented 2 months ago

We feel like this case is rare. We'll close this issue and will wait and see if it ever comes up again as a problem.