From 589112966271cda7eaa53b7791da39109c4f14a1 Mon Sep 17 00:00:00 2001 From: Matt Rider Date: Fri, 26 Apr 2019 08:57:29 -0300 Subject: [PATCH] Ordered comments like alpha, move HcCommentForm, mobile responsive - in the first instance, we will be importing posts/comments from the alpha, so to maintain consistency, we've ordered them alike. In the future, we could support user choice of order. - Gives more space for HcCommentForm, user can see comments added to list, helps with mobile responsiveness Co-authored-by: Tirokk Co-authored-by: Mike Aono --- backend/src/resolvers/comments.js | 2 +- webapp/components/CommentForm/index.vue | 80 ++++++++++++------------- webapp/graphql/CommentQuery.js | 4 +- webapp/locales/de.json | 2 +- webapp/locales/en.json | 2 +- webapp/pages/post/_id/_slug/index.vue | 31 +++++----- 6 files changed, 58 insertions(+), 63 deletions(-) diff --git a/backend/src/resolvers/comments.js b/backend/src/resolvers/comments.js index 60ecbcc8e..899338644 100644 --- a/backend/src/resolvers/comments.js +++ b/backend/src/resolvers/comments.js @@ -10,7 +10,7 @@ export default { const session = context.driver.session() const transactionRes = await session.run(` MATCH (comment:Comment)-[:COMMENTS]->(post:Post {id: $postId}) - RETURN comment {.id, .contentExcerpt, .createdAt}`, { + RETURN comment {.id, .contentExcerpt, .createdAt} ORDER BY comment.createdAt ASC`, { postId }) diff --git a/webapp/components/CommentForm/index.vue b/webapp/components/CommentForm/index.vue index bb71af1f7..b1f3ddf80 100644 --- a/webapp/components/CommentForm/index.vue +++ b/webapp/components/CommentForm/index.vue @@ -1,45 +1,43 @@