Skip to content

Commit

Permalink
fix(discussion): Prelaunch bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
shibulijack committed Jul 23, 2017
1 parent 7176d23 commit 9550259
Show file tree
Hide file tree
Showing 10 changed files with 39 additions and 11 deletions.
4 changes: 2 additions & 2 deletions app/components/app/author-bio/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<div class="md-list-item-text">
<h3 class="name text-semibold">{{user.name}}</h3>
<div class="inner-container">
<span class="meta mr-3"><span class="pr-1">{{paper-icon "access_time" size=12}}</span><span class="meta-sub">April 1, 2017</span></span>
<span class="meta mr-3"><span class="pr-1">{{paper-icon "drafts" size=12}}</span><span class="meta-sub">Draft</span></span>
<span class="meta mr-3"><span class="pr-1">{{paper-icon "access_time" size=12}}</span><span class="meta-sub">2 days ago</span></span>
<!-- <span class="meta mr-3"><span class="pr-1">{{paper-icon "drafts" size=12}}</span><span class="meta-sub">Draft</span></span> -->
</div>
</div>
{{/paper-item}}
Expand Down
4 changes: 2 additions & 2 deletions app/components/app/comment-holder/template.hbs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="comment">
<div class="author-wrapper">
{{app/author-bio user=userInfo.data}}
{{app/author-bio user=answer.user}}
<div onClick={{action 'enableReply'}} class="comment-reply-btn">Reply</div>
</div>
<div class="answer">
Expand All @@ -23,4 +23,4 @@
{{#if showReply}}
{{app/comment-input direction="end" buttonText=buttonText content=replyContent onsuccess=(action 'submitReply')}}
{{/if}}
</div>
</div>
2 changes: 2 additions & 0 deletions app/components/app/comment-input/template.hbs
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<div class="answer-input-container">
<div class="layout-row layout-align-{{direction}}-center p-3">
<div class="flex-initial">
<div class="author-bio-wrapper">
{{app/avatar-holder src=userInfo.data.image name=userInfo.data.name class="md-avatar" }}
</div>
</div>
<div class="flex-60">
<div class="answer-box">
Expand Down
4 changes: 2 additions & 2 deletions app/components/app/quick-search/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
<li class="result-info"> Loading.. </li>
{{else}}
{{#if (and searchResults.lastSuccessful.value.discussions (not isTermPresent))}}
<li>Recent Search Results</li>
<li class="result-header">Recent Search Results</li>
{{else if (not isTermPresent)}}
<li class="result-info"> Type to search.. </li>
<li class="result-info"> Start typing to search for questions... </li>
{{/if}}
{{#each searchResults.lastSuccessful.value.discussions as |discussion|}}
<li>
Expand Down
6 changes: 5 additions & 1 deletion app/components/route-discussion/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</div>
<h1 class="title">{{discussion.title}}</h1>
<div class="author-wrapper">
{{app/author-bio user=userInfo.data}}
{{app/author-bio user=discussion.user}}
</div>
<div class="description">
{{{discussion.description}}}
Expand Down Expand Up @@ -47,9 +47,13 @@
<div class="layout-row layout-xs-column">
<div class="flex-80 flex-offset-10">
<div class="comment-wrapper">
{{#if (gt discussion.answers.length 0)}}
{{#each discussion.answers as |answer|}}
{{app/comment-holder commentAdded=commentAdded buttonText="Reply" answer=answer onReply=(action 'submitReply')}}
{{/each}}
{{else}}
<div class="no-answers"><p>Be the first one to answer!</p></div>
{{/if}}
</div>
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions app/models/answer.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ export default DS.Model.extend({
voteAction: attr(),
upvote: memberAction({ path: 'upvote' }),
downvote: memberAction({ path: 'downvote' }),
user: attr()
});
4 changes: 2 additions & 2 deletions app/services/user-info.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Ember from 'ember';
export default Ember.Service.extend({
data: {
userId:1,
name: 'Jack Daniels',
image: 'http://garden.zendesk.com/css-avatars/images/jz.png',
name: 'John Doe',
image: 'https://shibulijack.files.wordpress.com/2016/08/dp2.jpg?w=400&h=400&crop=1',
email: '[email protected]' },
});
10 changes: 10 additions & 0 deletions app/styles/_discussion.scss
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,13 @@
color: $text-dark;
}
}

.comments-wrapper {
.no-answers {
p {
color: $text-light;
padding: 2rem;
text-align: center;
}
}
}
14 changes: 12 additions & 2 deletions app/styles/_search.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ $app-search-width: 30rem;
top: 28px;
width: $quick-search-width;
height: 300px;
color: $text-dark;
color: $text-grey-dark;
overflow-y: scroll;
background: #fff;
list-style: none;
padding: 0.25rem;
padding: 0;
word-break: break-word;
box-shadow: 0 3px 5px rgba(0,0,0,.25);
border-bottom-left-radius: 4px;
Expand All @@ -30,6 +30,16 @@ $app-search-width: 30rem;
&.result-info {
text-align: center;
margin-top: 10px;
font-size: 1rem;
color: $text-light;
}
&.result-header {
font-size: 0.75rem;
text-transform: uppercase;
background: $app-bg;
color: $text-light;
font-weight: 600;
text-align: center;
}
}
}
Expand Down
1 change: 1 addition & 0 deletions app/styles/components/_author-bio.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
width: 50px;
height: 50px;
margin-right: 1rem;
border-radius: 50%;
img {
border-radius: 50%;
}
Expand Down

0 comments on commit 9550259

Please sign in to comment.