enso-org / enso

Hybrid visual and textual functional programming.
https://enso.org
Apache License 2.0
7.34k stars 323 forks source link

Visualization displayed in the wrong place while interacting with Component Browser #6158

Closed xvcgreg closed 1 year ago

xvcgreg commented 1 year ago

Discord username

No response

What type of issue is this?

Permanent – Ocurring repeatably

Is this issue blocking you from using Enso?

Is this a regression?

What issue are you facing?

Visualization is being displayed in wrong place - depending on what component is currently active. You can observe it changing location from 13th second of the attached video (from top left corner to the correct place and back)

https://user-images.githubusercontent.com/108271897/228968369-93222197-914a-4b92-82b3-8eddbf2a2d04.mp4

Expected behaviour

Viz being in correct place, below input area.

How we can reproduce it?

No response

Screenshots or screencasts

No response

Enso Version

https://github.com/enso-org/enso/actions/runs/4550435584 Nightly Release # 862 (Actions no)

Browser or standalone distribution

Standalone distribution

Browser Version or standalone distribution

standalone

Operating System

Windows

Operating System Version

11pro 22H2

Hardware you are using

12th Gen Intel(R) Core(TM) i9-12900HK / RTX3060 Laptop

farmaazon commented 1 year ago

@xvcgreg you marked it as "Permanent – Ocurring repeatably" Do you have a reproduction scenario? I cannot reproduce, basing only on video you posted.

As I see, the "main visualization" is always at the wrong place. When preview shows error, we display a different, "error" visualization, which is in good place.

xvcgreg commented 1 year ago

@farmaazon

Do you have a reproduction scenario? I cannot reproduce, basing only on video you posted.

It's permanent for me:

here's another recording of this issue:

https://user-images.githubusercontent.com/108271897/229729652-33c811a4-a9ad-45e9-89be-a76fd53d31de.mp4

farmaazon commented 1 year ago

@xvcgreg Can you post your project here? I do not have this issue with my projects.

Also, the version posted seems to be invalid, it refers to a commit from 3 years ago.

xvcgreg commented 1 year ago

Also, the version posted seems to be invalid, it refers to a commit from 3 years ago. @farmaazon

Here you go: https://github.com/enso-org/enso/actions/runs/4550435584

xvcgreg commented 1 year ago

Unnamed_9.zip

@farmaazon here's the project

xvcgreg commented 1 year ago

2 additional media files with issues that might be related to this bug:

  1. Wrongly placed visualizations move with lateral panning of the camera

https://user-images.githubusercontent.com/108271897/229795049-ebb22ecc-41e5-485b-8701-707974c377b6.mp4

  1. Selection of the visualization displayed in the wrong place

Screenshot 2023-04-04 143252

sylwiabr commented 1 year ago

@xvcgreg can you check the Enso version and paste it here? The issue you linked is 4 years old

xvcgreg commented 1 year ago

@xvcgreg can you check the Enso version and paste it here? The issue you linked is 4 years old

Updated the description (today it was brought to my attention that GH is linking it to issues, not actions). Sorry for that.

xvcgreg commented 1 year ago

@farmaazon issue with nodes moving while panning the camera was introduced in # 857 (https://github.com/enso-org/enso/actions/runs/4486593388) nightly 2023.03.22 (in previous one (# 856) it's not occurring

GitHub
Nightly Release · enso-org/enso@8c6fd60
Hybrid visual and textual functional programming. Contribute to enso-org/enso development by creating an account on GitHub.
sylwiabr commented 1 year ago

It happened to me today

image

The visualization glued to the node when I panned the screen. Unfortunately we are blocking shortcut to open developer tools so I couldn't see if there are any logs in the IDE.

sylwiabr commented 1 year ago

It looks like it happens when I am building quickly the workflow with the scene panned. There is lots of ensogl warnings in the logs console so hard to see if there is anything relevant.

https://user-images.githubusercontent.com/12892578/230612325-c9e18199-873d-4acb-a4e0-7a8408e94ecf.mov

enso-bot[bot] commented 1 year ago

Ilya Bogdanov reports a new STANDUP for today (2023-04-19):

Progress: Investigating the bug. Probably the weirdest bug I’ve ever seen. Dom layers suddenly change their position when you press Tab on a panned scene, but the exact mechanism of this movement is unclear. Preventing default for keyboard events fixes the issue. Started to check if it has some unwanted effects on other parts of the application. It should be finished by 2023-04-21.

Next Day: Next day I will be working on the same task. Continue checking the fix, open a PR if everything is ok.

vitvakatu commented 1 year ago

Copied from discord, for history:

I can reproduce the issue easily, but I still don't understand what causes it. Take a look at the attached video. When opening the CB with the Tab key, the DomLayer div suddenly jumps up, and all visualizations move with it. Then I can pan the screen down, and visualizations comfortably slide to their correct position.

  1. front and back DomLayers move together; other DomLayers are not moving.
  2. DomLayer::update_view_projection is never triggered when you press Tab, which is expected.
  3. There are no changes in the attributes of any DOM element. However, devtools show that div of the back back layer is changed somehow (it is highlighted with purple right when I press Tab, you can see it on the video)
  4. I don't see any css styles etc., that is changed, and nothing seemingly causes this position change for the div.
  5. This is not triggered on the non-default zoom level (see the second video)
  6. This is only triggered by the Tab key, Enter does not have this effect

The last point made me think it is somehow related to the changes in our events handling, with similar issues like https://github.com/enso-org/enso/issues/6290. So my idea is that the Tab key is not captured, and we somehow trigger some default browser behavior. It's not clear why the div is moving, though.

https://user-images.githubusercontent.com/6566674/233165214-c77e05a4-bb5f-4144-83f9-5894947ba10e.mp4

farmaazon commented 1 year ago

@vitvakatu but have you tested, that preventing default on every event make this bug disappear?

vitvakatu commented 1 year ago

but have you tested, that preventing default on every event make this bug disappear?

Yes, the message above was written before I tested that. It fixes the issue and seemingly has no negative effects on the IDE. I'm testing the fix at the moment.

enso-bot[bot] commented 1 year ago

Ilya Bogdanov reports a new STANDUP for today (2023-04-20):

Progress: Checked that nothing is broken after preventing default for every mouse and keyboard action. Opened a PR. It should be finished by 2023-04-20.