-
Notifications
You must be signed in to change notification settings - Fork 11
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
Hide the extension's panel when nothing is playing #57
Comments
First of all, were you hovering the pointer over the blob in that screenshot? |
yes I was. I removed all padding in the extension settings so that the "blob" is as small as possible. And when there are more panels, it creates a gap between those items. |
Yes, hiding that blob is something I've been wanting to do since the release of GNOME 40 but never tried! I will keep it on the top of the |
haha take your time... |
Gnome 40 introduced sizable padding which has been driving me nuts (culminating in #16) but as long as the extension is not between other icons, it's not noticeable. I guess we are already removing the container and putting it back in when relocating the extension so we already have the building blocks within One thing to consider however is that having the |
I see in Aylur's Widgets extension they can do it but it makes lag. I hope you can take a look at it. |
Yes, It uses the same functions I was thinking of, I think the lag comes from spawning the panel media buttons, we have the same problem in #39 |
for what it's worth, i found out that if we include This means that when the label is in "hide when paused" mode, there is virtually no way to tell it's there. Right click will still work so the menu can still be accessed. All in all, it makes the extension integrated like info in the panel rather than a button but perhaps makes it less obvious that there are functionalities accessible on click. Alternatively, it would probably be possible to set the border to 0 when pause and then back to 1px when the label is showing some text. |
I think instead of that, straight up hiding/showing the panel icon would be better if possible. |
Yeah, it's a bit of a hack. I just wanted to put it out there as I stumbled upon this behaviour while working on another PR and there seemed to be some lags discussed above when using show/hide. |
Just tried a commit in my test branch (0fa1848) which uses the event based system in #60 (note this hasn't been implemented there yet), and there doesnt seem to be any issues with lag... Also I think the solution could be refactored to make the code more efficient. |
Added in #69 by @abisammy on the It will take a while until is merged to Addressing the lag concerns, edit: It's not noticeable slower except with shortwave, that's expected. |
The current version of the extension (v18) hides the extension when there's no (non-filtered) player available. Not quite "when nothing is playing" but I surely think it's better than always having the widget on the panel. |
issue closed? |
Is it still showing when you don't have any players open? Do you have any player listed in the menu when you click? It should go away when there is no active player. btw, is the extension working well with muzika? I haven't tried it yet but I'm hearing good things about it. |
It seems the extension hides the icon when nothing is playing. However when I play music and pause, the panel is hidden (because of the "Hide when paused") but I can still hover over the icon like in the case above.
yes. the extension works well with muzika :) thanks for working on this extension.
hmm I didn't know it was that famous. thank you :) |
I added a rule to also hide the widget if there's just one player and isn't active, then I realized it would prevent the use of the player controls. Going further than that, like hiding the widget when there's multiple players but no active one would start to conflict with the ability of selecting between sources, another tradeoff. I think the first should be added to the 'Hide when paused' option, but then again it conflicts with some functionality. |
If we want to implement this fully, I'm thinking that the best solution might be to have separate options altogether:
I would personally use the first one but not the second one as I still want to be able to click to play/pause, open app, access menu,... and would recommend to have these settings turned off as default to avoid confusion with the label/extension disappearing on users. Hiding the label only makes sense if Hiding the extension is off obviously so these two options would need to be linked. One case to consider is with users manually setting the active player. There could be a situation there the selected player is paused but a second source is playing. Do we hide or show the extension in this case? If we hide it, it becomes impossible to switch back to the active one... |
I agree that it's better to leave the choice to the user, but how to clearly present such a choice to the user is challenging. And it will have to use the placeholder button logic or similar to prevent a selection soft-lock. the blob (and the placeholder button) will inevitably need to appear sometimes. |
Rather than a double switch, we could also have a dropdown for "Hide when paused" to select between off/hide text/hide extension. But again, do we want to hide the extension when the "active" source is stopped but there is another one potentially playing? @vixalien since you don't consider that the extension currently does what you want, what is the scenario where you see the blob but shouldn't? Is it because music is playing in another source? |
it should just be completely hidden. I don't want the blob at all |
Yes but in which situation do you see this blob? Currently, if you have only one source active and it's not playing music, the blob should be hidden. Are you seeing it because you are:
|
The blob appears when I play music and pause for a bit. the label disappears but there is still empty space in the panel. |
I'm trying to establish if this is a bug as this blob shouldn't appear unless you have multiple mpris sources opened. When this happens, what do you get if you run |
This is not a bug, the blob is hidden only if there's no non-filtered players available. Checkout 8aecf95. |
I added this behaviour (didn't commit/push anything) and realized it conflicts with the player controls. I think this should be added to the extension but I don't think it should be forced to the user. Going further than that wouldn't achieve too much because the ability of selecting between sources needs to be preserved. I already mentioned all of this, more details above. |
That's the point I am trying to make. I have the feeling that there is another mpris source preventing it from being hidden. I think that the solution in this case is for @vixalien to filter the source which is causing the blob not to disappear. The only other explanation would be that it's not hiding when it normally should which is unlikely. |
Here is a screen record to prove that I only have one source. The blob is there without the playing title controls when I pause the playback. Screencast.from.2023-10-26.23-06-11.webm |
Apologies as I was mistaken. I misread and thought that the extension was meant to be hidden when there was only 1 player and it's paused. As it turns out, it only hides if there are no players listed. I am leaning towards a solution where we have a separate option called "Hide extension when Paused" underneath the existing one. Either that or we can have a drop down with "When Paused" and then a drop down to select between:
The drop down solution kind of makes sense and it wouldn't be logical to hide the extension without hiding the label... |
I lean towards a separate option too. Combining the options would require an explanation and I don't imagine how we can word it in a non-confusing way. |
see PR #87 , let me know if that does what you want as I had to make some assumptions. |
Yes, assumptions. Is not a good thing to say, ultimately all should rest with the user but giving choice of such an inconsequential thing isn't worth it. I might push something on the next few days to address this, but it will most likely not make it to an update. I'm too undecided about this. |
I'm working (slowly I should add) on a solution for this. At last I decided to implement similar behaviour or maybe the same as in #87. I left room for a less aggressive solution, or an even more aggressive one. I'm also refactoring code. Writing this just for info, I don't know when I'll have something to show. |
Currently, a small blob appears when nothing is playing. Would be cool to hide the extension completely when nothing is playing... like the Removable media extension.
The text was updated successfully, but these errors were encountered: