Skip to content

Conversation

thecoolwinter
Copy link
Collaborator

Description

Adds a WindowCodeFileView that wraps CodeFileView but delays it's appearance until a window is available. It also focuses the code file on appearance. These changes are isolated to a single-file window and CodeFileView is left unchanged as to not break any workspace windows.

Thank you to @garethng for the initial work on this in #1174.

Related Issues

Checklist

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

Screenshots

Screen.Recording.2023-03-19.at.10.41.55.AM.mov

Copy link
Member

@Wouter01 Wouter01 left a comment

Choose a reason for hiding this comment

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

While I think this fix is more a hack than a fix, it works so that's fine I guess :)

@thecoolwinter
Copy link
Collaborator Author

While I think this fix is more a hack than a fix, it works so that's fine I guess :)

I agree it does seem a little hacky but it feels safer than a DispatchQueue call and keeps it in SwiftUI.

Copy link
Member

@lukepistrol lukepistrol left a comment

Choose a reason for hiding this comment

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

Hacky but I guess it works for now 😄

@lukepistrol lukepistrol merged commit ee47bab into CodeEditApp:main Mar 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot type after creating a new file when creating a new file in the welcome dialogue, can not edit the file in any way
3 participants