jordanbaird / Ice

Powerful menu bar manager for macOS

Home Page:https://icemenubar.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug]: Dato menu loads in far left corner instead of being anchored to icon in far right corner

autonome opened this issue · comments

Check existing issues

  • I have checked existing issues and believe that my issue is not a duplicate

Description

The menu loads on the far left, but should load on the far right.

Steps to Reproduce

  1. Install Dato: https://sindresorhus.com/dato
  2. Open the Dato menu

Ice Version

0.9.0

macOS Version

14.5

Screenshots

CleanShot 2024-06-19 at 17 31 14@2x

I have this too. Same OS, same app (although I am using the Setapp version)

Running 0.10b5 now, and still having the issue where "new" icons (not really new, just re-appearing ones that I've moved out from the "always-hidden" section before) are being placed at the end of the line and thus not visible when I need them to be.

It also affects menubar icons that are added by Hammerspoon, of which I have several that appear and disappear depending on various things happening on my Mac.

I was wondering if there was a hidden setting to control this behavior somewhere that I'm not seeing in the UI?

I see that some of the other related issues around this are now closed, so I'm hopeful there are still some more changes coming... probably #6 is the correct one to follow?

I'll link these here just for reference:

@luckman212 #6 would be the correct one to follow, yes. That and #26, which will enable Ice to remember the locations of existing items.

Is this problem unique to Dato.app? I have other menubar items e.g. DatWeatherDoe whose text also changes periodically, yet their position remains correct. For some reason, Dato constantly "jumps" to the back of the line. Is there a reason to ask @sindresorhus if he's doing something unorthodox that would cause this behavior?

@luckman212 Does Dato dynamically create its item(s) during runtime? As in, it might add and remove them while it's still running? If so, I think it's following the default behavior, which deletes the item's stored position when the it is removed. I had to manually work around it with Ice by caching the position before removing the item and storing it again afterward.

Yes, it definitely adds/removes elements during its lifetime. It displays upcoming calendar events so is constantly changing. It's not open source so I am not sure what methods are being used, but I will say, when Ice is not running, Dato's menubar position stays intact.

I just installed 0.10.1 and after the dialog appeared telling me it had to trash my prefs due to corruption, it seems the Dato menuitem is staying where I put it now! I didn't see this mentioned in the release notes anywhere but—has something changed here that might have caused this to be fixed? Or was it the recreation of the prefs you think?

Strangely, now my "WiFi" icon seems to be suffering from the same problem- it keeps disappearing and getting moved to the hidden section, even after dragging it back.

edit: Dato is misbehaving again.

@luckman212 Hmm...I can't think of any reason why it would be working now when it wasn't before. Strange that your WiFi icon is doing this. Is it the standard macOS WiFi icon, or do you use a third party app?

Just the standard WiFi icon. I quit Ice and relaunched it, and so far it's working again. Maybe a fluke. Where does Ice store its preferences for the icon ordering? (just in case I want to manually trash it again) I glanced over the source but couldn't spot it.

edit: I just checked and the behavior is back to the way it was before (Dato always appearing at the far left end in the Hidden section).

For anyone having this problem, I found a temporary workaround inside Dato itself:

If you go to Dato's Settings → Events and click Customize, and then scroll all the way down, there is a toggle called Show menu bar item even when there are no upcoming events:


If enabled, a small "diamond" appears as a placeholder. This seems to allow Ice and/or macOS to preserve the menuitem ordering for the Dato meeting reminders.