Weeknotes 2026-W05 › NewsRadar: opening the drawer [01K1]

If you know me really well, you know that I am a huge fan of the defunct NSDrawer control from Mac OS X.

The venerable OmniWeb web browser used to keep open tabs in a drawer.

Drawers are kind of like sidebars except that they come up from behind the window and extend outward from the window rather than inward into the window’s space. This has a lot of advantages, not least being the fact that when you open a drawer, it doesn't suddenly shrink the content area of your window (which is what happens whenever you unhide a sidebar). Not all sidebars should be drawers, but many of them should.

The NSDrawer API still exists, but it is deprecated, buggy, and hideously styled in today’s macOS. Rather than attempt to use it, I have started writing my own from scratch, naturally hosted on the Lab’s own Tangled knot. One of my first test cases for the drawer is the feed subscription editor from NewsRadar’s feed organiser.

NewsRadar’s feed subscription editor as a drawer.

The behaviour of the drawer is not yet perfected, but a lot of the expected things are there. I have tried to style it in a way that looks tasteful today, but maintains the depth and dimensionality of the pre-Leopard drawers of Mac OS X. It was very painful to draw a custom resizing border and make this behave properly with respect to mouse actions, etc., but that is all working beautifully now.

One of the benefits of writing it from scratch is that the old NSDrawer does not take advantage of useful things like child windows and the window controller API, etc. Much of the behaviour of NSDrawer can be implemented in a simpler way if we are not aiming for perfect API fidelity. I’ve vendored my experimental code directly into NewsRadar, so the linked repository is not fully up to date with all my improvements. At some point I will re-extract it once everything is working in the way I want it to.