Skip to content

feat: popup panel stacking #510

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

Merged
merged 20 commits into from
Apr 6, 2022
Merged

Conversation

LPLafontaineB
Copy link
Contributor

@LPLafontaineB LPLafontaineB commented Mar 4, 2022

Description (*)

This PR simplifies PopupPanel so its only responsibility is to display a single message. It moves the responsibility of creating those messages to the PopupManager. The PopupManager will instantiate PopupPanel gameObjects and display them when it is called. It will reuse those instantiated objects when possible (which is most of the time since we likely won't display more than one or two at once in a regular case).

Related Pull Requests

Issue Number(s) (*)

Fixes issue(s): MTT2733

Manual testing scenarios

The simplest way to see this PR's effects is to duplicate calls to ShowPopupPanel() to have multiple popups at once. Or add a coroutine that perdically calls this, so that you can experiment with closing some of them before new ones are created.

Questions or comments

Contribution checklist

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds are green)

@LPLafontaineB LPLafontaineB added 2-Easy This PR is trivial and can be reviewed quickly 1-Needs Review PR needs attention from the assignee and reviewers labels Mar 4, 2022
@LPLafontaineB LPLafontaineB added 4-On Hold PR can't proceed because it's blocked or is otherwise waiting on something. and removed 1-Needs Review PR needs attention from the assignee and reviewers labels Mar 4, 2022
@LPLafontaineB LPLafontaineB changed the title Feature/popup panel stacking feat: popup panel stacking Mar 4, 2022
@LPLafontaineB
Copy link
Contributor Author

Put on hold as it is not needed for GDC

@LPLafontaineB LPLafontaineB marked this pull request as draft March 21, 2022 14:52
* Removed the stack in PopupPanel and replaced it with a list of PopupPanels in PopupManager
* PopupPanel now only represents an actual popup
* When calling PopupManager, it will instantiate or reuse previous instances of the PopupPanel prefab to display the popup
@LPLafontaineB LPLafontaineB added 1-Needs Review PR needs attention from the assignee and reviewers and removed 4-On Hold PR can't proceed because it's blocked or is otherwise waiting on something. 2-Easy This PR is trivial and can be reviewed quickly labels Mar 21, 2022
@LPLafontaineB LPLafontaineB marked this pull request as ready for review March 21, 2022 17:26
@LPLafontaineB
Copy link
Contributor Author

tested on my phone with a 20:9 ratio and 720x1600 resolution (both in portrait and landscape orientations) with enough popups stacked to reach the maximum popup offset and they all were still visible in the screen.

@LPLafontaineB LPLafontaineB requested a review from pdeschain March 23, 2022 18:28
SamuelBellomo
SamuelBellomo previously approved these changes Mar 29, 2022
@pdeschain
Copy link
Contributor

Apart from the DI comment - this PR is 👍

@pdeschain pdeschain added the 2-Reviewed with Comments PR requires owner's attention label Apr 5, 2022
@LPLafontaineB LPLafontaineB removed the 2-Reviewed with Comments PR requires owner's attention label Apr 5, 2022
Copy link
Collaborator

@fernando-cortez fernando-cortez left a comment

Choose a reason for hiding this comment

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

Will approve once the conversation regarding DI is resolved.

SamuelBellomo
SamuelBellomo previously approved these changes Apr 5, 2022
@LPLafontaineB LPLafontaineB requested a review from pdeschain April 6, 2022 14:50
@LPLafontaineB LPLafontaineB merged commit 7f1ab4c into develop Apr 6, 2022
@LPLafontaineB LPLafontaineB deleted the feature/popup-panel-stacking branch April 6, 2022 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1-Needs Review PR needs attention from the assignee and reviewers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants