-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Reset Scroll on Switching Tabs in Settings #5845
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
base: develop
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR improves the user experience in the preferences window by resetting the scroll position to the top when switching between tabs. Previously, the scroll position would persist across tabs, which could be confusing when navigating to a different preference section.
Key Changes:
- Added scroll position reset logic in the
loadTabmethod to scroll to the top when switching preference tabs
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
IINA follows Apple's Human Interface Guidelines, so the first task is to figure out what Apple thinks the proper behavior is in this case. In a quick look I did not find explicit guidelines for what the UI should do in this case. I could have missed something. In the Scroll views section under Best practices it discusses when to scroll automatically. This part may be relevant:
I read that as an app should err on the side of not changing the scroll position. When it is unclear what the correct behavior should be after reading the Human Interface Guidelines the next thing to look at is how Apple's own apps handle the situation. However I have found that Apple apps sometimes fail to follow their own standards and there are inconstancies between Apple's apps. In the case at hand it is hard to find examples since Apple apps frequently do not offer enough settings on an individual tab to need scrolling. In changing tabs in Safari's settings it seemed to be remembering the scroll position for a tab. At least when I went back to the The last check I will do is to search the net to see if I can get a feeling for how users expect the UI to operate. In poking around the the net I found people complaining loudly about apps that reset the scroll position to the top when switching tabs. I'm thinking we at least need to preserve the scroll position on a tab basis. Currently there is another consideration with respects to changes in this area of IINA… With IINA 1.4.0 the project has started to address technical debt. The way IINA's UI is coded (XIB files) is now 2 generations behind. Work is underway to update the UI to SwiftUI, starting with settings. You can see that work in the new-pref-ui branch. Any changes to the current settings code will have to be adapted and added to the new code. I am a junior IINA developer and always defer to the senior developers on questions about proper UI behavior. Will have to see what the other developers think about such a change. |
|
As you mentioned you go back to the But adding this would be better here.
I guess the context that we are talking here goes wrong, the problem that I think I'm solving is, the tabs shouldn't take the scroll position of the previous tabs.
And I'm fine with doing the preservation on tab basis. |
|
Need to hear what @uiryuu thinks. It is his opinion that matters. |
Description: