-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Animated transition in/out of Quick View #13
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
Conversation
@@ -880,11 +886,11 @@ - (void)_showHelpWithIdentifier:(NSString*)identifier { | |||
XLOG_DEBUG_UNREACHABLE(); | |||
} | |||
if (showHelp) { | |||
NSRect contentBounds = [_mainWindow.contentView bounds]; |
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.
I had problems with NSRect rect = view.bounds
that doesn't compile in Xcode 6 or 7, I don't remember, so you have to do do [view bounds]
instead.
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.
I tried 6 and 7 and it seems to work.
window.contentView.bounds
didn't work because contentView
was id
until the 10.11 SDK (when it becomes __kindof NSView*
).
Looks pretty good, that's a well written patch! 😄 Some high-level comments:
The most important factor here is that GitUp does not animate its UI on purpose: it's all about speed and not having superfluous / distracting UI niceties. Although you've made Quick View look nicer, it's definitely slower and therefore less responsive. I'm not fundamentally against such "enhancements" but they would need to be thought-through and most likely be disabled by default: maybe a "Enable superfluous animations" preference? |
@@ -37,6 +37,7 @@ | |||
@property(nonatomic) BOOL forceShowAllTips; | |||
- (BOOL)selectCommit:(GCCommit*)commit; // Also scrolls if needed to ensure commit is visible - Returns YES if commit was selected | |||
- (GINode*)nodeForCommit:(GCCommit*)commit; | |||
- (NSPoint)positionForCommit:(GCHistoryCommit*)historyCommit; |
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.
This should take a GCCommit
for consistency with the other APIs and I think the name should reflect better what's the coordinate system e.g. -positionInViewForCommit:
.
Agreed; I didn't do it in this commit but I can add another.
Do you have recommendations for how to test this? The machines I have access to daily are 10.10 and 10.11 only. As for a preference, I thought about that too. Something akin to OS X's Happy to add that in another commit. |
When I (rarely) need to double-check that something works on older OSes, I use Parallels with 10.8 and 10.9 virtual machines. You can easily get the OS images if you are an Apple registered developer. |
For the preference, I think it would be OFF by default and since the animations should be OFF by default, that means its wording should be like "Enable visual effects". |
Took a bit of effort to make them run in a VM, but I got there eventually 😃 After a "fun" debugging session I determined that the GIDualSplitView implementation of |
I thought about it afterwards, but I'm pretty sure you can also use the free Virtual Box to test with older OS X versions. I wouldn't worry about 10.8 if things don't work there, just disable the code path entirely so restore the exact original behavior:
Regarding |
Found it 😉 http://stackoverflow.com/a/30494691 |
Animating toolbar contents will be hard (lack of public API to get at the toolbar's view; and the fact that implicit animations don't work when |
Good find WRT to the splitview 😉 and glad you were able to find a workaround for 10.8! |
Well, that's an unfortunate tricky situation then. You have a very nice patch for sure, but the fact remains that from a UX perspective it's half-done because of the toolbar. I'd like to see this landing in some form, but it can't right now. Can you think of any other way to smooth the toolbar change of appearance? |
bc169d9
to
76d78a8
Compare
Turns out it wasn't as hard as I envisioned 😃 |
Nice! What about 10.8 too? 😄 |
The pref commit needs an updated title and it should be before the 2 animation commits. |
Yep, tested in 10.8 and 10.9. Updating the commits now... |
c46e687
to
e56bdea
Compare
Also when you have a minute, please accept the new GitUp CLA at http://forums.gitup.co/t/gitup-contributor-license-agreement/323. |
This is all ready to land now. The very last thing is that text rendering I was pointing out? Do you have an idea what is causing this and if it can be avoided? If not, I don't have a problem landing it as-is. |
Yes, I modified the commit to include a fix: jtbandes@fd4681c#diff-9640dac2231f3c7e87bbda41062cc757R289 I noticed there's a similar issue with the "Show" button, but it looks like it's already rendering incorrectly (no subpixel AA) in the release version of GitUp. For some reason, during the animation it does have subpixel AA. I don't think there's a similar fix since there is no |
Animated transition in/out of Quick View and added visual effects preference
All right, it's merged, congrats! |
🎊 |
Looks awesome, thanks @jtbandes! |
As Quick View feels a lot like Quick Look, I thought it would be nice to have some smooth transitions. (It would be nice for the title bar to fade at the same time, but I didn't do that in this commit.)
Document
's_containerView
to_mapContainerView
, to make its purpose more evident