Skip to content
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

fix: relaxed saveAll if no Internet connection #2080

Merged
merged 1 commit into from
Jun 8, 2023
Merged

fix: relaxed saveAll if no Internet connection #2080

merged 1 commit into from
Jun 8, 2023

Conversation

kittaakos
Copy link
Contributor

@kittaakos kittaakos commented May 30, 2023

Motivation

Saving any (local and cloud) sketches without an Internet connection must be possible. (Pulling/pushing cloud sketch changes are expected to not work without the Internet.)

Change description

The previous logic has incorrectly bailed the save when there is no Internet connection. The corrected logic disallows saving files if there is no connection between the front and backend.

Other information

How to verify the fix:

  • open IDE2, create a new sketch, turn auto-save off, disconnect from the Internet (you will see the yellow Offline status bar),
  • modify the sketch and save it. It works. Restart IDE2, and you will see the updated sketch content.

Reviewer checklist

This PR does not fix #2081.
Ref: cff2c95
Closes #2079

  • PR addresses a single concern.
  • The PR has no duplicates (please search among the Pull Requests before creating one)
  • PR title and description are properly filled.
  • Docs have been added / updated (for bug fixes / features)

The previous logic has incorrectly bailed the save when there is no
Internet connection. The corrected logic disallows saving files if there
is no connection between the frontend and the backend.

Ref: cff2c95
Closes #2079

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
@kittaakos kittaakos added topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project labels May 30, 2023
@kittaakos kittaakos self-assigned this May 30, 2023
@kittaakos kittaakos marked this pull request as ready for review May 30, 2023 11:55
Copy link

@fwlrichard fwlrichard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested Windows_X86-64_zip and Save now works while offline as long as you turn "Auto-Save" Off.

Copy link
Contributor

@per1234 per1234 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Akos!

@kittaakos kittaakos merged commit 4af488b into main Jun 8, 2023
20 checks passed
@kittaakos kittaakos deleted the #2079 branch June 8, 2023 06:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sketch not saving while Offline
3 participants