Summary:
Saving metadata in Dashboard properties is broken.聽
Steps to Reproduce:
Investigation:
The root problem is, when you click the first save, new dashboard metadata send to backend, but after this save, this change is not updated in the dashboard redux store. So that when you click 2nd save, other old dashboard metadata sent to backend again, which overwrite the first request. The last change is overwritten.
Workaround:
There is a workaround that currently works (but it's not intuitive and likely we will have to explain it to all our users as they raise this issue): Click save only on modal, and not again on dashboard. Leave dashboard without saving the changes. The changes made on the Advanced Properties modal will actually get saved.
Make sure these boxes are checked before submitting your issue - thank you!
Issue-Label Bot is automatically applying the label #bug to this issue, with a confidence of 1.00. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!
Links: app homepage, dashboard and code for this bot.
@zuzana-vej thank you for reporting this.
@nytai can you take a looks at this
@zuzana-vej thank you for for reporting this. I wasn't able to reproduce this bug based on the step provided on commit hash a95e5c9327738489fd9fb547134f7ff4ea8c37af. Is ENABLE_REACT_CRUD_VIEWS set to True in superset/config.py?
Here is the video I tried to reproduce the bug:
https://www.loom.com/share/32547542dee24eb5bb5029b232c7e694
@lilykuang I think @zuzana-vej is referring to editing on the actual dashboard

Yes on the actual dashboard. @graceguo-supercat can confirm, she did some debugging too. It should be reproduceable on dashboard, if not let me know I can add a video.
This seems related to the recent work that I did in this area. There's clearly components / modals that fetch and save straight to the endpoints without going through redux/actions here. This is convenient for the dashboard list view, but breaks down in the context where this is embedded in an app that does its own state management and triggers its own (delayed) save event.
The deep fix involves things like:
I think ideally these modals should be more "dumb" to maximize reuse. OnSave should just delegate to a callback. This callback can be a redux action that just pushes the changes to state or a handler that fires a patch request... or both.
I'd be more in favor of only allowing dashboard edits on the dashboard page if it loaded faster and we could jump straight into edit mode. Having to click through, wait for the dashboard to load, toggle edit mode, then click into the properties modal is quite a journey for a quick edit.
I talked with a few folks about expected behavior and found some places where we could make improvements here. I've started work that is in progress that I've linked above, and should have something ready next week.
I'll be consolidating some of the modals and fixing the save not delegating to redux issue sometime next week
I know that there are some usability features that we're discussing to improve this flow, but do you all think that https://github.com/apache/incubator-superset/pull/11220 has fixed this particular issue?
No, it didn't. Right now, (after #11220 merged) this is what happens if user tries to edit dashboard metadata (e.g. best way to test this on your test dashboard is to change color of one of the lines on your chart in the dashboard metadata tab).
Right now, what happens, is:
Steps 3+4 will confuse them currently.
So in a way it solves the issue - change is applied, but user currently gets a warning message which will confuse them. Actually if we want to be really precise, this issue is resolved, but with #11220 there is new issue now. I am not sure if this open PR would solve what is happening now?
this is how I test - by changing one of these values:

cc: @graceguo-supercat
I am going to close this because looks like https://github.com/apache/incubator-superset/pull/10834 resolved the issue. Thanks @eschutho!