diff --git a/client/coral-embed-stream/src/Embed.js b/client/coral-embed-stream/src/Embed.js index de4f7cc8e..03631fe4f 100644 --- a/client/coral-embed-stream/src/Embed.js +++ b/client/coral-embed-stream/src/Embed.js @@ -42,15 +42,6 @@ class Embed extends Component { } componentDidMount () { - - // stream id, logged in user, settings - - // Set up messaging between embedded Iframe an parent component - - // this.props.getStream(path || window.location); - // this.path = window.location.href.split('#')[0]; - // - pym.sendMessage('childReady'); pym.onMessage('DOMContentLoaded', hash => { @@ -69,13 +60,6 @@ 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) { @@ -192,7 +176,13 @@ const mapStateToProps = state => ({ const mapDispatchToProps = dispatch => ({ loadAsset: (asset) => dispatch(fetchAssetSuccess(asset)), - addNotification: (type, text) => dispatch(addNotification(type, text)), + addNotification: (type, text) => { + pym.sendMessage('getPosition'); + + pym.onMessage('position', position => { + dispatch(addNotification(type, text, position)); + }); + }, clearNotification: () => dispatch(clearNotification()), showSignInDialog: (offset) => dispatch(showSignInDialog(offset)), logout: () => dispatch(logout()), diff --git a/client/coral-embed-stream/style/default.css b/client/coral-embed-stream/style/default.css index b8592b925..551bc6287 100644 --- a/client/coral-embed-stream/style/default.css +++ b/client/coral-embed-stream/style/default.css @@ -51,7 +51,6 @@ hr { /* Notification styles */ #coral-notif { position: fixed; - bottom: 0; border: 0; background: rgb(105,105,105); color: white; @@ -81,7 +80,8 @@ hr { .commentStream { /* prevent absolutely positioned final permalink popover from being clipped */ padding-bottom: 50px; - /*height: 100vh;*/ + min-height: 775px; + position: relative; } /* Comment Box Styles */ diff --git a/client/coral-framework/actions/notification.js b/client/coral-framework/actions/notification.js index 4edc17601..f0ac4d951 100644 --- a/client/coral-framework/actions/notification.js +++ b/client/coral-framework/actions/notification.js @@ -1,11 +1,12 @@ export const ADD_NOTIFICATION = 'ADD_NOTIFICATION'; export const CLEAR_NOTIFICATION = 'CLEAR_NOTIFICATION'; -export const addNotification = (notifType, text) => { +export const addNotification = (notifType, text, position) => { return { type: ADD_NOTIFICATION, notifType, - text + text, + position }; }; diff --git a/client/coral-framework/modules/notification/Notification.js b/client/coral-framework/modules/notification/Notification.js index 08a5ecbca..5ae8d94d7 100644 --- a/client/coral-framework/modules/notification/Notification.js +++ b/client/coral-framework/modules/notification/Notification.js @@ -8,14 +8,16 @@ const Notification = (props) => { // props.clearNotification(); // }, props.notifLength); } - return