notebook download implies save #895

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
3 participants
@minrk
Member

minrk commented Oct 18, 2011

closes #852

Note that this should get some review, as I'm not certain it's the right way to go. This change makes download trigger a save, and the save-success callback triggers the actual download. However, at least on Chrome, the fact that opening the download url is no longer triggered directly by the click action means it can get caught by pop-up blockers.

@fperez

This comment has been minimized.

Show comment
Hide comment
@fperez

fperez Oct 19, 2011

Member

Yup, in fact ffox also blocks it. So I think we need to find out something else, I don't like to require people to disable their popup blockers... But I have to say, I don't know what a better solution would be.

Member

fperez commented Oct 19, 2011

Yup, in fact ffox also blocks it. So I think we need to find out something else, I don't like to require people to disable their popup blockers... But I have to say, I don't know what a better solution would be.

@minrk

This comment has been minimized.

Show comment
Hide comment
@minrk

minrk Oct 19, 2011

Member

In that case, I don't think we can force a save on download. We have to just add a note to the tooltip, that Download/print get the most recently saved version.

If we can detect that the document has been edited since last save, then we can do this with a dialog 'Would you like to save changes before downloading?' But I don't think we have a global flag that gets set on any edit.

Member

minrk commented Oct 19, 2011

In that case, I don't think we can force a save on download. We have to just add a note to the tooltip, that Download/print get the most recently saved version.

If we can detect that the document has been edited since last save, then we can do this with a dialog 'Would you like to save changes before downloading?' But I don't think we have a global flag that gets set on any edit.

@fperez

This comment has been minimized.

Show comment
Hide comment
@fperez

fperez Oct 19, 2011

Member

Do you just want to change the tooltip and close this one? I would like to set a dirty flag on cell edit, but that's a separate job. It would be nice if the UI could reflect that dirty state also (emacs marks the status area with '**', other editors do similar things). But that's a separate request... I'm OK with closing this one and just editing the tooltip.

Member

fperez commented Oct 19, 2011

Do you just want to change the tooltip and close this one? I would like to set a dirty flag on cell edit, but that's a separate job. It would be nice if the UI could reflect that dirty state also (emacs marks the status area with '**', other editors do similar things). But that's a separate request... I'm OK with closing this one and just editing the tooltip.

@ellisonbg

This comment has been minimized.

Show comment
Hide comment
@ellisonbg

ellisonbg Oct 19, 2011

Member

We do have a dirty flag that detect when a cell is run, moved, deleted. We could look at this flag. But you are right that this flag doesn't currently detect if a cell has been edited but not run. But I agree with Fernando that we can't require pop-up blockers to be disabled. I have run into this issue in numerous places in the notebook already.

Member

ellisonbg commented Oct 19, 2011

We do have a dirty flag that detect when a cell is run, moved, deleted. We could look at this flag. But you are right that this flag doesn't currently detect if a cell has been edited but not run. But I agree with Fernando that we can't require pop-up blockers to be disabled. I have run into this issue in numerous places in the notebook already.

@minrk

This comment has been minimized.

Show comment
Hide comment
@minrk

minrk Oct 20, 2011

Member

I'll close this, and just add a note to the tooltip. Probably not consider that closing the original Issue, though.

Member

minrk commented Oct 20, 2011

I'll close this, and just add a note to the tooltip. Probably not consider that closing the original Issue, though.

@minrk minrk closed this in bbc4d01 Oct 20, 2011

mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this pull request Nov 3, 2014

Add tooltip to Download/Print indicating need to save first
A real fix would be to trigger a save on each of thes actions, which would address #852

closes gh-895
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment