Kiwi Dev Journal Day 12 - Scroll Position Details

  • Updated the nav view controllers to remove views from the DOM whenever they become invisible (instead of piling them up). This keeps the DOM as lightweight as possible, prevents needless rendering, and making traversing the DOM faster. But it also means that scroll position is lost when the user backs out. So we need to save that state a bit.
  • From past client building I learned (the hard way) that a simple save/restore of the scrollview percentage breaks down in corner cases. If the contents of the timeline change between save and restore then the restored position will be incorrect. It’s best to keep track of what the user is looking at and try hard to get that back on the screen.
  • In the last Kiwi I saved the topmost visible post. This sort of “marker” position was built in to the ADN API, which was nice. We can do the same sort of thing here, just locally to this app.

New Post button: Take 3

  • Today’s gif is my current solution for the “New Post” toolbar button. My thought on this is to make the app work in two distinct modes: a very narrow mode that feels more old-school-clent-ish, like Tweetie and Twitteriffic. And when the window is made wider it pops open a bit and becomes more email-client-esque – better for reading/posting longer form content.
  • seems to have a dual-personality of being both a long-form blogging platform and a short-post social network. Reflecting this split personality in the UI seems like a good thing – even if it means some extra work.
  • I’m not sure if this is the right approach, but it’s a fun UI/UX experiment – so I’m going to run with it for a bit.
  • Here’s what the “pop” between narrow and wide looks like. Check out the jump of the New Post button. Update: it’s a bit tough to see – the debugger covers it up with window coordinates during the resize. Oh well – it’s meant to pop over to the far corner of the window. You’ll have to use your imagination. :-P

Day 12

#dotblog #devjournal

What is this: these are random snippets from my dev journal working on a simple client app for fun. This is a non-serious side project, progresses very slowly, and will probably never see the light of day. The images may not perfectly correspond to the journal entry. In most cases I’ve added them later based on the relative time of git checkins.

isaiah @isaiah