Skip to content

Commit

Permalink
Enhance meta-review UI
Browse files Browse the repository at this point in the history
Closes #84
  • Loading branch information
li-boxuan committed Aug 3, 2018
1 parent 10003d0 commit d1a7ea3
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/components/reactions.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function Reactions({stat}) {
}
];
return reactions.map(reaction => (
<BS.Button key={reaction.name} bsSize="xsmall">
<BS.Button bsClass="reaction-btn">
{reaction.emoji} {reaction.count}
</BS.Button>
));
Expand Down
7 changes: 4 additions & 3 deletions src/components/review-blurb.jsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
import * as BS from 'react-bootstrap';
import Database from '../database';
import Loadable from './loadable';

function ReviewBlurb({card: {url}}) {
const reviewNumber = url.split('/').pop();

return (
<span className='review-blurb'>
<a className='blurb-number-link'
target='_blank'
href={url}
>
<span className='blurb-number'>{reviewNumber}</span>
<BS.Button bsClass="review-btn">
View Discussion
</BS.Button>
</a>
</span>
);
Expand Down
17 changes: 15 additions & 2 deletions style/review.less
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,30 @@
.x-font-and-emoji(1.5rem);
&:hover { text-decoration: none; }
}
.reaction-btn {
float: left;
padding: 4px 7px 3px;
border-radius: 2px;
line-height: 18px;
}
.review-btn {
padding: 4px 7px 3px;
border-radius: 2px;
line-height: 18px;
}
.list-group-item-text {
padding-left: 1rem;
padding-right: 1rem;
padding-bottom: 1rem;
font-size: 2rem;
.review-footer {
display: block;
min-height: 2rem;
min-height: 3.5rem;
padding-top: 1rem;
.comment-reactions {
display: block;
float: left;
font-size: 1.4rem;
font-size: 1.6rem;
white-space: nowrap;
overflow-x: hidden;
}
Expand Down Expand Up @@ -84,6 +96,7 @@
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
padding-top: 1px;
.colored-icon { opacity: .5; }
}
}
12 changes: 6 additions & 6 deletions test/src/components/__snapshots__/reactions.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -3,47 +3,47 @@
exports[`does not display number zero 1`] = `
Array [
<button
className="btn btn-xs btn-default"
className="reaction-btn reaction-btn-default"
disabled={false}
type="button"
>
πŸ‘
</button>,
<button
className="btn btn-xs btn-default"
className="reaction-btn reaction-btn-default"
disabled={false}
type="button"
>
πŸ‘Ž
</button>,
<button
className="btn btn-xs btn-default"
className="reaction-btn reaction-btn-default"
disabled={false}
type="button"
>
πŸ˜„
</button>,
<button
className="btn btn-xs btn-default"
className="reaction-btn reaction-btn-default"
disabled={false}
type="button"
>
πŸŽ‰
</button>,
<button
className="btn btn-xs btn-default"
className="reaction-btn reaction-btn-default"
disabled={false}
type="button"
>
πŸ˜•
</button>,
<button
className="btn btn-xs btn-default"
className="reaction-btn reaction-btn-default"
disabled={false}
type="button"
>
Expand Down

0 comments on commit d1a7ea3

Please sign in to comment.