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

Show one-time warning before saving a project configuration #137

Closed
ivankravets opened this issue Nov 28, 2019 · 6 comments · Fixed by #151
Closed

Show one-time warning before saving a project configuration #137

ivankravets opened this issue Nov 28, 2019 · 6 comments · Fixed by #151
Assignees
Labels
bug Something isn't working
Milestone

Comments

@ivankravets
Copy link
Member

ivankravets commented Nov 28, 2019


Warning! Project Configuration does not preserve comments and custom formatting in the platformio.ini file. The file contents will be overridden with a current configuration which you see in UI. Would you like to save the configuration?

[Cancel] [Save]

@ivankravets ivankravets added the bug Something isn't working label Nov 28, 2019
@ivankravets ivankravets added this to the 3.1 milestone Nov 28, 2019
@TD-er
Copy link

TD-er commented Nov 29, 2019

The file contents will be overridden with a current configuration which you see in UI. Would you like to save the configuration?

This sentence can be improved.

Warning!
The entire file contents or platformio.ini will be rewritten with the current configuration defined in this UI.
Continue to save the configuration?

@pfeerick
Copy link

Another approach to this might also be 'show the warning if the file has not been automatically generated' ... i.e. rather than be a one-time warning, show warning if the file has not been UI generated, and you're trying to make UI changes. If that is feasible. Consider making the warning hidable, for those that think they know what they're doing! ;)

@ivankravets
Copy link
Member Author

'show the warning if the file has not been automatically generated'

If there is no platformio.ini file, you will not be able to edit it :) So, we show in Projects section only PlatformIO-based projects that have platformio.ini.

I'm not sure that it's easy to track how file was created before. I think this warning is good for every developer even he edits the first time. He will know that there is a difference between manual editing and UI.

@DevinNorgarb
Copy link

@ivankravets @TD-er

The file contents will be overridden with a current configuration which you see in UI. Would you like to save the configuration?

This sentence can be improved.

Warning!
The entire file contents or platformio.ini will be rewritten with the current configuration defined in this UI.
Continue to save the configuration?

Do you not mean?

The entire file contents or of platformio.ini will be rewritten with the current configuration defined in this UI.

I came looking for this because I noticed it now in the IDE and thought that it should be corrected.
Let me know if it should be of instead of or. and I quickly create a PR.

ivankravets added a commit that referenced this issue Jun 13, 2022
@ivankravets
Copy link
Member Author

Thanks! Solved in 531e4d2

@DevinNorgarb
Copy link

@ivankravets I was hoping to get my first commit into platform.io this way ;)
But either way, glad I could help. 👍🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
5 participants