1Password mini Not in Center of Display

ununnilium
ununnilium
Community Member

According to the Agile Bits blog, 1Password mini is supposed to appear in the center of my display when triggered using Command-Option-:

https://blog.agilebits.com/2014/10/17/1password-5-for-mac-is-here/

However, mine shows up biased towards the upper-right hand corner of the screen:

This could have something to do with my multi-monitor layout:

However, it doesn't change when I quit 1Password mini, disconnect the external display, then relaunch 1Password. This non-centeredness is a pretty big eyesore. Is there any chance it could be fixed?

Comments

  • Hi @ununnilium,

    I can imagine that that would be annoying. Let's something and if they it doesn't work then we might have a bug on our hands.

    When invoked via cmd-opt-\, 1Password mini will show up either A ) In the 'center' of the display, or B ) where the user last dragged it. It's not immediately obvious to a lot of users, but you can actually drag the mini window (when it's not attached to the menu bar) to a location of your choosing and it should appear there on subsequent invocations.

    We can figure out where 1Password thinks the 'center' of your display is simply by dragging the mini window around. If you get close enough to where it thinks the center of the display is (which is supposed to be centered horizontally, and slightly above center vertically on the main display), it should automatically snap to that position. So try that out and see if it snaps in the center, or in the bizarre slightly-too-high-slightly-too-far-to-the-right position you've got pictured. If it snaps in the center, then you're all set.

    If it doesn't, and it snaps to some other position, then we've likely got a bug on our hands and we'll want to pepper you with more questions.

    I hope this helps.

    Rick

  • ununnilium
    ununnilium
    Community Member

    That appears to have put the centering behavior back. The odd thing is that the 'center' of the display where 1Password shows up is actually significantly above the position where it needs to be dragged back to to restore the centering behavior. I would classify that as a bug or at least suboptimal UI. The "snap back to centering" region should at the very least span the region in between the actual center of the display and the slightly elevated position where it appears when centered.

  • Good to see that the issue itself is resolved, @ununnilium.

    The logic for snapping back to centre is basically : "are they dragging? and close enough to the center? and dragging towards the center? ok then snap back."

    If you can actually drag it out from the snapped-center and drag it back to where it was in the center without it snapping, and need to drag somewhere else before it snaps back to where it was, then that would most definitely be a bug. That's really hard to put into words, hopefully I'm clear there. If that's what you're seeing (which I'd love to see on video), please let us know.

    Rick

  • ununnilium
    ununnilium
    Community Member
    edited November 2014

    Okay, I did a few more tests, and think I understand the behavior better. The snapping algorithm seems a bit finicky to me. For one, if the window snaps while dragging, then you keep on dragging, releasing the snap, then the cursor is almost always no longer under the same part of the window when dragging started.

    I guess I expect it to behave more or less like graphics programs (Keynote, OmniGraffle, etc.) that have manual or automatic guides. This is how I would suggest implementing it:

    Define a rectangle of cursor positions within which snapping occurs. (This would depend on where the cursor and window were at the beginning of the drag event.) If the cursor is within this rectangle, the window snaps to the center, otherwise it follows the cursor exactly. This may create a discoverability issue, where users won't realize that they can drag the window because it doesn't immediately move when they start dragging. To address this, I would add a rubber band-like effect, where the window moves immediately, but only moves half the vertical and horizontal distance (as defined by the dragging delta) from the center while the cursor is within the snapping rectangle. After leaving the rectangle, the window "snaps out" and follows the cursor exactly. Implementing it in this way would also have helped me realize when I initially dragged the window away from the centered position that there is a certain "gravity" around the center that you can drag back into if that's where you want the window to be. In this sort of implementation, I would expect "snapping in" to behave symmetrically, where it doesn't immediately go to the centered region, but is again based on half the delta of the cursor from the centered position. If the mouse was released while in the rectangle, then the window would snap to the exact center.

    Does that make sense? It doesn't seem like this should require so much code.

  • @ununnilium‌ : I agree that our window snapping could be substantially better. I agree that what we have isn't nearly as good as the apps you mentioned. You'd be surprised at how tricky implementing good snapping can be. Definitely an area that I'd love to see us do better with.

    Rick

  • ununnilium
    ununnilium
    Community Member

    Great. I did notice something else that appears to be strange. When Safari has a normal web page open Command-Option-\ opens mini centered. If it has a blank browser window, it opens under the menu item. In Chrome, it seems to always open under the menu item. In other applications, it seems to open centered. I'm not sure what the idea is behind these different behaviors.

  • @ununnilium‌ : Hrmm... that sounds like a bug to me. If I understand it correctly, cmd-opt-\ should always open it centered. I've opened a case in our bug tracker so that we can take a look at this. Thanks for reporting it.

    Rick

    ref: OPM-2562

This discussion has been closed.