Skip to content
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

Number and Symbol cards return to incorrect location after window resize #69

Closed
Tracked by #932
chrisklus opened this issue Apr 10, 2023 · 8 comments
Closed
Tracked by #932

Comments

@chrisklus
Copy link
Contributor

Found while working on phetsims/number-play#228.

Tagging phetsims/qa#929.

If you pull out a number card or symbol card, then resize the window (in a way that moves the number card or symbol card home), then return them, they animate to the wrong spot. This is present in rc.1.

@chrisklus
Copy link
Contributor Author

From 4/11 standup with @zepumph and @Nancy-Salpepi:

We are going to try converting the home location Vector2 to a function that gets the current position.

chrisklus added a commit that referenced this issue Apr 11, 2023
@zepumph
Copy link
Member

zepumph commented Apr 11, 2023

@samreid @chrisklus and I fixed this by recalculating the destination when dropping, and animating to the side of the carousel if the card is off page. @Nancy-Salpepi can you please take this for a test drive since we discussed it this morning together? Resize should not cause this bug anymore on master.

@Nancy-Salpepi
Copy link

Cards now animate to the correct position when changing window size.
A couple of things I noticed:
--If I place numbers to the left and right sides of the carousel and then decrease window size, the number on the left will not overlap the carousel, but the number on the right will.
-Operation cards can also overlap the Operations panel when decreasing window size. This didn't happen in dev.10.

numberOverlapsCarousel.mp4

Screenshot 2023-04-11 at 4 42 08 PM

@chrisklus
Copy link
Contributor Author

@Nancy-Salpepi @zepumph and I reviewed the last two behaviors identified in #69 (comment), and think we are good to go as is. We though about making new bounds for all of the things on this screen to contain them to not overlap with any of the panels, but concluded that using their own drag bounds seems fine.

@zepumph
Copy link
Member

zepumph commented Apr 12, 2023

We discussed this with @amanda-phet to review the new (3rd paradigm) for animating items back into the carousel. We decided to keep this in because the animation behavior is more important for the younger audience of this sim. It would be better than disappearing when dropped. We will proceed with cherry picking it.

chrisklus added a commit that referenced this issue Apr 12, 2023
chrisklus added a commit to phetsims/number-play that referenced this issue Apr 12, 2023
@chrisklus
Copy link
Contributor Author

Patch applied

@zepumph
Copy link
Member

zepumph commented Apr 13, 2023

For QA: The expected, new behavior for this release is the the card will always return exactly to the location of that number's card, no matter the resize. If that card number's creator in the carousel is "off the page", then it will animate to the edge of the carousel in the direction of where the card's page would be (left or right), but not go beyond, and instead just to where the center of the card meets the edge of the carousel.

Feel free to close if there is nothing too weird about this.

@Nancy-Salpepi
Copy link

This looks good to me in rc.2.
Closing

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

No branches or pull requests

3 participants