From 1842d07fc3842e8a203ba1ba0f2e350b31643ddc Mon Sep 17 00:00:00 2001 From: martin bedouret Date: Wed, 5 Feb 2020 17:26:08 -0300 Subject: [PATCH 1/3] initial commit --- src/components/App/App.reducer.js | 3 +- src/components/Board/Board.component.js | 6 +++- src/components/Board/Board.css | 20 +++++------ .../Settings/Display/Display.component.js | 36 +++++++++++++++++-- .../Settings/Display/Display.messages.js | 8 +++++ 5 files changed, 57 insertions(+), 16 deletions(-) diff --git a/src/components/App/App.reducer.js b/src/components/App/App.reducer.js index 8995d3ee4..47b88d357 100644 --- a/src/components/App/App.reducer.js +++ b/src/components/App/App.reducer.js @@ -13,7 +13,8 @@ const initialState = { isFirstVisit: true, displaySettings: { uiSize: DISPLAY_SIZE_STANDARD, - fontSize: DISPLAY_SIZE_STANDARD + fontSize: DISPLAY_SIZE_STANDARD, + hideOutputActive: false }, navigationSettings: { active: false, diff --git a/src/components/Board/Board.component.js b/src/components/Board/Board.component.js index 0cbcd96f9..a4f2451df 100644 --- a/src/components/Board/Board.component.js +++ b/src/components/Board/Board.component.js @@ -238,7 +238,11 @@ export class Board extends Component { })} > -
+
diff --git a/src/components/Board/Board.css b/src/components/Board/Board.css index 5d274684d..3a128d5f7 100644 --- a/src/components/Board/Board.css +++ b/src/components/Board/Board.css @@ -1,9 +1,10 @@ .Board { height: 100%; + overflow-y: hidden; } .Board__output { - position: fixed; + position: relative; top: 0; right: 0; width: 100%; @@ -11,13 +12,16 @@ z-index: 1; } +.hidden { + display: none; +} + .Board__output button[class*='MuiButtonBase-'].scanner__focused { outline: 4px solid rgba(255, 0, 0, 1); } .Board__navbar { - position: fixed; - top: 112px; + position: relative; right: 0; width: 100%; z-index: 3; @@ -33,17 +37,12 @@ .Board__edit-toolbar, .Board__communicator-toolbar { - position: fixed; - top: 160px; + position: relative; right: 0; width: 100%; z-index: 4; } -.Board__edit-toolbar { - top: 200px; -} - .is-locked .Board__edit-toolbar, .is-locked .Board__communicator-toolbar { display: none; @@ -51,7 +50,6 @@ .Board__tiles { position: relative; - top: 160px; height: calc(100% - 160px); background: #fff; direction: ltr; /* for grid */ @@ -61,7 +59,7 @@ } .Board__tiles .Grid { - margin-top: 80px; + margin-top: 0px; } .is-locked .Board__tiles .Grid { diff --git a/src/components/Settings/Display/Display.component.js b/src/components/Settings/Display/Display.component.js index 9186c6861..d81c57c87 100644 --- a/src/components/Settings/Display/Display.component.js +++ b/src/components/Settings/Display/Display.component.js @@ -1,6 +1,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import { FormattedMessage } from 'react-intl'; +import Switch from '@material-ui/core/Switch'; import Paper from '@material-ui/core/Paper'; import List from '@material-ui/core/List'; import ListItem from '@material-ui/core/ListItem'; @@ -19,6 +20,15 @@ import { DISPLAY_SIZE_EXTRALARGE } from './Display.constants'; +const propTypes = { + /** + * Callback fired when clicking the back button + */ + onClose: PropTypes.func, + displaySettings: PropTypes.object.isRequired, + updateDisplaySettings: PropTypes.func.isRequired +}; + class Display extends React.Component { constructor(props) { super(props); @@ -28,6 +38,12 @@ class Display extends React.Component { }; } + toggleHideOutput = () => { + this.setState({ + hideOutputActive: !this.state.hideOutputActive + }); + }; + onDisplaySettingsChange(displaySetting, event) { const { target: { value } @@ -101,6 +117,22 @@ class Display extends React.Component { {this.renderRadioGroup('fontSize')} + + } + secondary={ + + } + /> + + + + @@ -108,8 +140,6 @@ class Display extends React.Component { } } -Display.propTypes = { - displaySettings: PropTypes.object.isRequired -}; +Display.propTypes = propTypes; export default Display; diff --git a/src/components/Settings/Display/Display.messages.js b/src/components/Settings/Display/Display.messages.js index 5b6589f80..a600ed229 100644 --- a/src/components/Settings/Display/Display.messages.js +++ b/src/components/Settings/Display/Display.messages.js @@ -37,5 +37,13 @@ export default defineMessages({ fontSizeSecondary: { id: 'cboard.components.Settings.Display.fontSizeSecondary', defaultMessage: 'App font size' + }, + outputHide: { + id: 'cboard.components.Settings.Navigation.outputHide', + defaultMessage: 'Hide the output bar' + }, + outputHideSecondary: { + id: 'cboard.components.Settings.Navigation.outputHideSecondary', + defaultMessage: 'Hides the white bar on the top where you build a sentence.' } }); From 2c6d78fdcb176aa2ca668e402bdc5ea148a68bd7 Mon Sep 17 00:00:00 2001 From: martin bedouret Date: Wed, 5 Feb 2020 20:48:26 -0300 Subject: [PATCH 2/3] initial version --- src/components/Board/Board.component.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/Board/Board.component.js b/src/components/Board/Board.component.js index a4f2451df..888c86979 100644 --- a/src/components/Board/Board.component.js +++ b/src/components/Board/Board.component.js @@ -77,7 +77,8 @@ export class Board extends Component { static defaultProps = { displaySettings: { - uiSize: 'Standard' + uiSize: 'Standard', + hideOutputActive: false }, navigationSettings: {}, scannerSettings: { active: false, delay: 2000, strategy: 'automatic' }, @@ -240,7 +241,7 @@ export class Board extends Component {
From d11a7fd5d1b7adf5058bbfd02eef71ddebb74e68 Mon Sep 17 00:00:00 2001 From: martin bedouret Date: Thu, 6 Feb 2020 01:17:25 -0300 Subject: [PATCH 3/3] initial version --- src/components/Board/Board.css | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/components/Board/Board.css b/src/components/Board/Board.css index 3a128d5f7..890b3b068 100644 --- a/src/components/Board/Board.css +++ b/src/components/Board/Board.css @@ -1,6 +1,8 @@ .Board { height: 100%; overflow-y: hidden; + display: flex; + flex-direction: column; } .Board__output { @@ -24,7 +26,7 @@ position: relative; right: 0; width: 100%; - z-index: 3; + z-index: 2; } .Board__loading { @@ -40,7 +42,7 @@ position: relative; right: 0; width: 100%; - z-index: 4; + z-index: 3; } .is-locked .Board__edit-toolbar, @@ -50,7 +52,9 @@ .Board__tiles { position: relative; - height: calc(100% - 160px); + height: 100%; + z-index: 4; + flex: 1; background: #fff; direction: ltr; /* for grid */ overflow-x: hidden;