Since Dev Diary #3, a fair amount of work has been done due to trying to get NSPopovers to work reliably with the rest of OSX. Though in its previous state it worked, the overall user experience was unacceptable due to too many unreliable behaviours stemming from trying to use a popover from a menu bar status item.
Issues with the Menu Bar Popover
A few issues that were present with the popover implementation were:
- Popover wouldn’t show when an application was full screen.
- It would activate but would stay invisible since the menubar, and the status item view, weren’t on the screen.
- Hiding the popover when needed was, at times, impossible to configure.
- There are certain OS level actions that occur with no broadcasted events. For example, activating mission control is undetectable from what I could find, and thus, the popover couldn’t be closed prior to opening Mission Control leaving the it floating awkwardly on top.
- Every possible case for when the popover should be hidden needed to be manually listened for and it’s impossible to know what events would be missed once more people started using the app on their own machines. Talk about a headache to set up.
- The custom status item view itself was oddly unresponsive, often being un-clickable.
Overall, it felt like I was fighting against OSX way more than I should have. I took a step back and reflected on what I was trying to do. The number one priority was to create a fantastic user experience with a quick and easy to use UI. The UI was easy to use but the overall experience of using the app was unreliable. Moving back to a window, which currently opens centre screen, solved so many problems without having to do any extra work at all, I wish I had made the decision earlier. Everything just immediately worked better since OSX was left in control of the basics.
Back To The Window
The main UI is now window based again using NSWindow. This is how I originally started things but, at the time, I was set on getting the UI to work within an popover. Though I’m no longer using a popover, the whole experience has been a great learning opportunity as I now fully understand why what I originally wanted is not technically feasible in a reliable manner.
Though the following screenshot looks almost identical to Dev Diary #1, the underlying code is much more solid, reliable and thought out.
Window Improvements
Improvements that were immediately noticeable after moving back to NSWindow included:
- You could bring up the input UI when using full screen applications without moving away from the full screen app.
- Window automatically hid/lost focus when interacting with other windows and when activating OS level UI like mission control.
- Overall interaction with the app was reliable. The window would show up in the same place every time, it would disappear when expected, and there was less hackish code making the application more stable for the future.
- The menubar status item can now be used for a menu removing the need to incorporate a menu button in the input UI itself.
Apple Knows Better
Really, this whole experience so far has boiled down to checking my own ambitions for a “revolutionary UI” and to trust the OS X Human Interface Guidelines. For my first application at least, use NSWindow for windows, menubar status items for menus, and step back when you find yourself just fighting against the OS to make things work.
Maybe in the future a different UI will be attempted, but for now I still need to master the basics.