CodeEditApp / CodeEdit

CodeEdit App for macOS – Elevate your code editing experience. Open source, free forever.
https://codeedit.app
MIT License
21.01k stars 1.01k forks source link

✨ Preview #140

Open underthestars-zhy opened 2 years ago

underthestars-zhy commented 2 years ago

When writing code like swiftui or HTML, we always expect a preview view. So in this way, we can know what we are doing or changing. Also, data analyst needs this too.

underthestars-zhy commented 2 years ago

About SwiftUI preview, I have two ways to manage it. First, if we could find how Xcode previews the view, we would need to figure out how to get the subview of a view and modifies of a view. Second way. We could create a FakeUI. This package has the same functions or methods as SwiftUI. And we change import SwiftUI to import FakeUI. And run it. Get a JSON result and recognize it, then display the preview.

nanashili commented 2 years ago

About SwiftUI preview, I have two ways to manage it. First, if we could find how Xcode previews the view, we would need to figure out how to get the subview of a view and modifies of a view. Second way. We could create a FakeUI. This package has the same functions or methods as SwiftUI. And we change import SwiftUI to import FakeUI. And run it. Get a JSON result and recognize it, then display the preview.

You could take a look at the android version on github and get an exact idea of how they handle previews

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.