Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(filmstrip-only): vertically align center the toolbar #1700

Merged
merged 2 commits into from
Jul 6, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion css/_filmstrip.scss
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@
&__videos-filmstripOnly {
margin-top: auto;
margin-bottom: auto;
padding-right: $defaultFilmStripOnlyToolbarSize;
}

.remote-videos-container {
Expand Down
11 changes: 8 additions & 3 deletions css/_toolbars.scss
Original file line number Diff line number Diff line change
Expand Up @@ -195,11 +195,8 @@
*/
&_filmstrip-only {
border-radius: 3px;
bottom: 0;
display: inline-block;
height: auto;
position: absolute;
right: 0;
width: $defaultFilmStripOnlyToolbarSize;

.button {
Expand Down Expand Up @@ -228,6 +225,14 @@
}
}

.filmstrip-only {
.toolbox,
.toolbox-toolbars {
align-items: center;
display: flex;
}
}

.subject {
background: linear-gradient(to bottom, rgba(255,255,255,.85) , rgba(255,255,255,.35));
border-bottom-left-radius: 12px;
Expand Down
23 changes: 23 additions & 0 deletions css/_vertical_filmstrip_overrides.scss
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,29 @@
}
}

&.filmstrip-only {
.filmstrip {
flex-direction: row-reverse;
}
.filmstrip__videos-filmstripOnly {
height: 100%;
}

/**
* In filmstrip only mode, the toolbar is normally displayed in the
* vertical center of the filmstrip strip. In vertical filmstrip mode,
* that alignment makes the toolbar appear floating and detached from
* the filmstrip. So, instead anchor the toolbar next to the local
* video.
*/
.toolbar_filmstrip-only {
bottom: 0;
top: auto;
transform: none;
}

}

/**
* These styles are for the video labels that display on the top right. The
* styles adjust the labels' positioning as the filmstrip itself or
Expand Down
7 changes: 5 additions & 2 deletions react/features/conference/components/Conference.web.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { HideNotificationBarStyle } from '../../unsupported-browser';

declare var $: Function;
declare var APP: Object;
declare var interfaceConfig: Object;

/**
* The conference page of the Web application.
Expand Down Expand Up @@ -65,14 +66,16 @@ class Conference extends Component {
* @returns {ReactElement}
*/
render() {
const { filmStripOnly } = interfaceConfig;

return (
<div id = 'videoconference_page'>
<div id = 'videospace'>
<LargeVideo />
<Filmstrip />
<Filmstrip displayToolbox = { filmStripOnly } />
</div>

<Toolbox />
{ filmStripOnly ? null : <Toolbox /> }

<DialogContainer />
<OverlayContainer />
Expand Down
10 changes: 10 additions & 0 deletions react/features/filmstrip/components/Filmstrip.web.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,22 @@

import React, { Component } from 'react';

import { Toolbox } from '../../toolbox';

/**
* Implements a React {@link Component} which represents the filmstrip on
* Web/React.
*
* @extends Component
*/
export default class Filmstrip extends Component {
static propTypes = {
/**
* Whether or not the toolbox should be displayed within the filmstrip.
*/
displayToolbox: React.PropTypes.bool
};

/**
* Implements React's {@link Component#render()}.
*
Expand All @@ -18,6 +27,7 @@ export default class Filmstrip extends Component {
render() {
return (
<div className = 'filmstrip'>
{ this.props.displayToolbox ? <Toolbox /> : null }
<div
className = 'filmstrip__videos'
id = 'remoteVideos'>
Expand Down
4 changes: 2 additions & 2 deletions react/features/toolbox/components/Toolbox.web.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ class Toolbox extends Component {
*/
render(): ReactElement<*> {
return (
<div>
<div className = 'toolbox'>
{
this._renderSubject()
}
Expand Down Expand Up @@ -171,7 +171,7 @@ class Toolbox extends Component {
}

return (
<div>
<div className = 'toolbox-toolbars'>
<Notice />
<PrimaryToolbar />
<SecondaryToolbar />
Expand Down