From f7725f41439874697cc0ea07b5d163929dde91b2 Mon Sep 17 00:00:00 2001 From: Belen Curcio Date: Mon, 30 Jan 2017 15:27:09 -0300 Subject: [PATCH] Notifications working everywhere :D --- client/coral-embed-stream/style/default.css | 2 +- .../modules/notification/Notification.js | 7 +++---- client/coral-settings/containers/SettingsContainer.js | 3 +-- client/coral-ui/components/SnackBar.js | 10 +++++++--- 4 files changed, 12 insertions(+), 10 deletions(-) diff --git a/client/coral-embed-stream/style/default.css b/client/coral-embed-stream/style/default.css index 551bc6287..0fc46c4e7 100644 --- a/client/coral-embed-stream/style/default.css +++ b/client/coral-embed-stream/style/default.css @@ -80,7 +80,7 @@ hr { .commentStream { /* prevent absolutely positioned final permalink popover from being clipped */ padding-bottom: 50px; - min-height: 775px; + min-height: 500px; position: relative; } diff --git a/client/coral-framework/modules/notification/Notification.js b/client/coral-framework/modules/notification/Notification.js index 5ae8d94d7..709403976 100644 --- a/client/coral-framework/modules/notification/Notification.js +++ b/client/coral-framework/modules/notification/Notification.js @@ -3,10 +3,9 @@ import {SnackBar} from 'coral-ui'; const Notification = (props) => { if (props.notification.text) { - - // setTimeout(() => { - // props.clearNotification(); - // }, props.notifLength); + setTimeout(() => { + props.clearNotification(); + }, props.notifLength); } return (
diff --git a/client/coral-settings/containers/SettingsContainer.js b/client/coral-settings/containers/SettingsContainer.js index 665ba5e4c..f02badd80 100644 --- a/client/coral-settings/containers/SettingsContainer.js +++ b/client/coral-settings/containers/SettingsContainer.js @@ -1,7 +1,6 @@ import {connect} from 'react-redux'; import {compose} from 'react-apollo'; import React, {Component} from 'react'; -import {addNotification} from '../actions/notification'; import I18n from 'coral-framework/modules/i18n/i18n'; import {myCommentHistory} from 'coral-framework/graphql/queries'; @@ -66,7 +65,7 @@ class SettingsContainer extends Component { } - +
); diff --git a/client/coral-ui/components/SnackBar.js b/client/coral-ui/components/SnackBar.js index 9948eaa24..efebb89fa 100644 --- a/client/coral-ui/components/SnackBar.js +++ b/client/coral-ui/components/SnackBar.js @@ -3,10 +3,14 @@ import styles from './SnackBar.css'; const SnackBar = ({children, className, position, ...attrs}) => { return ( -
- {children} -
+
+ {children} +
); }; +const fixedStyle = {bottom: 0, top: 'auto'}; + export default SnackBar;