micheleg / dash-to-dock

A dock for the Gnome Shell. This extension moves the dash out of the overview transforming it in a dock for an easier launching of applications and a faster switching between windows and desktops.
https://micheleg.github.io/dash-to-dock/
GNU General Public License v2.0
3.82k stars 463 forks source link

Update for Gnome Shell 46 #2146

Closed sergio-costas closed 3 months ago

sergio-costas commented 4 months ago

add_actor() has been removed after being deprecated, and it must be replaced with add_child(). Also, there are two add methods that also have to be changed.

Tested in Gnome 46 alpha, in a Fedora RawHide system. I also tested it in Gnome 45, but doesn't work, so it must be only 46.

sergio-costas commented 4 months ago

In fact, using this patch in Gnome Shell 45 results in a tiny, empty dock, and a lot of messages in journal like this one:

Can't update stage views actor <unnamed>[<XXXXXXX>:0xYYYYYYYY] is on because it needs an allocation.
ryzendew commented 4 months ago

issues to report

image With shrink the dash icons pop up over the dock line

and without image icons are too far up

image when transparent icons have weird circles

sergio-costas commented 4 months ago

@RyzenDew Are you using Gnome 45 or Gnome 46?

sergio-costas commented 4 months ago

Ok, there are some extra problems:

JS ERROR: TypeError: (intermediate value).cairo_set_source_color is not a function
_drawIndicator@file:///home/raster/.local/share/gnome-shell/extensions/ubuntu-dock@ubuntu.com/appIconIndicators.js:411:17

For some reason, it can't find that function. Also

Error: No signal 'actor-added' on object 'MetaWindowGroup'

Stack trace:
  _create@file:///home/raster/.local/share/gnome-shell/extensions/ubuntu-dock@ubuntu.com/utils.js:172:30

Error: No signal 'actor-removed' on object 'MetaWindowGroup'

Stack trace:
  _create@file:///home/raster/.local/share/gnome-shell/extensions/ubuntu-dock@ubuntu.com/utils.js:172:30

I'll try to fix them...

sergio-costas commented 4 months ago

More things to fix:

The GObject property St.ScrollView.hscroll is deprecated.
0 ensureActorVisibleInScrollView() ["file:///home/raster/.local/share/gnome-shell/extensions/ubuntu-dock@ubuntu.com/dash.js":1113:38]
sergio-costas commented 4 months ago

Fixed the cairo_set_source_color bug.

sergio-costas commented 4 months ago

And fixed the signal problem.

sergio-costas commented 4 months ago

@RyzenDew I'm unable to reproduce those errors. Can you try again with the new changes that I added, just in case?

ryzendew commented 4 months ago

@RyzenDew Are you using Gnome 45 or Gnome 46?

46 beta

ryzendew commented 4 months ago

also no change with the newest change

rastersoft commented 4 months ago

@RyzenDew Can you tell me your dock configuration? (icon size...)

ryzendew commented 4 months ago

this needs to be rebased on the beta cause the alpha is 1 month old and the beta has a few changes

sergio-costas commented 4 months ago

There are still several bugs in Gnome 46 beta:

sergio-costas commented 4 months ago

The "push to show" option fails because the data sent from Gnome Shell is... odd... I don't know if it's a problem from Gnome Shell itself and its PressureBarriers, or is a problem due to being using VirtualBox. The problem is that, once the mouse cursor is at the screen border, it doesn't matter how hard you move it against the border, the distance indicated by the barrier is always 0.765625, so unless you achieve the required pressure in the first "push", the dock won't appear.

sergio-costas commented 4 months ago

I've been able to fix the Overview problem in Gnome 46. It was because maybeAdjustBoxSize() and maybeAdjustBoxToDock() were being called with this.spacing as the last parameter, but that property isn't defined anywhere, so the received value was undefined, and this broke the allocation values (it put NaN in several places).

I just added a check to set it to zero if the value is undefined, but maybe it is possible to just fully remove the parameter itself, because it seems to be used only when calling those two methods, and I can't find neither other places where those methods are called, nor other places where the property is set. @3v1n0 What do you think?

sergio-costas commented 4 months ago

I decided to convert this into a draft to avoid merges until it is fully finished.

sergio-costas commented 4 months ago

Ok, it is ready for reviewing.

ryzendew commented 4 months ago

Great work but you missed the show apps icon it's still has black around it

sergio-costas commented 4 months ago

Great work but you missed the show apps icon it's still has black around it

Ops!!! Fixed.

3v1n0 commented 4 months ago

Ah, for your info, I've landed this to ubuntu yesterday, so also consider the fixups I did at https://github.com/micheleg/dash-to-dock/tree/ubuntu-dock

jbicha commented 4 months ago

In case you weren't already aware, I'm missing the indicator next to running apps in the Ubuntu Dock. This is with 89ubuntu1 that is now in Ubuntu 24.04 LTS. And I'm using GNOME Shell 46~beta-0ubuntu2 and I'm still using the same Yaru theme as Ubuntu 23.10.

rastersoft commented 4 months ago

@jbicha I don't understand... Can you put me a screen capture?

muhammad-ans commented 4 months ago

There is also this weird square around app icons in overview when it is installed. image

jbicha commented 4 months ago

Here's a a screenshot from Ubuntu 23.10 showing expected behavior. There is a circle showing that I have a single window of my file browser running and a circle showing that the Welcome to Ubuntu app is running. The file browser is highlighted to show that it is the active focused window. Neither the dots nor the highlight are showing in my Ubuntu 24.04 LTS.

image

jbicha commented 4 months ago

@muhammad-ans From your screenshot, it looks like you are using Fedora.

muhammad-ans commented 4 months ago

@muhammad-ans From your screenshot, it looks like you are using Fedora.

* What version of Fedora?

* What version of gnome-shell?

* Are you using the default Adwaita themes or something else?

I am using fedora silverblue 40 (pre release). Gnome shell version is gnome-shell-46~beta-6 Theme is default adwaita.

rastersoft commented 4 months ago

@jbicha Oh... I see... I did my tests in Fedora Rawhide, not in Ubuntu 24.04, and there it works fine. This monday I'll check it in an Ubuntu 24.04.

sergio-costas commented 4 months ago

@jbicha I installed it in a fresh 24.04 system, and it works nearly flawlessly... the only problem is the number of dots when there are several applications.

imagen

sergio-costas commented 4 months ago

@jbicha Ok, using the builtin theme, it works...

imagen

sergio-costas commented 4 months ago

@jbicha Are you using make clean && make && make install to install the extension?

sergio-costas commented 4 months ago

Mmm... but changing from "Default" to any other style, the dots do work...

imagen

sergio-costas commented 4 months ago

Ok, the "one dot" detail already happens in the official ubuntu-dock package in Gnome 45, so it's not a bug.

jbicha commented 4 months ago

@sergio-costas What version of GNOME Shell are you using? I'm using GNOME Shell 46 Beta from my team's PPA. I'm using gnome-shell-extension-ubuntu-dock 89ubuntu1

sergio-costas commented 4 months ago

@jbicha Oh, ok... Although settings says "Gnome 46", the package is 45.3. I'll install the PPA.

sergio-costas commented 4 months ago

Ok, now I installed it and you are right: the theme isn't being applied...

jbicha commented 4 months ago

Yes, I can confirm that the Ubuntu Dock theming works much better for me if I use the GNOME session instead of Ubuntu. @3v1n0 Do you want me to open a Yaru issue for this? Are you able to do a Yaru theme update for Ubuntu 24.04 LTS this week?

3v1n0 commented 3 months ago

Looks good, please before we can merge rebase the branch so that

  1. each commit passes eslint check
  2. We have no commits fixing a previous commit (so squash those doing that)
  3. Ideally we don't remove the 45 support and then add it back
  4. Still keep commits separated to help history
sergio-costas commented 3 months ago

@3v1n0 Check if the rebase is correct, please.

vanvugt commented 3 months ago

This needs rebasing again because eb25d700836dd247c01600df00ca5332c9a032e0 and below it have different commit IDs to that of master. Which also means Github is asking us to review changes that already exist on master.

karuboniru commented 3 months ago

Hi, I am getting the strange highlight box around the application icon in the application page. image

I am running somewhat modified Fedora Silverblue 40, [^1], with gnome-shell-46~rc-1.fc40.x86_64 and default theme.

[^1]: The "modification" is unrelated to UI, justing some additional packages.

garrett commented 3 months ago

Thanks for the extension and also for the work in progress of porting it to GNOME Shell 46!

I also see the app icon issue on basically stock Fedora Silverblue 40 beta, testing branch (fedora:fedora/40/x86_64/testing/silverblue, version 40.20240314.0 (2024-03-14T00:39:44Z), basecommit b1c8abe190ad8f2d4e1df48d18898dc8003c76517e443ca5fd9381e3773fdcd7).

I had assumed that this was a bug in GNOME and didn't even consider it could be this PR of dash to dock. Disabling dash to dock fixes the issue, so my completely wild guess is that it's probably something adjusting the style of the apps, but across all of shell instead of being restricted to just the dock app icons.

Without dash to dock:

image

With dash to dock, specifically this PR, in GNOME 46 RC:

image

It's more than just the app icons; it's also affecting the horizontal and vertical spacing too.


I also see the running dot issue, mentioned above, but I think it's a known issue already. Here's a screenshot (from Fedora, just for reference, as the above ones are in Ubuntu):

image

sergio-costas commented 3 months ago

@karuboniru @garrett It should be fixed now. Thanks for testing it!

vanvugt commented 3 months ago

If you're using >100% scale then there's also an upstream fix coming for the dots: https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3245

vanvugt commented 3 months ago

The dots are still misplaced (in GNOME 46 only?):

Screenshot from 2024-03-19 15-42-55

sergio-costas commented 3 months ago

@vanvugt But, if I get it right, the patch for the dot problem is for Gnome Shell itself...

DScalpel commented 3 months ago

Hi, Thanks for the extension update. I have one bug to report.

The Customize the dash color seems to leave weird artifacts around each icon with brown color.

I am using Arch linux gnome unstable repo.

Screenshot from 2024-03-19 20-58-24

sergio-costas commented 3 months ago

@DScalpel I can't reproduce your bug... Did you update to the last version of THIS branch?

bam80 commented 3 months ago

Thanks for the extension update.

It wasn't updated yet, right? I see no new releases.

DScalpel commented 3 months ago

@DScalpel I can't reproduce your bug... Did you update to the last version of THIS branch? @sergio-costas Hi, Sorry for bad bug report.

Can confirm it is working fine.

Screenshot from 2024-03-20 06-30-20

Calosis commented 3 months ago

The dots are still misplaced (in GNOME 46 only?):

Screenshot from 2024-03-19 15-42-55

Can confirm, I'm hitting this bug currently.