CodeEdit icon indicating copy to clipboard operation
CodeEdit copied to clipboard

Fixes "Menu Bar Items Not Updating (#1684)"

Open xyzqm opened this issue 1 year ago • 5 comments

Description

The issue is described in detail in #1684.

~I tried to resolve a related issue, #1696, but it was harder than I anticipated since the state of the Utility Area is stored separate to the other panes for some reason. Any ideas to resolve this slight issue would be welcome :)~

EDIT: I think I fixed it!

Related Issues

  • Closes #1684
  • Closes #1696

Checklist

  • [x] I read and understood the contributing guide as well as the code of conduct
  • [x] The issues this PR addresses are related to each other
  • [x] My changes generate no new warnings
  • [x] My code builds and runs on my machine
  • [x] My changes are all related to the related issue above
  • [x] I documented my code

Screenshots

https://github.com/CodeEditApp/CodeEdit/assets/65467530/166d9b35-ede1-47b8-8814-cf1cbb1a61f2

xyzqm avatar May 01 '24 05:05 xyzqm

I fix lint errors and I can review 👍

thecoolwinter avatar May 04 '24 19:05 thecoolwinter

By the way, the SwiftLint error feels a bit overly constraining, especially considering it limits the class body to 250 lines and my code currently has 251; is there a way to perhaps silence the warning, or is that not recommended?

xyzqm avatar May 05 '24 06:05 xyzqm

Yeah I don't understand why it gives an error now on that file. The length of the class is way longer than 251 lines...

matthijseikelenboom avatar May 06 '24 17:05 matthijseikelenboom

@thecoolwinter bump?

xyzqm avatar May 09 '24 22:05 xyzqm

Yeah swiftlint errors can be annoying, especially when it's one line over the limit. But in this case we can just move some code to an extension. I believe all the toolbar code can be moved to a new file without modification (lines 141-238ish). Just a new file in the same dir named CodeEditWindowController+Toolbar.swift.

thecoolwinter avatar May 10 '24 16:05 thecoolwinter

@thecoolwinter does this look good?

xyzqm avatar May 15 '24 22:05 xyzqm

Looks good, thanks for your patience!

thecoolwinter avatar May 16 '24 16:05 thecoolwinter

@allcontributors add @danielzsh for bug

austincondiff avatar May 16 '24 19:05 austincondiff

@austincondiff

I've put up a pull request to add @danielzsh! :tada:

allcontributors[bot] avatar May 16 '24 19:05 allcontributors[bot]