diff --git a/app/assets/javascripts/components/features/notifications/index.jsx b/app/assets/javascripts/components/features/notifications/index.jsx index 9c8b07de..00feeece 100644 --- a/app/assets/javascripts/components/features/notifications/index.jsx +++ b/app/assets/javascripts/components/features/notifications/index.jsx @@ -22,7 +22,8 @@ const Notifications = React.createClass({ propTypes: { notifications: ImmutablePropTypes.list.isRequired, - dispatch: React.PropTypes.func.isRequired + dispatch: React.PropTypes.func.isRequired, + trackScroll: React.PropTypes.bool }, mixins: [PureRenderMixin], @@ -41,19 +42,31 @@ const Notifications = React.createClass({ }, render () { - const { intl, notifications } = this.props; + const { intl, notifications, trackScroll } = this.props; - return ( - - -
-
- {notifications.map(item => )} -
-
-
-
+ const scrollableArea = ( +
+
+ {notifications.map(item => )} +
+
); + + if (trackScroll) { + return ( + + + {scrollableArea} + + + ); + } else { + return ( + + {scrollableArea} + + ); + } } }); diff --git a/app/assets/javascripts/components/features/ui/components/tabs_bar.jsx b/app/assets/javascripts/components/features/ui/components/tabs_bar.jsx index 8313d882..868ebe00 100644 --- a/app/assets/javascripts/components/features/ui/components/tabs_bar.jsx +++ b/app/assets/javascripts/components/features/ui/components/tabs_bar.jsx @@ -31,7 +31,7 @@ const TabsBar = () => {
- +
); diff --git a/app/assets/javascripts/components/features/ui/index.jsx b/app/assets/javascripts/components/features/ui/index.jsx index 655b1e2e..9b5469bb 100644 --- a/app/assets/javascripts/components/features/ui/index.jsx +++ b/app/assets/javascripts/components/features/ui/index.jsx @@ -1,13 +1,14 @@ -import ColumnsArea from './components/columns_area'; +import ColumnsArea from './components/columns_area'; import NotificationsContainer from './containers/notifications_container'; -import PureRenderMixin from 'react-addons-pure-render-mixin'; -import LoadingBarContainer from './containers/loading_bar_container'; -import HomeTimeline from '../home_timeline'; -import MentionsTimeline from '../mentions_timeline'; -import Compose from '../compose'; -import MediaQuery from 'react-responsive'; -import TabsBar from './components/tabs_bar'; -import ModalContainer from './containers/modal_container'; +import PureRenderMixin from 'react-addons-pure-render-mixin'; +import LoadingBarContainer from './containers/loading_bar_container'; +import HomeTimeline from '../home_timeline'; +import MentionsTimeline from '../mentions_timeline'; +import Compose from '../compose'; +import MediaQuery from 'react-responsive'; +import TabsBar from './components/tabs_bar'; +import ModalContainer from './containers/modal_container'; +import Notifications from '../notifications'; const UI = React.createClass({ @@ -26,11 +27,11 @@ const UI = React.createClass({ {this.props.children} - + - + {this.props.children}