Comments (7)
Thanks, I'm not ready to make the repo public yet. I'm not sure yet how I will release it. I'm thinking to make a basic version of it free, and maybe a paid version for advanced components.
from react-native-macos.
For the extra case for NSTabView, I think that's a fine PR to make. For the clicks being in the wrong spot, I actually ran into this and meant to write some docs about it: #1904
I think the hit testing can be fixed React Native macOS side so that all custom native components don't have to override hit testing.. but it's been a while.
from react-native-macos.
@Saadnajmi Thank you, your hitTest plus isFlipped is working better than what I had.
I will make a PR for the NSTabView mouseUp soon.
I wonder if there are any other elements inheriting from NSView that need to handle mouseDown/Up, but for now all I see is NSTabView. Everything else seems to inherit from NSControl.
from react-native-macos.
If you are open to it, you can also make one targeting the branch 0.73-stable
so that we can release a patch release with the change
from react-native-macos.
Related, I'm curious how well your NSTabView native module works. Any chance you can send a screenshot of it in an app? :)
from react-native-macos.
I'm having another issue with it, if I add any margin or padding styles on the tabview the click positions will be off by that many pixels. Even when the style is placed on a <View>
surrounding the tabview. I found this post that says you have to override insertReactSubview:atIndex:
, removeReactSubview
, and reactSubviews
on the view in order to get the subviews to be managed by the Yoga layout system. But I haven't gotten it to work.
NSTabView is very tricky to get working because it wants to manage its own subviews based on which tab is active. But React Native also manages the subviews, so you end up with too many subviews. What I did is give each tab the exact same React Native view and let React conditionally render a single view based on the item returned from the didSelectTabViewItem
event.
I'm actually making a set of AppKit components for React Native Macos. I was forced to make a TabView because the preferences window requires an NSTabViewController in order to render the toolbar buttons in the preferences style. So I went ahead and made a standalone TabView as well.
Here's a TabView inside a Preferences TabView.
from react-native-macos.
Thanks for the info. Yes, I think something like NSTabView
is hard to add directly in React Native because of the conditional rendering of children. Maybe it'll get better with Fabric, but I don't know? I'm glad there are iOS guides/blogs you can work off of. You might need a custom shadow view (which I have found very little docs describing how to do so). And if your Appkit repo is open source, I'd give it a follow :)
from react-native-macos.
Related Issues (20)
- Web inspector flashing on production/release build when starting the app HOT 6
- Keyboard shortcuts (copy, paste, select) not working in TextInput HOT 6
- "Fatal error: 'ExpoModulesCore/ExpoModulesCore.h' file not found" in run-macos HOT 3
- I want to request a feature like in-app Purchases support, and Firebase support. HOT 3
- useWindowDimensions causes infinite re-rendering HOT 3
- Wrong image pixel density version on initial launch HOT 6
- Right click context menu HOT 5
- No version of react-native-macos@^0.70.0-0 found! HOT 1
- <Text onBlur={() => {}}> throws -[RCTTextView setOnBlur:]: unrecognized selector sent HOT 1
- How can i get the microphone or camera permission in react-native-macOS, i am using react-native-permissions HOT 3
- ERROR: No bundle URL present. HOT 10
- `Text` elements' `backgroundColor` style prop extends to the entire background
- How can I make the react-native-macos work with ios? HOT 7
- npx react-native run-macos in a new project is launching code in an unrelated project HOT 2
- Native local notifications in macOS (is this already possible?) HOT 19
- React Native Macos overrides `resolveRequest` property of `resolver` in Metro config HOT 2
- Cursor jumps on multiline text inputs HOT 2
- Dimensions.get('window') and useWindowDimensions() return 0 when the containing window is an NSPopover HOT 1
- <Switch> property 'ios_backgroundcolor' yields inconsistent results, other color properties do not work at all HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-macos.