destroytoday.com

Multiple timelines

These past two weeks, I’ve been heads-down, working on an incredibly important feature for Cushion—support for multiple timelines. This feature was not only complex, but also time-sensitive, as beta users were already starting to plan for the next year. In building Cushion, I’ve been actively holding back on specific features that aren’t as prevalent as others. Sometimes these once-dormant features demand your attention much earlier than expected, resulting in a more stressful sprint to finish. This is why we have betas.

Multiple timelines is one feature I’ve especially been pushing off because of its complexity as well as its never-ending knot of decisions. I knew it would be tough from the start, but I didn’t think it would be this bad. The high-level issues I needed to tackle consisted of establishing a way to navigate between timelines and filtering the data to the selected timeline. This sounds pretty simple until you realize a few scenarios that make it anything but simple, like projects spanning multiple timelines. The deeper I descended into the depths of the feature, the more troubling scenarios I discovered.

Instead of just glossing over them with a summary, I’d like to highlight as many as I can remember, including both the scenario and my solution.

2014-11-11-project-span-all

Scenario: A project spans multiple timelines. Solution: Include project in all timelines it spans.


2014-11-11-project-around

Scenario: A project starts before and finishes after a specific timeline. Solution: Include project in that timeline.


2014-11-11-project-ongoing-estimated-finish

Scenario: A project is ongoing with an estimated finish date. Solution: Include project in all timelines it spans, using the maximum of the current date and its estimated finish date as the end.


2014-11-11-project-no-end-in-sight

Scenario: A project is ongoing with no estimated finish date. Solution: Include project in all timelines it spans as well as all timelines beyond the current date.


2014-11-11-project-no-dates

Scenario: A project has no estimated or actual start or finish dates. Solution: Include project in timeline containing the current date.


2014-11-11-project-with-invoice

Scenario: A project finished in one timeline, but has an invoice in another timeline. Solution: Include project in both timelines.


2014-11-11-invoice-issued-before-today

Scenario: An unpaid invoice issued before current date timeline. Solution: Include invoice only in current date timeline.


2014-11-11-invoice-issued-in-future

Scenario: An unpaid invoice issued after current date timeline. Solution: Include invoice only in timeline containing issue date.


2014-11-11-invoice-paid-before-today

Scenario: A paid invoice issued in a previous timeline. Solution: Include invoice only in timeline containing paid date.


2014-11-11-estimate-ongoing-no-estimated-finish

Scenario: The estimate of an ongoing project with no estimated finish date. Solution: Include estimate in timeline containing current date and all future timelines.


2014-11-11-estimate-today-and-future

Scenario: The estimate of a project spanning multiple timelines. Solution: Include estimate in timeline containing current date and any future timeline containing project.


2014-11-11-estimate-no-dates

Scenario: The estimate of a project with no dates. Solution: Include estimate in timeline containing current date.


Phew. Now that we got those out of the way, the remaining problem exists in navigating these timelines. I wanted it to be dead-simple to switch between them. You should be able to quickly glance several years in the past and return to the current timeline just as easily. For months, I thought of reusing the current timeline tab for more than just indicating the current timeline. I even had dreams of the interaction—I just wondered if it would actually work out as planned.

2014-11-11-timeline-switch

Luckily, it did. When you’re not in the scheduling or budgeting view, the current timeline tab simply navigates to your default view. Then, if you hover it, a down arrow appears below it, prompting another click that expands the timeline menu. From there, you can select a different timeline and quickly navigate to it. To switch back, simply use the menu again to select the current timeline.

Selecing a timeline appends a parameter to the URL, indicating the timeline ID, which then grabs both the date range for the scheduling view and the financial goals for the budgeting view. Without the parameter, Cushion uses the default timeline, which can be set in the Timelines page. Typically, this will be the timeline that contains the current date.

As you could imagine, this was a whirlwind feature to finish, and after two weeks, I’m so relieved to be able to check it off the list. Now that it’s finished, I plan to send out even more invites for the paid beta. If you’re interested, tweet me with your email address.