From 0a23633aa49ece18897a6ceaa56fdd3cd837b8e8 Mon Sep 17 00:00:00 2001
From: ilyayudovin <ilyayudovin123@gmail.com>
Date: Tue, 15 Sep 2020 00:15:30 +0300
Subject: feat: add description to poll

---
 src/components/PollCard/PollCard.tsx | 4 ++++
 1 file changed, 4 insertions(+)

(limited to 'src/components/PollCard/PollCard.tsx')

diff --git a/src/components/PollCard/PollCard.tsx b/src/components/PollCard/PollCard.tsx
index 540679f..e2d06ee 100644
--- a/src/components/PollCard/PollCard.tsx
+++ b/src/components/PollCard/PollCard.tsx
@@ -42,6 +42,9 @@ const useStyles = makeStyles(theme => ({
     height: theme.spacing(2),
     backgroundColor: theme.palette.primary.light,
     transitionDuration: '0.5s'
+  },
+  description: {
+    padding: '0px 16px 10px'
   }
 }));
 
@@ -93,6 +96,7 @@ const PollCard: React.FC<PropTypes> = React.memo(({ poll, setPoll }) => {
   return (
     <Card elevation={3}>
       <UserStrip user={author} info={date} />
+      <div className={classes.description}>{poll.description}</div>
       <div className={classes.media}>
         <CardActionArea onDoubleClick={handleVote('left')} className={classes.media}>
           <BackgroundImage src={left.url} />
-- 
cgit v1.2.3


From 12b52a29d27736075d71f97937f678650bfc6339 Mon Sep 17 00:00:00 2001
From: ilyayudovin <ilyayudovin123@gmail.com>
Date: Fri, 18 Sep 2020 20:54:25 +0300
Subject: dont show description if it is empty

---
 src/components/PollCard/PollCard.tsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'src/components/PollCard/PollCard.tsx')

diff --git a/src/components/PollCard/PollCard.tsx b/src/components/PollCard/PollCard.tsx
index e2d06ee..b6fdfaa 100644
--- a/src/components/PollCard/PollCard.tsx
+++ b/src/components/PollCard/PollCard.tsx
@@ -96,7 +96,7 @@ const PollCard: React.FC<PropTypes> = React.memo(({ poll, setPoll }) => {
   return (
     <Card elevation={3}>
       <UserStrip user={author} info={date} />
-      <div className={classes.description}>{poll.description}</div>
+      {poll.description && <div className={classes.description}>{poll.description}</div>}
       <div className={classes.media}>
         <CardActionArea onDoubleClick={handleVote('left')} className={classes.media}>
           <BackgroundImage src={left.url} />
-- 
cgit v1.2.3


From 3aa75f9454332342fdb76d3b8466ef52f058cf4d Mon Sep 17 00:00:00 2001
From: ilyayudovin <ilyayudovin123@gmail.com>
Date: Sat, 19 Sep 2020 01:12:34 +0300
Subject: clear cache on polls size change

---
 src/components/PollCard/PollCard.tsx | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'src/components/PollCard/PollCard.tsx')

diff --git a/src/components/PollCard/PollCard.tsx b/src/components/PollCard/PollCard.tsx
index b6fdfaa..d909b79 100644
--- a/src/components/PollCard/PollCard.tsx
+++ b/src/components/PollCard/PollCard.tsx
@@ -44,7 +44,8 @@ const useStyles = makeStyles(theme => ({
     transitionDuration: '0.5s'
   },
   description: {
-    padding: '0px 16px 10px'
+    padding: '0px 16px 10px',
+    overflowWrap: 'break-word'
   }
 }));
 
-- 
cgit v1.2.3


From 86a0796c859bbb0bd735fdc3bdc67d1687ddaf1c Mon Sep 17 00:00:00 2001
From: eug-vs <eug-vs@keemail.me>
Date: Thu, 8 Oct 2020 22:43:30 +0300
Subject: feat: tweak description paddings

---
 src/components/PollCard/PollCard.tsx | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

(limited to 'src/components/PollCard/PollCard.tsx')

diff --git a/src/components/PollCard/PollCard.tsx b/src/components/PollCard/PollCard.tsx
index d909b79..eb025f2 100644
--- a/src/components/PollCard/PollCard.tsx
+++ b/src/components/PollCard/PollCard.tsx
@@ -1,6 +1,6 @@
 import React from 'react';
 import { makeStyles } from '@material-ui/core/styles';
-import { Card, CardActionArea } from '@material-ui/core/';
+import { Card, CardActionArea, Typography } from '@material-ui/core/';
 import { Which, Poll } from 'which-types';
 import { useSnackbar } from 'notistack';
 
@@ -44,8 +44,7 @@ const useStyles = makeStyles(theme => ({
     transitionDuration: '0.5s'
   },
   description: {
-    padding: '0px 16px 10px',
-    overflowWrap: 'break-word'
+    padding: theme.spacing(0.5, 2)
   }
 }));
 
@@ -97,7 +96,11 @@ const PollCard: React.FC<PropTypes> = React.memo(({ poll, setPoll }) => {
   return (
     <Card elevation={3}>
       <UserStrip user={author} info={date} />
-      {poll.description && <div className={classes.description}>{poll.description}</div>}
+      {poll.description && (
+        <Typography gutterBottom className={classes.description}>
+          {poll.description}
+        </Typography>
+      )}
       <div className={classes.media}>
         <CardActionArea onDoubleClick={handleVote('left')} className={classes.media}>
           <BackgroundImage src={left.url} />
-- 
cgit v1.2.3


From 8c8e38f93dba84f67624959540cd2b2042dd5089 Mon Sep 17 00:00:00 2001
From: eug-vs <eug-vs@keemail.me>
Date: Thu, 8 Oct 2020 23:31:08 +0300
Subject: feat: make PollCreation input same as description

---
 src/components/PollCard/PollCard.tsx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'src/components/PollCard/PollCard.tsx')

diff --git a/src/components/PollCard/PollCard.tsx b/src/components/PollCard/PollCard.tsx
index eb025f2..6886534 100644
--- a/src/components/PollCard/PollCard.tsx
+++ b/src/components/PollCard/PollCard.tsx
@@ -44,7 +44,7 @@ const useStyles = makeStyles(theme => ({
     transitionDuration: '0.5s'
   },
   description: {
-    padding: theme.spacing(0.5, 2)
+    padding: theme.spacing(1, 2)
   }
 }));
 
@@ -97,7 +97,7 @@ const PollCard: React.FC<PropTypes> = React.memo(({ poll, setPoll }) => {
     <Card elevation={3}>
       <UserStrip user={author} info={date} />
       {poll.description && (
-        <Typography gutterBottom className={classes.description}>
+        <Typography className={classes.description}>
           {poll.description}
         </Typography>
       )}
-- 
cgit v1.2.3


From 2f35115f03c8080424ef24302091c5125ff68ff0 Mon Sep 17 00:00:00 2001
From: eug-vs <eug-vs@keemail.me>
Date: Thu, 8 Oct 2020 23:42:49 +0300
Subject: fix: preserve all whitespaces in description

---
 src/components/PollCard/PollCard.tsx | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

(limited to 'src/components/PollCard/PollCard.tsx')

diff --git a/src/components/PollCard/PollCard.tsx b/src/components/PollCard/PollCard.tsx
index 6886534..a06bad8 100644
--- a/src/components/PollCard/PollCard.tsx
+++ b/src/components/PollCard/PollCard.tsx
@@ -44,7 +44,9 @@ const useStyles = makeStyles(theme => ({
     transitionDuration: '0.5s'
   },
   description: {
-    padding: theme.spacing(1, 2)
+    padding: theme.spacing(1, 2),
+    wordWrap: 'break-word',
+    whiteSpace: 'pre-wrap'
   }
 }));
 
-- 
cgit v1.2.3

