Great idea!
Last week we released an app that had this use case. Fixed it for now by having 1 common function that creates a DataFrame. That function is called by both the view method (using the TableView) and the download method.
It looks like 2 issues are addressed in the proposal:
- Prevent having to re-calculate the same thing (or use Storage / memoize) for the 2 outputs (view and download)
- Prevent the need for adding an extra DownloadButton in the params and integrate it into the view UI.
I do wonder though, if 1 is actually solvable. Wouldn’t you nearly always want some additional layout code for both outputs. Probably formatting related.
Solving 2 would be nice, since it would improve the UI/UX as well: A user would download the result on the same place where the results are shown.