Skip to content
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

Change Neko sleeping place #2

Open
kernelb00t opened this issue Jul 5, 2023 · 1 comment
Open

Change Neko sleeping place #2

kernelb00t opened this issue Jul 5, 2023 · 1 comment

Comments

@kernelb00t
Copy link

Hi! I love this extension!
I noticed a small bug : when neko sleeps on the progress bar, and a menu is opened, neko is rendered on top of all things, including the menu.
This is a little bit weird, as she should be sleeping on the progress bar. I consider 2 different fixes :

  1. Make a system that recognizes that a menu is opened, therefore making neko have a z-axis just under the menu, making her wake up and run to the volume bar, then back to sleep. Doing so, we should be able to play with her without having to close the menu, and make her back to sleep again.
  2. If this is not possible/too hard, if a special z-axis could be found / just deplacing her permanently to the volume bar could fix this.

If this is of any help

@kyrie25
Copy link
Owner

kyrie25 commented Jul 6, 2023

The implementation of Spicetify and Spotify on a popup modal is vastly different from one another and on different parts of the DOM tree (can't use MutationObserver), therefore I can't exactly "detect" if a modal is opened without causing performance issues of recursively trying to find the menu even when it's not opened.

AFAIK there's no way to "get" the z-axis of an element in JavaScript, you can only declare them using z-index in CSS and let the client handles all the rendering. Even the x-axis and y-axis requires you to get from a known & specific named element and compare them to another specific element, you can't "check" for any other element overlapping the volume bar/Oneko otherwise.

What I can do is that I can force the popup modal to render on top of Oneko or have Oneko's priority lower on the z-index list. Is that satisfactory to you?

Note that I do intend to keep this extension as simple as possible, the same as the concept of Oneko, so if it is overly engineered I won't be able to accept it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants