Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configuration callback property to adjust AppKit object #86

Closed

Conversation

Maschina
Copy link
Contributor

I have often the need to tune AppKit objects being embedded into SwiftUI with NSViewRepresentable. This configuration property is a proposal for an optional parameter to directly access the RecorderCocoa object (similar to introspect)

@sindresorhus
Copy link
Owner

I think it's better to solve specific problems. If I add this, every user will just use it to work around some missing feature instead of contributing the proper solution and helping everyone. If someone really wants to just quickly work around some missing feature, they can already use Introspect. I also don't think there's much demand for this as this package has existed for a long time and #81 is really the only customization feature request it has received.

@sindresorhus
Copy link
Owner

If this would have been accepted, I think it would be more SwiftUI-like to make it a builder method: KeyboardShortcuts.Recorder(…).configure { }.

@Maschina
Copy link
Contributor Author

If this would have been accepted, I think it would be more SwiftUI-like to make it a builder method: KeyboardShortcuts.Recorder(…).configure { }.

Makes sense. In terms of flexibility and extendability, I highly encourage to consider such an option. If you agree, I can change it towards a modifier solution.

@sindresorhus
Copy link
Owner

I would probably have agreed with you if this had been any other component, but the keyboard shortcut recorder does not really have a lot of need to be customized. And customizability also comes with downsides. If the user can customize everything, they will make mistakes and then ask for support here.

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.

None yet

2 participants