Repository: busyorg/busy
Pull request #898 (2017-10-25 19:31:49)

Update PostRecommendation title padding to 8px
@Sekhmet Is this what you mean? Update title to have same padding as top.


Patch:
diff --git a/src/components/Sidebar/PostRecommendation.less b/src/components/Sidebar/PostRecommendation.less
index 7acc69d7..8bbfc690 100644
--- a/src/components/Sidebar/PostRecommendation.less
+++ b/src/components/Sidebar/PostRecommendation.less
@@ -13,7 +13,7 @@
 
   &__title {
     border-bottom: 1px solid @white-gainsboro;
-    padding-bottom: 12px;
+    padding-bottom: 8px;
   }
 
   &__link {
diff --git a/src/stories/stories.js b/src/stories/stories.js
index 92463b2c..5da47d69 100644
--- a/src/stories/stories.js
+++ b/src/stories/stories.js
@@ -12,7 +12,6 @@ import StartNow from '../components/Sidebar/StartNow';
 import Topics from '../components/Sidebar/Topics';
 import InterestingPeople from '../components/Sidebar/InterestingPeople';
 import LatestComments from '../components/Sidebar/LatestComments';
-import LatestRecommendations from '../components/Sidebar/LatestRecommendations';
 import Topic from '../components/Button/Topic';
 import Follow from '../components/Button/Follow';
 import Action from '../components/Button/Action';
@@ -117,35 +116,6 @@ storiesOf('Sidebar', module)
         },
       ]}
     />),
-  )
-  .add('Latest Recommendations', () =>
-    (<LatestRecommendations
-      posts={[
-        {
-          id: '100a',
-          title: 'Its a brave new world of steemit out there. You must try it out',
-          author: 'ekitcho',
-          created: '2017-06-07T17:26:21',
-          permlink: 'hello',
-        },
-        {
-          id: '100b',
-          title:
-            'My Momma always said to me that people with gaps in their teeth had something to hide',
-          author: 'blacktivity',
-          created: '2017-06-07T18:12:13',
-          permlink: 'hello',
-        },
-        {
-          id: '100c',
-          title:
-            'Ethereum price continued to trade lower against the US Dollar and Bitcoin, and it looks like ETH/USD may continue to face sellers as long as it is below $300',
-          author: 'pooldarbashi',
-          created: '2017-06-07T17:44:11',
-          permlink: 'hello',
-        },
-      ]}
-    />),
   );
 
 storiesOf('Story', module)


Test patch:
diff --git a/src/components/Sidebar/LatestRecommendations.js b/src/components/Sidebar/LatestRecommendations.js
deleted file mode 100644
index 8202d411..00000000
--- a/src/components/Sidebar/LatestRecommendations.js
+++ /dev/null
@@ -1,62 +0,0 @@
-import React from 'react';
-import PropTypes from 'prop-types';
-import { FormattedMessage, FormattedRelative } from 'react-intl';
-import { Link } from 'react-router-dom';
-import BodyShort from '../Story/BodyShort';
-import './LatestRecommendations.less';
-
-const RenderRecommendedPost = ({ title, author, created, permlink }) =>
-  (<div className="Recommendation">
-    <div className="Recommendation__text">
-      <div className="Recommendation__title">
-        <Link to={`/@${author}/${permlink}`}>
-          <BodyShort body={title} length={80} />
-        </Link>
-      </div>
-      <div className="Recommendation__footer">
-        <Link to={`/@${author}`} className="Recommendation__author">
-          {author}
-        </Link>
-        <span className="Recommendation__bullet" />
-        <span className="Recommendation__date">
-          <FormattedRelative value={`${created}Z`} />
-        </span>
-      </div>
-    </div>
-  </div>);
-
-RenderRecommendedPost.propTypes = {
-  title: PropTypes.string.isRequired,
-  author: PropTypes.string.isRequired,
-  created: PropTypes.string.isRequired,
-  permlink: PropTypes.string.isRequired,
-};
-
-const LatestRecommendations = ({ posts }) =>
-  (<div className="LatestRecommendations">
-    <div className="LatestRecommendations__container">
-      <h4 className="LatestRecommendations__title">
-        <i className="iconfont icon-flashlight_fill LatestRecommendations__icon" />
-        {' '}
-        <FormattedMessage id="latest_recommendations" defaultMessage="Latest Recommendations" />
-      </h4>
-      <div className="LatestRecommendations__divider" />
-      {posts && posts.map(post => <RenderRecommendedPost key={post.id} {...post} />)}
-      <div className="LatestRecommendations__divider" />
-      <h4 className="LatestRecommendations__more">
-        <Link to={'/latest-recommendations'}>
-          <FormattedMessage id="see_all_recommendations" defaultMessage="See All Recommendations" />
-        </Link>
-      </h4>
-    </div>
-  </div>);
-
-LatestRecommendations.propTypes = {
-  posts: PropTypes.arrayOf(PropTypes.shape()),
-};
-
-LatestRecommendations.defaultProps = {
-  posts: [],
-};
-
-export default LatestRecommendations;
diff --git a/src/components/Sidebar/LatestRecommendations.less b/src/components/Sidebar/LatestRecommendations.less
deleted file mode 100644
index 2dbe184a..00000000
--- a/src/components/Sidebar/LatestRecommendations.less
+++ /dev/null
@@ -1,65 +0,0 @@
-@import (reference) "../../styles/custom.less";
-
-.LatestRecommendations {
-  background: @white;
-  border: 1px solid #e9e7e7;
-  border-radius: @border-radius-base;
-}
-
-.LatestRecommendations__container {
-  padding: 8px 16px 16px 16px;
-}
-
-.LatestRecommendations__icon {
-  color: @purple;
-  vertical-align: -2px;
-}
-
-.LatestRecommendations__title {
-  color: #99aab5;
-  font-size: 18px;
-  font-weight: 500;
-}
-
-.LatestRecommendations__divider {
-  width: 100%;
-  height: 1px;
-  margin: 12px 0;
-  background-color: #e9e7e7;
-}
-
-.LatestRecommendations__more > a {
-  color: #99aab5;
-  font-weight: 500;
-}
-
-.Recommendation {
-  margin-top: 16px;
-
-  &__footer {
-    padding: 8px 0;
-    color: #99aab5;
-    line-height: 14px;
-  }
-
-  &__title > a {
-    font-weight: bold;
-    color: rgba(0, 0, 0, 0.6);
-  }
-
-  &__author {
-    font-weight: bold;
-  }
-
-  &__bullet:after {
-    content: '\2022';
-    font-size: 14px;
-    margin-left: 4px;
-  }
-
-  &__date {
-    margin-left: 4px;
-    color: #99aab5;
-    font-size: 14px;
-  }
-}
diff --git a/src/stories/__snapshots__/stories.test.js.snap b/src/stories/__snapshots__/stories.test.js.snap
index 3fe68c12..7d950eb0 100644
--- a/src/stories/__snapshots__/stories.test.js.snap
+++ b/src/stories/__snapshots__/stories.test.js.snap
@@ -1521,194 +1521,6 @@ exports[`Storyshots Sidebar Latest Comments 1`] = `
 </div>
 `;
 
-exports[`Storyshots Sidebar Latest Recommendations 1`] = `
-<div
-  style={
-    Object {
-      "background": "#f9f9f9",
-      "padding": "40px",
-    }
-  }
->
-  <div
-    className="LatestRecommendations"
-  >
-    <div
-      className="LatestRecommendations__container"
-    >
-      <h4
-        className="LatestRecommendations__title"
-      >
-        <i
-          className="iconfont icon-flashlight_fill LatestRecommendations__icon"
-        />
-         
-        <span>
-          Latest Recommendations
-        </span>
-      </h4>
-      <div
-        className="LatestRecommendations__divider"
-      />
-      <div
-        className="Recommendation"
-      >
-        <div
-          className="Recommendation__text"
-        >
-          <div
-            className="Recommendation__title"
-          >
-            <a
-              href="/@ekitcho/hello"
-              onClick={[Function]}
-            >
-              <div
-                className=""
-                dangerouslySetInnerHTML={
-                  Object {
-                    "__html": "Its a brave new world of steemit out there. You must try it out
-",
-                  }
-                }
-              />
-            </a>
-          </div>
-          <div
-            className="Recommendation__footer"
-          >
-            <a
-              className="Recommendation__author"
-              href="/@ekitcho"
-              onClick={[Function]}
-            >
-              ekitcho
-            </a>
-            <span
-              className="Recommendation__bullet"
-            />
-            <span
-              className="Recommendation__date"
-            >
-              <span>
-                29 days ago
-              </span>
-            </span>
-          </div>
-        </div>
-      </div>
-      <div
-        className="Recommendation"
-      >
-        <div
-          className="Recommendation__text"
-        >
-          <div
-            className="Recommendation__title"
-          >
-            <a
-              href="/@blacktivity/hello"
-              onClick={[Function]}
-            >
-              <div
-                className=""
-                dangerouslySetInnerHTML={
-                  Object {
-                    "__html": "My Momma always said to me that people with gaps in their teeth had something t…",
-                  }
-                }
-              />
-            </a>
-          </div>
-          <div
-            className="Recommendation__footer"
-          >
-            <a
-              className="Recommendation__author"
-              href="/@blacktivity"
-              onClick={[Function]}
-            >
-              blacktivity
-            </a>
-            <span
-              className="Recommendation__bullet"
-            />
-            <span
-              className="Recommendation__date"
-            >
-              <span>
-                29 days ago
-              </span>
-            </span>
-          </div>
-        </div>
-      </div>
-      <div
-        className="Recommendation"
-      >
-        <div
-          className="Recommendation__text"
-        >
-          <div
-            className="Recommendation__title"
-          >
-            <a
-              href="/@pooldarbashi/hello"
-              onClick={[Function]}
-            >
-              <div
-                className=""
-                dangerouslySetInnerHTML={
-                  Object {
-                    "__html": "Ethereum price continued to trade lower against the US Dollar and Bitcoin, and …",
-                  }
-                }
-              />
-            </a>
-          </div>
-          <div
-            className="Recommendation__footer"
-          >
-            <a
-              className="Recommendation__author"
-              href="/@pooldarbashi"
-              onClick={[Function]}
-            >
-              pooldarbashi
-            </a>
-            <span
-              className="Recommendation__bullet"
-            />
-            <span
-              className="Recommendation__date"
-            >
-              <span>
-                29 days ago
-              </span>
-            </span>
-          </div>
-        </div>
-      </div>
-      <div
-        className="LatestRecommendations__divider"
-      />
-      <h4
-        className="LatestRecommendations__more"
-      >
-        <a
-          href="/latest-recommendations"
-          onClick={[Function]}
-        >
-          <span>
-            See All Recommendations
-          </span>
-        </a>
-      </h4>
-    </div>
-  </div>
-</div>
-`;
-
 exports[`Storyshots Sidebar Start now 1`] = `
 <div
   style={