From 32c160081873f47d67c47ebf9e31fa4e1482c83b Mon Sep 17 00:00:00 2001 From: Dan Hersam Date: Fri, 30 Oct 2015 12:43:31 -0400 Subject: [PATCH 01/22] Display content for job items. I'd like a cleaner way to toggle the 'No comments yet' message, but I don't know how (or if it's possible) to access Item.isJob() from ItemView. --- src/components/Item.vue | 9 +++++++++ src/components/ItemView.vue | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/components/Item.vue b/src/components/Item.vue index 215130e..a2d4173 100644 --- a/src/components/Item.vue +++ b/src/components/Item.vue @@ -17,6 +17,7 @@ | {{item.descendants}} {{item.descendants | pluralize 'comment'}}

+

@@ -39,6 +40,9 @@ export default { }, showDomain () { return this.item.type === 'story' + }, + isJob () { + return this.item.type === 'job' } } } @@ -69,4 +73,9 @@ export default { color $gray .subtext a:hover text-decoration underline + .jobtext + color $gray + padding-top 5px + .jobtext p + margin 10px 0 diff --git a/src/components/ItemView.vue b/src/components/ItemView.vue index d9d889a..902fc79 100644 --- a/src/components/ItemView.vue +++ b/src/components/ItemView.vue @@ -13,7 +13,7 @@ :comment="comment"> -

No comments yet.

+

No comments yet.

From 4c48b64feb2bf26adb6e68aaaa7fc831db4e6d3b Mon Sep 17 00:00:00 2001 From: Dan Hersam Date: Fri, 30 Oct 2015 13:18:45 -0400 Subject: [PATCH 02/22] Show job text in ItemView rather than Item. I think this makes it cleaner, and job text isn't shown in the NewsView. Also, using v-if rather than v-show since item type won't change at runtime. --- src/components/Item.vue | 9 --------- src/components/ItemView.vue | 14 +++++++++++++- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/src/components/Item.vue b/src/components/Item.vue index a2d4173..215130e 100644 --- a/src/components/Item.vue +++ b/src/components/Item.vue @@ -17,7 +17,6 @@ | {{item.descendants}} {{item.descendants | pluralize 'comment'}}

-

@@ -40,9 +39,6 @@ export default { }, showDomain () { return this.item.type === 'story' - }, - isJob () { - return this.item.type === 'job' } } } @@ -73,9 +69,4 @@ export default { color $gray .subtext a:hover text-decoration underline - .jobtext - color $gray - padding-top 5px - .jobtext p - margin 10px 0 diff --git a/src/components/ItemView.vue b/src/components/ItemView.vue index 902fc79..66876b6 100644 --- a/src/components/ItemView.vue +++ b/src/components/ItemView.vue @@ -1,6 +1,7 @@ @@ -50,6 +51,12 @@ export default { : null })) } + }, + + computed: { + isJob () { + return this.item.type === 'job' + } } } @@ -73,4 +80,9 @@ export default { .subtext color $gray font-size 11px + .jobtext + color $gray + margin-top 0 + .jobtext p + margin 10px 0 From ce8ce62ee0cc84f03b88613d9847b704fc84fc64 Mon Sep 17 00:00:00 2001 From: Dan Hersam Date: Mon, 2 Nov 2015 09:24:57 -0500 Subject: [PATCH 03/22] Show text for any item with text. Show the text of any item that has it. Jobs don't have comments, so don't show the 'No comments yet' message. --- src/components/ItemView.vue | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/components/ItemView.vue b/src/components/ItemView.vue index 66876b6..c53e3cc 100644 --- a/src/components/ItemView.vue +++ b/src/components/ItemView.vue @@ -1,7 +1,7 @@