david-swift / SettingsKit-macOS

Add a settings window to a SwiftUI macOS app
https://david-swift.github.io/SettingsKit-macOS/
MIT License
87 stars 2 forks source link

Select new item automatically after created #4

Closed longseespace closed 1 year ago

longseespace commented 1 year ago

Is your feature request related to a problem? Please describe.

After a new SettingsSubtab is created, SettingsKit does not select that tab automatically. Not a good UX

Describe the solution you'd like

After a new SettingsSubtab is created, automatically select that tab.

Describe alternatives you've considered

Another solution is allowing developer to specify the $selection.

Additional context

Reference:

https://github.com/david-swift/SettingsKit-macOS/blob/5b670db13e6ef15741a26a19d826f46202980aab/Tests/TestApp/TestApp/ViewModel/TestAppModel.swift#L38

david-swift commented 1 year ago

I've implemented this feature (the preferred solution) in SettingsKit 0.1.10. You can find more information in this comment in #5.

david-swift commented 1 year ago

I've improved the implementation of that feature in SettingsKit 0.1.11. You can find more information in this comment in #5.