integrations icon indicating copy to clipboard operation
integrations copied to clipboard

spotlight position error after switching layout

Open LoTwT opened this issue 11 months ago • 2 comments

description

The spotlight remains in the previous position after switching the layout.

reproduction link is the document.

https://github.com/user-attachments/assets/b740ee11-b843-44df-a261-da0ca6338bc6

LoTwT avatar Feb 22 '25 09:02 LoTwT

Working as intended. The position of the spotlight was calculated all based on event listening on the hovered element instead of altering the actual hovering element (might somehow break the documentation included custom components or elements).

Therefore, only the next time it tracks the movement of the cursor within the region of the doc body, it will be able to update the width, height, position of itself.

But perhaps this was limited by my short knowledge on how to add embed UI elements to un-controlled DOM tree, if you have any better idea to improve this, PRs are welcome.

nekomeowww avatar Feb 22 '25 13:02 nekomeowww

I think it may be more about the UX.

One situation is that things that could be seen before will go outside the screen when other layouts switch to Expand All. After fixing this issue, we still need to decide whether things should be scrolled into the view.

A unified and acceptable interaction is needed.

LoTwT avatar Feb 23 '25 07:02 LoTwT