]> Untitled Git - lemmy.git/commitdiff
Making chat / new comments section sticky top and fitting to your
authorDessalines <tyhou13@gmx.com>
Sun, 21 Apr 2019 23:44:47 +0000 (16:44 -0700)
committerDessalines <tyhou13@gmx.com>
Sun, 21 Apr 2019 23:44:47 +0000 (16:44 -0700)
viewport

- Fixes #97. #98

ui/src/components/comment-form.tsx
ui/src/components/post.tsx
ui/src/css/main.css

index df079ba33e3a14887d304938374d41560470abc0..1b4eda99dbca9bfa459b7b2e6672d4d9529b8f61 100644 (file)
@@ -56,7 +56,7 @@ export class CommentForm extends Component<CommentFormProps, CommentFormState> {
         <form onSubmit={linkEvent(this, this.handleCommentSubmit)}>
           <div class="form-group row">
             <div class="col-sm-12">
-              <textarea class="form-control" value={this.state.commentForm.content} onInput={linkEvent(this, this.handleCommentContentChange)} placeholder="Comment here" required disabled={this.props.disabled}/>
+              <textarea class="form-control" value={this.state.commentForm.content} onInput={linkEvent(this, this.handleCommentContentChange)} required disabled={this.props.disabled} rows={2} />
             </div>
           </div>
           <div class="row">
index 3ece674795e903b4344f54f001b9440c22a098ea..9f489466b5e98d0f15c19ec84ee6a03c128838cc 100644 (file)
@@ -130,8 +130,9 @@ export class Post extends Component<any, PostState> {
 
   newComments() {
     return (
-      <div class="sticky-top">
-        <h5>New Comments</h5>
+      <div class="container-fluid sticky-top new-comments">
+        <h5>Chat</h5>
+        <CommentForm postId={this.state.post.id} disabled={this.state.post.locked} />
         {this.state.comments.map(comment => 
           <CommentNodes 
             nodes={[{comment: comment}]} 
index da118490e3649c7bb760f2b1e98240313d8ff5d0..832149f4455f6c5c0c746762c00f3347902c3b4a 100644 (file)
@@ -87,3 +87,7 @@ blockquote {
   margin-top: 6px;
 }
 
+.new-comments {
+  max-height: 100vh;
+  overflow-y: auto;
+}