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
UX improvements to the “Jump to…” command #4084
UX improvements to the “Jump to…” command #4084
Conversation
@@ -124,7 +124,7 @@ extension MainMenuActionHandler { | |||
} | |||
|
|||
@objc func menuJumpTo(_ sender: NSMenuItem) { | |||
Utility.quickPromptPanel("jump_to") { input in | |||
Utility.quickPromptPanel("jump_to", inputValue: self.player.info.videoPosition?.stringRepresentationWithPrecision(3)) { input in |
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.
3 sub-second digits is the highest precision selectable in the UI (and commonly used in video editing). I think it’s a good default. Alternatively, we could use the precision the user has previously chosen to be displayed in the player controls.
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.
3 digits is good IMO
iina/VideoTime.swift
Outdated
} else { | ||
return nil | ||
} | ||
let split = Array(format.split(separator: ":").map { String($0) }.reversed()) |
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.
Probably the new regex builder would be cool to use for parsing but I gather it’s only available with newer versions of swift.
Is there anything I can do to improve the chances of this getting merged? This feature would have been helpful to me numerous times in the past year. |
I pulled and tested this fix, and it looks good to me. Unfortunately I can't do anything to get it merged, so 🤞 |
534ecba
to
4514d99
Compare
@sabberworm Thanks for your contribution. Noted this PR in the backlog. Will merge this before the next beta version. |
4514d99
to
74ccc1c
Compare
@@ -124,7 +124,7 @@ extension MainMenuActionHandler { | |||
} | |||
|
|||
@objc func menuJumpTo(_ sender: NSMenuItem) { | |||
Utility.quickPromptPanel("jump_to") { input in | |||
Utility.quickPromptPanel("jump_to", inputValue: self.player.info.videoPosition?.stringRepresentationWithPrecision(3)) { input in |
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.
3 digits is good IMO
Co-authored-by: Yuze Jiang <i@uiryuu.moe>
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.
LGTM
This PR adds small UX improvements to the Playback → Jump to… command:
Initially I had wanted a quick way to copy the current time code. I was already starting to implement a dedicated command for that when I realized the same could be accomplished more synergistically by beefing up the existing “Jump to…” command.
Will also fix #4547