Merge pull request #3187 from virtuacoplenny/lenny/cleanup-new-toolbox-css
ref(toolbar): remove use-new-toolbox class
This commit is contained in:
commit
e01acd9cf0
|
@ -0,0 +1,12 @@
|
||||||
|
/**
|
||||||
|
* Move Atlaskit Flag up a little bit so it does not cover the toolbar with the
|
||||||
|
* first notification.
|
||||||
|
*/
|
||||||
|
.cxGWJB{
|
||||||
|
bottom: calc(#{$newToolbarSizeWithPadding}) !important;
|
||||||
|
}
|
||||||
|
.gXSEsl:nth-child(n+2) {
|
||||||
|
transform: translateX(0) translateY(100%) translateY(16px) !important;
|
||||||
|
-ms-transform: translateX(0) translateY(100%) translateY(16px) !important;
|
||||||
|
-webkit-transform: translateX(0) translateY(100%) translateY(16px) !important;
|
||||||
|
}
|
|
@ -6,7 +6,7 @@
|
||||||
#chatconversation {
|
#chatconversation {
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
position: relative;
|
position: relative;
|
||||||
top: 5px;
|
top: 15px;
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
line-height: 20px;
|
line-height: 20px;
|
||||||
|
@ -60,37 +60,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.localuser {
|
.localuser {
|
||||||
color: #087dba;
|
color: #4C9AFF
|
||||||
}
|
|
||||||
.use-new-toolbox {
|
|
||||||
.chatmessage {
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
|
|
||||||
.localuser {
|
|
||||||
color: #4C9AFF;
|
|
||||||
}
|
|
||||||
|
|
||||||
.remoteuser {
|
|
||||||
color: #B8C7E0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#usermsg {
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
|
|
||||||
.chatmessage,
|
|
||||||
#smileysarea,
|
|
||||||
#smileysContainer,
|
|
||||||
#usermsg {
|
|
||||||
background-color: $newToolbarBackgroundColor;
|
|
||||||
}
|
|
||||||
|
|
||||||
.smileyContainer:hover {
|
|
||||||
background-color: $newToolbarButtonToggleColor;
|
|
||||||
border-radius: 5px;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.errorMessage {
|
.errorMessage {
|
||||||
|
@ -98,10 +68,11 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.remoteuser {
|
.remoteuser {
|
||||||
color: white;
|
color: #B8C7E0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#usermsg {
|
#usermsg {
|
||||||
|
background-color: $newToolbarBackgroundColor;
|
||||||
visibility:hidden;
|
visibility:hidden;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: 0px;
|
bottom: 0px;
|
||||||
|
@ -112,8 +83,7 @@
|
||||||
max-height:150px;
|
max-height:150px;
|
||||||
min-height:35px;
|
min-height:35px;
|
||||||
border: 0px none;
|
border: 0px none;
|
||||||
background: #3a3a3a;
|
color: white;
|
||||||
color: #a7a7a7;
|
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
border-radius:0;
|
border-radius:0;
|
||||||
font-size: 10pt;
|
font-size: 10pt;
|
||||||
|
@ -183,7 +153,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.chatmessage {
|
.chatmessage {
|
||||||
background: #3a3a3a;
|
background-color: $newToolbarBackgroundColor;;
|
||||||
width: 93%;
|
width: 93%;
|
||||||
margin-left: 9px;
|
margin-left: 9px;
|
||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
|
@ -191,7 +161,7 @@
|
||||||
border-top-left-radius: 0px;
|
border-top-left-radius: 0px;
|
||||||
margin-top: 3px;
|
margin-top: 3px;
|
||||||
left: 5px;
|
left: 5px;
|
||||||
color: #a7a7a7;
|
color: white;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
padding-bottom: 3px;
|
padding-bottom: 3px;
|
||||||
}
|
}
|
||||||
|
@ -227,7 +197,7 @@
|
||||||
max-height:150px;
|
max-height:150px;
|
||||||
min-height:35px;
|
min-height:35px;
|
||||||
border: 0px none;
|
border: 0px none;
|
||||||
background: #3a3a3a;
|
background-color: $newToolbarBackgroundColor;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
}
|
}
|
||||||
|
@ -239,7 +209,7 @@
|
||||||
#smileysContainer {
|
#smileysContainer {
|
||||||
display: none;
|
display: none;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
background: #3a3a3a;
|
background-color: $newToolbarBackgroundColor;
|
||||||
border-bottom: 1px solid;
|
border-bottom: 1px solid;
|
||||||
border-top: 1px solid;
|
border-top: 1px solid;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
@ -257,7 +227,9 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.smileyContainer:hover {
|
.smileyContainer:hover {
|
||||||
background: #3e3e3e;
|
background-color: $newToolbarButtonToggleColor;
|
||||||
|
border-radius: 5px;
|
||||||
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
#usermsg::-webkit-input-placeholder {
|
#usermsg::-webkit-input-placeholder {
|
||||||
|
|
|
@ -5,28 +5,19 @@
|
||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
}
|
}
|
||||||
|
|
||||||
.use-new-toolbox {
|
|
||||||
.filmstrip.reduce-height {
|
|
||||||
bottom: $newToolbarSizeWithPadding;
|
|
||||||
}
|
|
||||||
|
|
||||||
.filmstrip {
|
|
||||||
transition: bottom .3s;
|
|
||||||
}
|
|
||||||
|
|
||||||
.filmstrip__videos.hidden {
|
|
||||||
bottom: calc(-196px - #{$newToolbarSizeWithPadding});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.filmstrip {
|
.filmstrip {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
padding: 10px 5px;
|
padding: 10px 5px;
|
||||||
@extend %align-right;
|
@extend %align-right;
|
||||||
|
transition: bottom .3s;
|
||||||
z-index: $filmstripVideosZ;
|
z-index: $filmstripVideosZ;
|
||||||
|
|
||||||
|
&.reduce-height {
|
||||||
|
bottom: $newToolbarSizeWithPadding;
|
||||||
|
}
|
||||||
|
|
||||||
&__toolbar {
|
&__toolbar {
|
||||||
@include flex();
|
@include flex();
|
||||||
flex-direction: column-reverse;
|
flex-direction: column-reverse;
|
||||||
|
@ -83,7 +74,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
&.hidden {
|
&.hidden {
|
||||||
bottom: -196px;
|
bottom: calc(-196px - #{$newToolbarSizeWithPadding});
|
||||||
}
|
}
|
||||||
|
|
||||||
.remote-videos-container {
|
.remote-videos-container {
|
||||||
|
|
|
@ -1,41 +1,14 @@
|
||||||
/**
|
/**
|
||||||
* Toolbar side panel main container element.
|
* Toolbar side panel main container element.
|
||||||
*/
|
*/
|
||||||
.use-new-toolbox #sideToolbarContainer {
|
#sideToolbarContainer {
|
||||||
background-color: $newToolbarBackgroundColor;
|
background-color: $newToolbarBackgroundColor;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Make the sidebar flush with the top of the toolbar. Take the size of
|
* Make the sidebar flush with the top of the toolbar. Take the size of
|
||||||
* the toolbar and subtract from 100%.
|
* the toolbar and subtract from 100%.
|
||||||
*/
|
*/
|
||||||
height: calc(100% - #{$newToolbarSizeWithPadding});
|
height: calc(100% - #{$newToolbarSizeWithPadding});
|
||||||
left: 0;
|
left: 0;
|
||||||
|
|
||||||
.side-toolbar-close {
|
|
||||||
background: gray;
|
|
||||||
border: 3px solid rgba(255, 255, 255, 0.1);
|
|
||||||
border-radius: 100%;
|
|
||||||
color: white;
|
|
||||||
cursor:pointer;
|
|
||||||
height: 10px;
|
|
||||||
line-height: 10px;
|
|
||||||
padding: 4px;
|
|
||||||
position: absolute;
|
|
||||||
right: 5px;
|
|
||||||
text-align: center;
|
|
||||||
top: 5px;
|
|
||||||
width: 10px;
|
|
||||||
z-index: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
#chatconversation {
|
|
||||||
top: 15px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#sideToolbarContainer {
|
|
||||||
background-color: $sideToolbarContainerBg;
|
|
||||||
height: 100%;
|
|
||||||
left: $defaultToolbarSize;
|
|
||||||
max-width: $sidebarWidth;
|
max-width: $sidebarWidth;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
@ -112,4 +85,21 @@
|
||||||
margin-top: 0 !important;
|
margin-top: 0 !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.side-toolbar-close {
|
||||||
|
background: gray;
|
||||||
|
border: 3px solid rgba(255, 255, 255, 0.1);
|
||||||
|
border-radius: 100%;
|
||||||
|
color: white;
|
||||||
|
cursor:pointer;
|
||||||
|
height: 10px;
|
||||||
|
line-height: 10px;
|
||||||
|
padding: 4px;
|
||||||
|
position: absolute;
|
||||||
|
right: 5px;
|
||||||
|
text-align: center;
|
||||||
|
top: 5px;
|
||||||
|
width: 10px;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,17 +19,6 @@
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
|
|
||||||
.use-new-toolbox {
|
|
||||||
.cxGWJB{
|
|
||||||
bottom: calc(#{$newToolbarSizeWithPadding});
|
|
||||||
}
|
|
||||||
.gXSEsl:nth-child(n+2) {
|
|
||||||
transform: translateX(0) translateY(100%) translateY(16px);
|
|
||||||
-ms-transform: translateX(0) translateY(100%) translateY(16px);
|
|
||||||
-webkit-transform: translateX(0) translateY(100%) translateY(16px);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* TODO: when the old filmstrip has been removed, remove the "new-" prefix.
|
* TODO: when the old filmstrip has been removed, remove the "new-" prefix.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -19,20 +19,6 @@
|
||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.use-new-toolbox {
|
|
||||||
/**
|
|
||||||
* Adjust the height of the filmstrip as the toolbar is displayed.
|
|
||||||
*/
|
|
||||||
.filmstrip {
|
|
||||||
top: 0;
|
|
||||||
transition: height .3s ease-in;
|
|
||||||
|
|
||||||
&.reduce-height {
|
|
||||||
height: calc(100% - #{$newToolbarSizeWithPadding});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.filmstrip {
|
.filmstrip {
|
||||||
align-items: flex-end;
|
align-items: flex-end;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
@ -46,8 +32,17 @@
|
||||||
* any parent is also fixed.
|
* any parent is also fixed.
|
||||||
*/
|
*/
|
||||||
position: fixed;
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
transition: height .3s ease-in;
|
||||||
z-index: $filmstripVideosZ;
|
z-index: $filmstripVideosZ;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adjust the height of the filmstrip as the toolbar is displayed.
|
||||||
|
*/
|
||||||
|
&.reduce-height {
|
||||||
|
height: calc(100% - #{$newToolbarSizeWithPadding});
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Hide videos by making them slight to the right.
|
* Hide videos by making them slight to the right.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -31,6 +31,7 @@
|
||||||
/* Modules BEGIN */
|
/* Modules BEGIN */
|
||||||
|
|
||||||
@import 'aui_reset';
|
@import 'aui_reset';
|
||||||
|
@import 'atlaskit_overrides';
|
||||||
@import 'base';
|
@import 'base';
|
||||||
@import 'utils';
|
@import 'utils';
|
||||||
@import 'overlay/overlay';
|
@import 'overlay/overlay';
|
||||||
|
|
|
@ -1,10 +1,7 @@
|
||||||
.use-new-toolbox {
|
|
||||||
font-size: 14px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.info-dialog {
|
.info-dialog {
|
||||||
cursor: default;
|
cursor: default;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
font-size: 14px;
|
||||||
|
|
||||||
.info-dialog-action-link {
|
.info-dialog-action-link {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
|
|
@ -319,12 +319,6 @@ UI.start = function() {
|
||||||
|
|
||||||
// Initialize side panels
|
// Initialize side panels
|
||||||
SidePanels.init(eventEmitter);
|
SidePanels.init(eventEmitter);
|
||||||
|
|
||||||
// TODO: remove this class once the old toolbar has been removed. This
|
|
||||||
// class is set so that any CSS changes needed to adjust elements
|
|
||||||
// outside of the new toolbar can be scoped to just the app with the new
|
|
||||||
// toolbar enabled.
|
|
||||||
$('body').addClass('use-new-toolbox');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
interfaceConfig.VERTICAL_FILMSTRIP
|
interfaceConfig.VERTICAL_FILMSTRIP
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
/* @flow */
|
/* @flow */
|
||||||
|
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import PropTypes from 'prop-types';
|
|
||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
|
|
||||||
|
@ -13,13 +12,40 @@ import Toolbar from './Toolbar';
|
||||||
|
|
||||||
declare var interfaceConfig: Object;
|
declare var interfaceConfig: Object;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The type of the React {@code Component} props of {@link Filmstrip}.
|
||||||
|
*/
|
||||||
|
type Props = {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Additional CSS class names top add to the root.
|
||||||
|
*/
|
||||||
|
_className: string,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether the UI/UX is filmstrip-only.
|
||||||
|
*/
|
||||||
|
_filmstripOnly: boolean,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether or not remote videos are currently being hovered over. Hover
|
||||||
|
* handling is currently being handled detected outside of react.
|
||||||
|
*/
|
||||||
|
_hovered: boolean,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The redux {@code dispatch} function.
|
||||||
|
*/
|
||||||
|
dispatch: Dispatch<*>
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implements a React {@link Component} which represents the filmstrip on
|
* Implements a React {@link Component} which represents the filmstrip on
|
||||||
* Web/React.
|
* Web/React.
|
||||||
*
|
*
|
||||||
* @extends Component
|
* @extends Component
|
||||||
*/
|
*/
|
||||||
class Filmstrip extends Component<*> {
|
class Filmstrip extends Component <Props> {
|
||||||
_isHovered: boolean;
|
_isHovered: boolean;
|
||||||
|
|
||||||
_notifyOfHoveredStateUpdate: Function;
|
_notifyOfHoveredStateUpdate: Function;
|
||||||
|
@ -28,47 +54,13 @@ class Filmstrip extends Component<*> {
|
||||||
|
|
||||||
_onMouseOver: Function;
|
_onMouseOver: Function;
|
||||||
|
|
||||||
/**
|
|
||||||
* {@code Filmstrip} component's property types.
|
|
||||||
*
|
|
||||||
* @static
|
|
||||||
*/
|
|
||||||
static propTypes = {
|
|
||||||
/**
|
|
||||||
* Whether the UI/UX is filmstrip-only.
|
|
||||||
*/
|
|
||||||
_filmstripOnly: PropTypes.bool,
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Whether or not remote videos are currently being hovered over.
|
|
||||||
*/
|
|
||||||
_hovered: PropTypes.bool,
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Whether or not the remote videos should be visible. Will toggle
|
|
||||||
* a class for hiding the videos.
|
|
||||||
*/
|
|
||||||
_remoteVideosVisible: PropTypes.bool,
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Whether or not the toolbox is visible. The height of the vertical
|
|
||||||
* filmstrip needs to adjust to accommodate the horizontal toolbox.
|
|
||||||
*/
|
|
||||||
_toolboxVisible: PropTypes.bool,
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The redux {@code dispatch} function.
|
|
||||||
*/
|
|
||||||
dispatch: PropTypes.func
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initializes a new {@code Filmstrip} instance.
|
* Initializes a new {@code Filmstrip} instance.
|
||||||
*
|
*
|
||||||
* @param {Object} props - The read-only properties with which the new
|
* @param {Object} props - The read-only properties with which the new
|
||||||
* instance is to be initialized.
|
* instance is to be initialized.
|
||||||
*/
|
*/
|
||||||
constructor(props) {
|
constructor(props: Props) {
|
||||||
super(props);
|
super(props);
|
||||||
|
|
||||||
// Debounce the method for dispatching the new filmstrip handled state
|
// Debounce the method for dispatching the new filmstrip handled state
|
||||||
|
@ -95,28 +87,16 @@ class Filmstrip extends Component<*> {
|
||||||
* @returns {ReactElement}
|
* @returns {ReactElement}
|
||||||
*/
|
*/
|
||||||
render() {
|
render() {
|
||||||
const {
|
|
||||||
_filmstripOnly,
|
|
||||||
_remoteVideosVisible,
|
|
||||||
_toolboxVisible
|
|
||||||
} = this.props;
|
|
||||||
|
|
||||||
// Note: Appending of {@code RemoteVideo} views is handled through
|
// Note: Appending of {@code RemoteVideo} views is handled through
|
||||||
// VideoLayout. The views do not get blown away on render() because
|
// VideoLayout. The views do not get blown away on render() because
|
||||||
// ReactDOMComponent is only aware of the given JSX and not new appended
|
// ReactDOMComponent is only aware of the given JSX and not new appended
|
||||||
// DOM. As such, when updateDOMProperties gets called, only attributes
|
// DOM. As such, when updateDOMProperties gets called, only attributes
|
||||||
// will get updated without replacing the DOM. If the known DOM gets
|
// will get updated without replacing the DOM. If the known DOM gets
|
||||||
// modified, then the views will get blown away.
|
// modified, then the views will get blown away.
|
||||||
const reduceHeight
|
|
||||||
= _toolboxVisible && interfaceConfig.TOOLBAR_BUTTONS.length;
|
|
||||||
const classNames
|
|
||||||
= `filmstrip ${
|
|
||||||
_remoteVideosVisible ? '' : 'hide-videos'} ${
|
|
||||||
reduceHeight ? 'reduce-height' : ''}`;
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className = { classNames }>
|
<div className = { `filmstrip ${this.props._className}` }>
|
||||||
{ _filmstripOnly && <Toolbar /> }
|
{ this.props._filmstripOnly && <Toolbar /> }
|
||||||
<div
|
<div
|
||||||
className = 'filmstrip__videos'
|
className = 'filmstrip__videos'
|
||||||
id = 'remoteVideos'>
|
id = 'remoteVideos'>
|
||||||
|
@ -191,20 +171,26 @@ class Filmstrip extends Component<*> {
|
||||||
* @param {Object} state - The Redux state.
|
* @param {Object} state - The Redux state.
|
||||||
* @private
|
* @private
|
||||||
* @returns {{
|
* @returns {{
|
||||||
* _filmstripOnly: boolean,
|
* _className: string,
|
||||||
* _hovered: boolean,
|
* _hovered: boolean,
|
||||||
* _remoteVideosVisible: boolean,
|
* _filmstripOnly: boolean
|
||||||
* _toolboxVisible: boolean
|
|
||||||
* }}
|
* }}
|
||||||
*/
|
*/
|
||||||
function _mapStateToProps(state) {
|
function _mapStateToProps(state) {
|
||||||
const { hovered } = state['features/filmstrip'];
|
const { hovered } = state['features/filmstrip'];
|
||||||
|
const isFilmstripOnly = Boolean(interfaceConfig.filmStripOnly);
|
||||||
|
const reduceHeight = !isFilmstripOnly
|
||||||
|
&& state['features/toolbox'].visible
|
||||||
|
&& interfaceConfig.TOOLBAR_BUTTONS.length;
|
||||||
|
const remoteVideosVisible = shouldRemoteVideosBeVisible(state);
|
||||||
|
|
||||||
|
const className = `${remoteVideosVisible ? '' : 'hide-videos'} ${
|
||||||
|
reduceHeight ? 'reduce-height' : ''}`;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
_filmstripOnly: Boolean(interfaceConfig.filmStripOnly),
|
_className: className,
|
||||||
_hovered: hovered,
|
_filmstripOnly: isFilmstripOnly,
|
||||||
_remoteVideosVisible: shouldRemoteVideosBeVisible(state),
|
_hovered: hovered
|
||||||
_toolboxVisible: state['features/toolbox'].visible
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue