decentraland / sdk

PM repository for SDK
Apache License 2.0
4 stars 4 forks source link

SDK7: Removing a temporary message display can cause another ui element to move #939

Open cfravel opened 1 year ago

cfravel commented 1 year ago

Background is provided in a comment

Steps to reproduce:

  1. Clone the demo scene at Cloning the scene in https://gitlab.com/dcl-tech/demo-uis
  2. Be sure that the useGeneralizedCompositing variable near the top of DemoUs.tsx is set to true
  3. Run it in preview
  4. If you don’t see the 2D Uis appear automatically, click on the green box to open them
  5. . // You may have to click a second time, see issue #936
  6. Click the button on Ui_2 to maximize Ui_2 and see a second button.
  7. Click that second button
  8. Immediately, before the Announcement goes away, click the first/original/right button
  9. // Expected: the UI will minimize in place
  10. // Actual: it minimizes, but jumps to the top left corner of the Announcement panel, and might disappear at the end of the announcement, or remain there for the rest of the scene session

This is really ugly, please fix asap.

cfravel commented 1 year ago

Background: I needed a way to manage multiple unrelated 2D Uis being added and removed independently. Why?

  1. Because one can only call ReactEcsRenderer once in a scene,
  2. Because my scenes sometimes need more than one 2D Ui
  3. Because those Uis may be completely unrelated, in their own reusable modules, for example a. BuilderHUD b. CinemaControls c. AdmissionTicket d. Dance button e. Stage Manager Controls The example scene linked above demonstrates such a mechanism, but also demonstrates some issues with SDK7 2D UIs, which I’ll report in decentraland/sdk, including interfering with (cross-talking with) the properties of other UiEntities.