roadmap gtg?

This commit is contained in:
Jeremy Kauffman 2016-10-06 18:46:29 -04:00
parent 06b20f3753
commit 5af86a3f99
4 changed files with 27 additions and 98 deletions

View file

@ -63,29 +63,29 @@ class Asana
$groupCategories = ['ongoing', 'upcoming'];
$tasks = [];
foreach($projects as $projectId => $projectTuple)
$tags = [
192699565737944 => 'Ongoing',
192699565737946 => 'Upcoming',
192699565737948 => 'Future'
];
foreach($tags as $tagId => $tagLabel)
{
list($projectName, $projectUrl) = $projectTuple;
$projectTasks = static::get('/tasks', ['completed_since' => 'now', 'project' => $projectId], $cache);
$group = null;
foreach ($projectTasks as $task)
$taggedTasks = static::get('/tags/' . $tagId . '/tasks', ['completed_since' => 'now'], $cache);
foreach ($taggedTasks as $task)
{
if (mb_substr($task['name'], -1) === ':') //if task ends with ":", it is a category heading so switch the active key
$fullTask = static::get('/tasks/' . $task['id']);
$projectId = $fullTask['memberships'][0]['project']['id'] ?? null;
if ($fullTask['name'] && $projectId && isset($projects[$projectId]))
{
$group = array_reduce($groupCategories, function($carry, $candidate) use($task) {
return $carry ?: (strcasecmp($task['name'], $candidate . ':') === 0 ? $candidate : null);
});
}
elseif ($group && $task['name'])
{
$fullTask = static::get('/tasks/' . $task['id']);
$tasks[$group][] = array_intersect_key($fullTask, ['name' => null]) + [
list($projectName, $projectUrl) = $projects[$projectId];
$tasks[$tagLabel][] = array_intersect_key($fullTask, ['name' => null]) + [
'project_label' => $projectName,
'badge' => $projectName,
'date' => $fullTask['due_on'] ?? null,
'body' => $fullTask['notes'],
'url' => $projectUrl,
'group' => $group,
'group' => $tagLabel,
'assignee' => $fullTask['assignee'] ? ucwords($fullTask['assignee']['name']) : ''
];
}

View file

@ -42,10 +42,7 @@ class Github
$allReleases = [];
$projects = [
'lbry' => 'LBRY Data Network',
'lbry-web-ui' => 'LBRY Browser',
'lbrycrdd' => 'LBRY Blockchain',
'lbryum' => 'LBRY Wallet'
'lbry' => ''
];
foreach($projects as $project => $label)

View file

@ -22,7 +22,7 @@
<?php $isOpen = !isset($lastItem['project']) || !isset($lastItem['version']) || $lastItem['version'] === $projectMaxVersions[$lastItem['project']] ?>
<h2 class="roadmap-group-title" <?php echo !$isOpen ? 'style="display: none"' : '' ?>">
<span class="roadmap-group-title-label">
<?php echo $group ?>
<?php echo $group ?> <?php echo isset($lastItem['version']) && $lastItem['version'] === $projectMaxVersions[$lastItem['project']] ? '(latest )' : '' ?>
</span>
</h2>
<div class="roadmap-group <?php echo !$isOpen ? 'roadmap-group-closed' : '' ?>">
@ -50,7 +50,7 @@
<?php echo $item['name'] ?>
</h3>
<div class="roadmap-item-date">
<?php echo $item['date'] ?>
<?php echo $item['date'] ? date('m-d-Y', strtotime($item['date'])) : '' ?>
</div>
<div class="roadmap-item-content">
<?php echo $item['body'] ?: '<em class="no-results">No description</em>' ?>
@ -65,75 +65,4 @@
</div>
</div>
</main>
<?php echo View::render('nav/_footer') ?>
<?php /*
<div class="content content-light spacer2">
<section class="spacer2">
<h2>Recent Changes</h2>
<table class="content full-table" id="changeset-table">
<?php $setCount = 0 ?>
<thead>
<th>Release</th>
<th>Date</th>
<th>Notes</th>
</thead>
<?php foreach($changesets as $version => $changeset): ?>
<tr <?php echo ++$setCount > 5 ? 'style="display: none"' : '' ?>>
<th style="width: 15%">
<?php echo $version ?>
<?php if ($changeset['prerelease']): ?>
<span class="badge badge-info">prerelease</span>
<?php endif ?>
</th>
<td style="width: 15%" class="center"><?php echo $changeset['published_at'] ?></td>
<td><?php echo $changeset['body'] ?></td>
</tr>
<?php if ($version == 'v0.2.2'): ?>
<tr style="display: none">
<th>v0.1-v0.2.2</th>
<td></td>
<td>These releases were not tagged and noted properly. We were too busy creating awesome!</td>
</tr>
<?php endif ?>
<?php endforeach ?>
</table>
<a href="javascript:;" class="link-primary" id="show-all-changesets">show all changes</a>
<?php js_start() ?>
$('#show-all-changesets').click(function() {
$(this).hide();
$('#changeset-table').find('tr').show();
});
<?php js_end() ?>
</section>
<section class="spacer2">
<h2>Upcoming Changes</h2>
<table class="content full-table">
<thead>
<th>Item</th>
<th>Date</th>
<th>Component</th>
<th>Owner</th>
</thead>
<?php foreach($items as $task): ?>
<tr>
<td><?php echo $task['name'] ?></td>
<td style="width: 15%"><?php echo $task['due_on'] ?></td>
<td style="width: 20%">
<?php if ($task['url']): ?>
<a href="<?php echo $task['url'] ?>" class="link-primary"><?php echo $task['project'] ?></a>
<?php else: ?>
<?php echo $task['project'] ?>
<?php endif ?>
</td>
<td style="width: 20%">
<?php echo $task['assignee'] ?: '<em>unassigned</em>' ?>
</td>
</tr>
<?php endforeach ?>
</table>
</section>
</div>
</main>
*/ ?>
<?php echo View::render('nav/_footer') ?>

View file

@ -41,6 +41,8 @@ $radius-roadmap: 10px;
display: none;
}
$title-spur: 8 * $width-roadmap;
.roadmap-group-title
{
&:before
@ -51,11 +53,11 @@ $radius-roadmap: 10px;
height: $width-roadmap;
margin-right: 10px;
vertical-align: middle;
width: 8 * $width-roadmap;
width: $title-spur;
}
cursor: pointer;
font-weight: 400;
margin: $spacing-vertical * 1.5 0 $spacing-vertical * 1.5 0;
margin: $spacing-vertical * 2 0 $spacing-vertical * 1 0;
padding: 0;
}
@ -68,18 +70,19 @@ $radius-roadmap: 10px;
letter-spacing: 0;
padding: 0 10px;
text-align: center;
width: calc(100% - #{$title-spur} - 20px);
}
.roadmap-item
{
$left-margin: 20px;
$item-padding: 10px;
$item-padding: $spacing-vertical / 2;
margin-bottom: $spacing-vertical;
position: relative;
margin-left: $left-margin;
position: relative;
padding: $item-padding;
background: #e8e8e8;
background: #f2f2f2;
@include border-radius($radius-roadmap);
&:before {
border-top: $width-roadmap-item solid $color-roadmap-border;
@ -100,7 +103,7 @@ $radius-roadmap: 10px;
position: absolute;
top: 0;
left: -1 * $width-date;
color: $color-meta-lighter;
color: $color-meta-light;
line-height: 42px;
}