Skip to content

Fix dirty state not matching save button state #9993

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Feb 8, 2020

Conversation

rchiodo
Copy link

@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
Author

rchiodo commented Feb 7, 2020

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

@DavidKutu DavidKutu self-requested a review February 7, 2020 23:55
@codecov-io
Copy link

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

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
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.

@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