ptmt / react-native-macos

[deprecated in favor of https://microsoft.github.io/react-native-windows/] React Native for macOS is an experimental fork for writing desktop apps using Cocoa
MIT License
11.24k stars 429 forks source link

Desktop-specific APIs #4

Open ptmt opened 9 years ago

ptmt commented 9 years ago

Implement core APIs. Keep in mind that some most difficult could be covered by plugins.

yanivtal commented 8 years ago

Hey, great work with this project! What milestone are you expecting to add these in? Next release is 0.2.0 right? Would this be 0.3.0 stuff?

ptmt commented 8 years ago

I've started to implement a real product based on RND now, which will use most of these APIs internally. So eventually these will be merged into master. If you need some particular thing let me know.

yanivtal commented 8 years ago

That's great! Congrats. I'm very interested in the file writing API's. I'll keep an eye out for these hitting.

Amnesthesia commented 7 years ago

Any news on the file-writing API (or file-reading for that matter)? Been looking around trying to figure out how to read files and directories with no luck

ptmt commented 7 years ago

I believe it should be the plugin, like react-native-fs. See also https://github.com/skeletcode/skelet/blob/master/macos/skelet/Modules/FilesystemManager.m#L34 for an example, there are 3 methods, not perfect, though. What's you task?

matpaul commented 7 years ago

@ptmt what of these tasks has more priority ? Is resizing by dragging mean NSSplitView ?

ptmt commented 7 years ago

Yes, NSSplitView would be one of key component for desktop app.

The blocker-issue, though, is dealing with resizing due to a lot of views in AppKit. https://github.com/ptmt/react-native-macos/pull/93 this solution was a workaround, I don't sure if it needs to be merged. If I had enough time, I would update RN for macOS with latest React Native (including Yarn, Flow updates and etc.) and keep profiling this. If you interested in let me know, I'll provide some details.

The other core issue is events system, like mouse events and such. See problems like this https://github.com/ptmt/react-native-macos/issues/58

Also: https://github.com/ptmt/react-native-macos/issues/40 (that's something that original React Native doesn't have as a concept).

On Wed, 28 Dec 2016 at 19:51 Paul Matyukov notifications@github.com wrote:

@ptmt https://github.com/ptmt what of these tasks has more priority ? Is resizing by dragging mean NSSplitView ?

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/ptmt/react-native-macos/issues/4#issuecomment-269504735, or mute the thread https://github.com/notifications/unsubscribe-auth/AA9SU7m8IAUHUTSE5bWSIJj1TIrIo2wOks5rMpOSgaJpZM4GSJTs .

matpaul commented 7 years ago

I'll start with implementation NSSplitView

I saw issue with resizing in init app (when resize - view background resize some delay) I'm very interested in this project so yep, if you have some more details it will be good to provide it.

Concerning Event bug - when I test cursor changes, onMouseEnter and onMouseLeave work excellent - so need some information how to reproduce it.

It will be very cool to merge with last react native, maybe after 0.40 released.

I think about implementation #40, but at this moment i think there are many other work ))

Also, how to provide documentation for custom components that not in React Native docs?

stanlemon commented 7 years ago

Are there any prototypes around the file open dialog that could be looked at for inspiration?

ptmt commented 7 years ago

@stanlemon https://github.com/skeletcode/skelet/blob/master/macos/skelet/Modules/DialogManager.m#L32

nathggns commented 6 years ago

Did you manage to look at menubar icons yet?

ptmt commented 6 years ago

Yes, I used it couple times, but this requires to write a bit of native code. See this for example https://github.com/ptmt/dripr-menubar/blob/react-native/osx/dripr/AppDelegate.m#L65

doprdele commented 5 years ago

Can you open files yet?

ptmt commented 5 years ago

Yes, see https://github.com/skeletcode/skelet/blob/master/macos/skelet/Modules/DialogManager.m#L32 for example. If you need to open it without a user consent there is a few examples like this https://github.com/ptmt/ratpack/commit/d1c2b2e90228f63629bb8714c4b941a9411a2438, but you’ll need to write ObjC