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

[wrap-guide] Make the automatic modification of editor.preferredLineLength configurable #754

Merged
merged 2 commits into from
Oct 16, 2023

Conversation

confused-Techie
Copy link
Member

In short, the wrap-guide package will automatically sync the setting of editor.preferredLineLength whenever it's own settings are changed. Except it will only set the editor.preferredLineLength to that of the currently open syntax. Which can be confusing and downright unhelpful depending on your use case. Much more information is available on #697

But this PR takes the simpler approach to this, in case anybody has come to rely on this behavior, where we make this behavior configurable within wrap-guide introducing a new setting wrap-guide.modifyPreferredLineLength which by default is true (So that we don't change behavior on anyone) but does mean this function can be turned off to stop the unexpected behavior.


Resolves #697
Resolves #696

@mauricioszabo
Copy link
Contributor

Do you think you can add a test case for this change?

@confused-Techie
Copy link
Member Author

Do you think you can add a test case for this change?

Yeah lemme see what I can do here

@confused-Techie
Copy link
Member Author

Alright, @mauricioszabo and done. We just gotta let tests run to ensure it's working as expected in CI

Copy link
Member

@DeeDeeG DeeDeeG left a comment

Choose a reason for hiding this comment

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

I sort of recall what this was about.

Code looks reasonable with a quick skim, and test cases are added.

This is admittedly a somewhat cursory review, but seems legit! Approving...

Copy link
Member

@DeeDeeG DeeDeeG left a comment

Choose a reason for hiding this comment

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

We do only have a negative test case "preference disables modifying the user's other preference if set".

Would be Excellent to have a positive test case "modifying other preferences is allowed and works, if the user specifies they want to allow that".

I dunno if it's a requirement to add such a test case, I leave that to the judgment of the PR author, but it seems like a good thing to me from my vantage and after my (admittedly brief) review.

@confused-Techie
Copy link
Member Author

@DeeDeeG Thanks a ton for review!
I believe there are already tests for the positive case, but I can always double check. Since the positive case has been default behavior for quite some time.

So I think we are covered on that front.

Otherwise since I know we are in a slight rush, I'll go ahead and merge this then take a double check after the fact.
But thanks again!

@confused-Techie confused-Techie merged commit 8625b77 into master Oct 16, 2023
@confused-Techie confused-Techie deleted the wrap-guide/configurable-scope-settings-sync branch October 16, 2023 04:29
@Daeraxa
Copy link
Member

Daeraxa commented Oct 16, 2023

Oh damn I didn't realise this got merged, from the conversation it seemed like it was going to miss the 110 release. I didn't add it to the blurb, sorry about that.

@confused-Techie
Copy link
Member Author

Oh damn I didn't realise this got merged, from the conversation it seemed like it was going to miss the 110 release. I didn't add it to the blurb, sorry about that.

No worries at all. Last we left it, it wasn't going to get merged. Only once we realized that did we last minute get it included, so not at all something you missed, just last minute stuff sneaking by

@Daeraxa
Copy link
Member

Daeraxa commented Oct 17, 2023

One thing though, it looks like this made it to the top of the changelog but not into the individual "PR" section of 110?

@confused-Techie
Copy link
Member Author

One thing though, it looks like this made it to the top of the changelog but not into the individual "PR" section of 110?

Yeah looks like you are right about that.

So that's a little messy, would we want to add it retroactively to the changelog?

@Daeraxa
Copy link
Member

Daeraxa commented Oct 17, 2023

The main repo changelog is meant to be the source of truth so I think it is important to add it in there. I don't think it needs to be added into the current regular release changelog unless we do a 1.110.1 for a diffeerent issue.

@confused-Techie
Copy link
Member Author

Yeah good call, I'll get that added

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants