Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Fix transition for Replace ModalBar with 2 lines #7524

Closed
wants to merge 2 commits into from

Conversation

redmunds
Copy link
Contributor

This is for #7396.

For Replace, the modal bar can only ever be 1 or 2 lines, so I went with a simpler approach. I created a second offscreen2 class for closing a 2 line modal bar, and then conditionally apply the correct class.

I don't see any problem with the transition that opens a 2 line modal bar, so This new class is only used for close.

cc @larz0

@pthiess pthiess assigned RaymondLim and larz0 and unassigned RaymondLim Apr 16, 2014
@redmunds
Copy link
Contributor Author

@larz0 Does this look OK?

@larz0
Copy link
Member

larz0 commented Apr 22, 2014

@redmunds I'll be able to check this out next week.

@larz0
Copy link
Member

larz0 commented May 1, 2014

@redmunds this is awesome. So much better now!

@larz0
Copy link
Member

larz0 commented May 1, 2014

UX review done.

@larz0 larz0 removed their assignment May 1, 2014
@@ -210,7 +211,9 @@ define(function (require, exports, module) {
}

if (animate) {
AnimationUtils.animateUsingClass(this._$root.get(0), "offscreen")
// Use "offscreen2" class if ModalBar is 2 lines tall, otherwise use "offscreen"
animateClass = (this.height() > 50) ? "offscreen2" : "offscreen";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where do you get the magic number 50? Wouldn't it be more reliable to check for the visibility of the second text field?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The second text field is always visible -- we need to determine if it's on the first line or the second line.

50 is roughly a line and a half in height. The height can only be exactly 1 or 2 lines, so it doesn't need to be exact. This could be a problem when we add HiDPI support, though.

A better check might be to see if the top of the 2 text fields is the same, or if second field is below first field.

@redmunds
Copy link
Contributor Author

redmunds commented May 2, 2014

@TomMalbran I assigned you as reviewer on this one.

@TomMalbran
Copy link
Contributor

@redmunds Sure. Do you want to try the easier fix using percentage and fixing the top position from JS, or should I open a new PR?

@redmunds
Copy link
Contributor Author

redmunds commented May 3, 2014

@TomMalbran I've been busy with other stuff, so you're welcome to submit a PR. Thanks.

@redmunds
Copy link
Contributor Author

redmunds commented May 4, 2014

#7743 is a better fix. Closing.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants