Closed luriusTM closed 1 week ago
The code is hard to understand, could you try to refactor or renaming functions and variables please?, or some comments on the function to understand what exactly associated popups means
The code is hard to understand, could you try to refactor or renaming functions and variables please?, or some comments on the function to understand what exactly associated popups means
Tried some comments and renames.
It is a bit hard, but all about responsibility propagation. Context menu reports that it is open. UserApplication reports that, it has opened view. Bar calculates the opened views and block the hide methodology.
One more unintended behaviour removed:
Context menu on preview items and context menu on context menu (from master):
https://github.com/user-attachments/assets/7ef5065c-30e9-470d-bb55-1eea1e09abc2
Bit hard to create a video, for something do not do something... :) (for preview items I currently just blocked to context menu, but added an empty list because it could have some item, close current and kind of, but this is not targeted to that.)
renamed the class for consistence: 'associated-view-open'
Additional minors, cause this is still open and the same category:
Finished the style rush for now... :)
newly introduced, but catched... ;)
onContextMenu={(e) => e.stopPropagation()}
is an approach that I personally don't like, but like one day I will remove all react by svelte I will let it haha.
Ok, this will be a bit hard, will make some video to understand it more clearly.
Issue: When you leave weg for a blink, it closes the weg bar in case of HideMode.Always & HideMode.On-Overlap
First: It is currently working. Side note: because in default style, we have a glitch: In this image it seems when you move to preview, it leaves the weg bar... but in the reality, the preview hops under your mouse:
If you have different style, it behaves as I described:
https://github.com/user-attachments/assets/45e5003d-9d9f-4123-b3c2-6757e2b1ac61
For this to remain open and correct logic to expand I got to wire in the associated pop-ups in the logic. This behaviour is gone with this.
For better style options I gave a possibility to style the opened item whose associatedPopup is opened. class: 'opened-associated-view'
Hereby you can style like this (Mosue is on preview item / context menu): Pre:
The "can" and "should" does not comes together; the styles I did not change for now.
Other change: Closes the preview items in case of weg item context menu. This is mostly unintended I think: