Skip to content

Fix dirty state not matching save button state#9993

Merged
rchiodo merged 3 commits intods/custom_editorfrom
rchiodo/undo_fix_save
Feb 8, 2020
Merged

Fix dirty state not matching save button state#9993
rchiodo merged 3 commits intods/custom_editorfrom
rchiodo/undo_fix_save

Conversation

@rchiodo
Copy link
Copy Markdown

@rchiodo rchiodo commented Feb 7, 2020

Undo after save can make things go negative. This is fine as redo will push it back towards zero

@rchiodo rchiodo added the no-changelog No news entry required label Feb 7, 2020
@rchiodo rchiodo self-assigned this Feb 7, 2020
@rchiodo
Copy link
Copy Markdown
Author

rchiodo commented Feb 7, 2020

Actually seems there's another issue. Updating a cell with new output and undoing doesn't work.

Comment thread src/client/datascience/interactive-ipynb/nativeEditorStorage.ts Outdated
@DavidKutu DavidKutu self-requested a review February 7, 2020 23:55
@codecov-io
Copy link
Copy Markdown

codecov-io commented Feb 7, 2020

Codecov Report

❗ No coverage uploaded for pull request base (ds/custom_editor@2fe009a). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@                 Coverage Diff                 @@
##             ds/custom_editor    #9993   +/-   ##
===================================================
  Coverage                    ?   60.79%           
===================================================
  Files                       ?      564           
  Lines                       ?    29881           
  Branches                    ?     4492           
===================================================
  Hits                        ?    18165           
  Misses                      ?    10722           
  Partials                    ?      994

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2fe009a...f8ef5d0. Read the comment docs.

@rchiodo rchiodo closed this Feb 8, 2020
Make a 'save' point for the undo count. Looks like this is what the editor is doing.
@rchiodo rchiodo reopened this Feb 8, 2020
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Feb 8, 2020

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@rchiodo
Copy link
Copy Markdown
Author

rchiodo commented Feb 8, 2020

Seems like VS code is doing weird stuff here too. Now at least my internal state matches theirs.

If you do this:

  1. Edit file
  2. Save file
  3. Undo once - File tab is dirty at this point
  4. Apply ANY random edit - File tab goes clean.

I think they need to change the API to allow us to set the undo stack and the dirty state.

Comment thread src/client/datascience/interactive-ipynb/nativeEditor.ts
@rchiodo rchiodo merged commit 5c7b94e into ds/custom_editor Feb 8, 2020
@rchiodo rchiodo deleted the rchiodo/undo_fix_save branch February 8, 2020 01:54
@lock lock Bot locked as resolved and limited conversation to collaborators Feb 15, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

no-changelog No news entry required

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants