-
Notifications
You must be signed in to change notification settings - Fork 381
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
Add service tab in settings use SwiftUI #311
Conversation
Forget to mention, that I did not find a similar icon for the tab in SF Symbols. If you find a better one, please let me know. |
我试了一下,看起来不错。briefcase 这图标没问题。 发现开启服务会导致崩溃
|
OK, will take a look later |
看了一下代码,有通知 postUpdateServiceNotification,是 onServiceItemMove 逻辑有问题。 |
16c94fc
to
c26d506
Compare
Sorry, accidentally closed this.
I can't reproduce the crash issue, but it may be caused by the |
现在跑起来没问题了。 @Kyle-Ye 帮忙 review 一下代码。 |
@tisfeng I have changed the frame size of the service tab to 360*540, which will look like the below: Please let me know your thoughts. |
修改后的窗口大小没问题,这个可以添加动画吗,不然切换 tab 时看起来好突兀 🤔 |
Official support for separator and highlight behavior is available from macOS 13. Need some time to find a solution for this. |
问题不大,目前新的设置页和菜单都是 macOS 13+。 但是有个问题,目前应用是支持 macOS 11+,如果用户系统是 macOS 12,那会使用旧的设置页吗,我没看到相关的兼容代码。
|
OK, I get it. No, I didn't find such logic. Maybe I could add this logic in like below
|
-1 on this. This is 2 separate thing. One is AppKit lifecycle(entry point) vs SwiftUI lifecycle(entry point) IMO, we will certainly migrate from the old lifecycle to the new one once we are already since We need a This may not work and have some bug, if so we may consider just drop macOS 13- support. |
I don't know much about this, you guys may need to follow up and deal with it later.
Try to see if macOS 13- can be supported first, and if that's not possible, upgrading to macOS 13+ is acceptable. |
|
Same issue in https://stackoverflow.com/a/64194868, but the accepted answer not working.
This is to customize the highlight color of cell selection and try to keep the same behavior as the AppKit version.
I think the default behavior is acceptable. |
In addition to adding the click highlight background color that makes it impossible to drag the cell, another issue is that the highlight index should only work for the current window type, e.g. mini, and the selection effect should disappear when switching to a fixed window. |
…psong/Easydict into phlpsong/service_tab_swiftui
Fixed in e72ef0d. Also correct the behaviors after drag&drop and toggle action. |
Good, these two bugs are both fixed. |
I tried the latest code and it looks like the problem is solved, is there anything else to add to this PR? @phlpsong |
Yes, animation and selection issues have been fixed. No more commits from my side. |
ok |
Summary
#288 Add a new service tab using SwiftUI
Screenshots and videos:
Screen.Recording.2024-01-07.at.10.33.17.mov
Appreciate it if you could have a look at this PR and comments are welcomed.