From 805b5cb441f400e4669ccaac93422c2d453724f3 Mon Sep 17 00:00:00 2001 From: Belen Curcio Date: Mon, 30 Jan 2017 09:04:00 -0300 Subject: [PATCH] Lintin --- client/coral-embed-stream/src/Embed.js | 15 +++++++++------ client/coral-embed-stream/style/default.css | 6 ++++++ .../modules/notification/Notification.js | 1 + client/coral-ui/components/SnackBar.css | 5 ++--- client/coral-ui/components/SnackBar.js | 2 +- 5 files changed, 19 insertions(+), 10 deletions(-) diff --git a/client/coral-embed-stream/src/Embed.js b/client/coral-embed-stream/src/Embed.js index e424a99c5..de4f7cc8e 100644 --- a/client/coral-embed-stream/src/Embed.js +++ b/client/coral-embed-stream/src/Embed.js @@ -26,7 +26,7 @@ import ConfigureStreamContainer from 'coral-configure/containers/ConfigureStream class Embed extends Component { - state = { activeTab: 0, showSignInDialog: false }; + state = {activeTab: 0, showSignInDialog: false}; changeTab = (tab) => { this.setState({ @@ -69,6 +69,13 @@ class Embed extends Component { } }, 100); }); + console.log(document.documentElement); + document.documentElement.addEventListener('scroll', this.handleScroll); + } + + handleScroll = () => { + const doc = document.documentElement; + console.log((window.pageYOffset || doc.scrollTop) - (doc.clientTop || 0)); } componentWillReceiveProps (nextProps) { @@ -91,13 +98,9 @@ class Embed extends Component { } : {}; if (loading) { - return + return ; } - console.log( - asset - ) - return (
diff --git a/client/coral-embed-stream/style/default.css b/client/coral-embed-stream/style/default.css index 300323d37..b8592b925 100644 --- a/client/coral-embed-stream/style/default.css +++ b/client/coral-embed-stream/style/default.css @@ -1,3 +1,8 @@ +html, body { + width:auto; + height:auto; +} + body { font-family: 'Lato', sans-serif; font-family: 'Open Sans', sans-serif; @@ -76,6 +81,7 @@ hr { .commentStream { /* prevent absolutely positioned final permalink popover from being clipped */ padding-bottom: 50px; + /*height: 100vh;*/ } /* Comment Box Styles */ diff --git a/client/coral-framework/modules/notification/Notification.js b/client/coral-framework/modules/notification/Notification.js index 965c17a2d..08a5ecbca 100644 --- a/client/coral-framework/modules/notification/Notification.js +++ b/client/coral-framework/modules/notification/Notification.js @@ -3,6 +3,7 @@ import {SnackBar} from 'coral-ui'; const Notification = (props) => { if (props.notification.text) { + // setTimeout(() => { // props.clearNotification(); // }, props.notifLength); diff --git a/client/coral-ui/components/SnackBar.css b/client/coral-ui/components/SnackBar.css index 3c39c4aca..0daf9a152 100644 --- a/client/coral-ui/components/SnackBar.css +++ b/client/coral-ui/components/SnackBar.css @@ -1,6 +1,4 @@ .SnackBar { - top: 0; - background: red; position: fixed; cursor: default; background-color: #323232; @@ -9,11 +7,12 @@ will-change: transform; transition: transform .25s cubic-bezier(.4,0,1,1); pointer-events: none; - transform: translate(-50%,80px); padding: 18px 14px; vertical-align: middle; color: #fff; border-radius: 3px; text-align: center; left: 50%; + bottom: 0; + transform: translate(-50%, 0); } diff --git a/client/coral-ui/components/SnackBar.js b/client/coral-ui/components/SnackBar.js index 9e4abb032..380613f4c 100644 --- a/client/coral-ui/components/SnackBar.js +++ b/client/coral-ui/components/SnackBar.js @@ -1,5 +1,5 @@ import React from 'react'; -import styles from './SnackBar.css' +import styles from './SnackBar.css'; const SnackBar = ({children}) => (
{children}