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

Settings UI removes comments in settings.json #9167

Closed
DennisGaida opened this issue Feb 15, 2021 · 5 comments
Closed

Settings UI removes comments in settings.json #9167

DennisGaida opened this issue Feb 15, 2021 · 5 comments
Labels
Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.

Comments

@DennisGaida
Copy link

Environment

Windows build number: Microsoft Windows NT 10.0.19042.0
Windows Terminal version: 1.6.10412.0

Steps to reproduce

Open the settings UI settingsUI, make some changes, save

Expected behavior

I would assume that the settings.json is just changed with new values. Whatever is changed is written.

Actual behavior

It seems that the settings are completely rewritten by the settingsUI - meaning my order of things in the json is completely gone and more importantly some comments are gone. I'm playing around with different fonts for example and the section looked like this:

"defaults": 
        {
            //"fontFace": "Cascadia Code",
            "fontFace": "CaskaydiaCove NF"
        },

After saving with the settings UI, the commented out fontFace is gone. The same behavior I observed for colorScheme within the list of profiles. Other comments are still there (e.g. in the keybindings section)

@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Feb 15, 2021
@Don-Vito
Copy link
Contributor

There is a discussion about similar problems here: #8991.
Probably worth adding this issue there as well.

@DennisGaida
Copy link
Author

Good link, I tried to find a related issue before. My "removing comments" issue isn't addressed in the original issue though.

@DHowett
Copy link
Member

DHowett commented Feb 15, 2021

/dup #8991 these are all part of the same umbrella of issues -- we don't have good "in-place" editing for the settings file. thanks for bringing this up!

(We re-serialize the entire document, but since the settings UI doesn't support key bindings we just move that part of the serialization tree over from the original... this is why comments remain with bindings but nothing else.)

@ghost
Copy link

ghost commented Feb 15, 2021

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@ghost ghost closed this as completed Feb 15, 2021
@ghost ghost added Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing. and removed Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Feb 15, 2021
@DennisGaida
Copy link
Author

@DHowett thanks for the additional information. This is how you close an issue. I'll follow #8991 closely.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.
Projects
None yet
Development

No branches or pull requests

3 participants