From ca1a4b309676c3d10473acf4869b398d4ed50fb7 Mon Sep 17 00:00:00 2001 From: sdtsui Date: Sun, 30 Jul 2017 20:42:12 -0700 Subject: Add layout for main container elements --- ui/app/main-container.js | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 ui/app/main-container.js (limited to 'ui/app/main-container.js') diff --git a/ui/app/main-container.js b/ui/app/main-container.js new file mode 100644 index 000000000..ca68ba6b0 --- /dev/null +++ b/ui/app/main-container.js @@ -0,0 +1,41 @@ +const Component = require('react').Component +const h = require('react-hyperscript') +const inherits = require('util').inherits + +module.exports = MainContainer + +inherits(MainContainer, Component) +function MainContainer () { + Component.call(this) +} + +MainContainer.prototype.render = function () { + console.log("rendering MainContainer..."); + return h('div.flex-row', { + style: { + position: 'absolute', + marginTop: '6vh', + width: '98%', + zIndex: 20, + } + }, [ + h('div.wallet-view', { + style: { + flexGrow: 1, + height: '82vh', + background: 'blue', + } + }, [ + ]), + + h('div.tx-view', { + style: { + flexGrow: 2, + height: '82vh', + background: 'green', + } + }, [ + ]), + ]) +} + -- cgit From cbd53d4601f1af5aa4337e86ea8875606406e803 Mon Sep 17 00:00:00 2001 From: sdtsui Date: Sun, 30 Jul 2017 21:25:32 -0700 Subject: Add containers for wallet view and dropdown UI --- ui/app/main-container.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ui/app/main-container.js') diff --git a/ui/app/main-container.js b/ui/app/main-container.js index ca68ba6b0..c1f7db0d8 100644 --- a/ui/app/main-container.js +++ b/ui/app/main-container.js @@ -1,6 +1,7 @@ const Component = require('react').Component const h = require('react-hyperscript') const inherits = require('util').inherits +const WalletView = require('./components/wallet-view') module.exports = MainContainer @@ -19,11 +20,10 @@ MainContainer.prototype.render = function () { zIndex: 20, } }, [ - h('div.wallet-view', { + h(WalletView, { style: { flexGrow: 1, height: '82vh', - background: 'blue', } }, [ ]), @@ -32,7 +32,7 @@ MainContainer.prototype.render = function () { style: { flexGrow: 2, height: '82vh', - background: 'green', + background: '#FFFFFF', } }, [ ]), -- cgit From 4cdfd00f58082a26b8835a7c17ed4c964ec24c9e Mon Sep 17 00:00:00 2001 From: sdtsui Date: Sun, 30 Jul 2017 21:35:27 -0700 Subject: Add box shadow to main container --- ui/app/main-container.js | 1 + 1 file changed, 1 insertion(+) (limited to 'ui/app/main-container.js') diff --git a/ui/app/main-container.js b/ui/app/main-container.js index c1f7db0d8..f64009539 100644 --- a/ui/app/main-container.js +++ b/ui/app/main-container.js @@ -18,6 +18,7 @@ MainContainer.prototype.render = function () { marginTop: '6vh', width: '98%', zIndex: 20, + boxShadow: '0 0 7px 0 rgba(0,0,0,0.08)', } }, [ h(WalletView, { -- cgit From 0ca50dfb1b990dadc702b178fad7e6434b71167a Mon Sep 17 00:00:00 2001 From: sdtsui Date: Sun, 30 Jul 2017 21:53:13 -0700 Subject: Center account name and dropdowns --- ui/app/main-container.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ui/app/main-container.js') diff --git a/ui/app/main-container.js b/ui/app/main-container.js index f64009539..f891402ac 100644 --- a/ui/app/main-container.js +++ b/ui/app/main-container.js @@ -23,15 +23,15 @@ MainContainer.prototype.render = function () { }, [ h(WalletView, { style: { - flexGrow: 1, - height: '82vh', + // width: '33.33%', + // height: '82vh', } }, [ ]), h('div.tx-view', { style: { - flexGrow: 2, + width: '66.66%', height: '82vh', background: '#FFFFFF', } -- cgit From 2d5c3394f493868a2eb5706e8b42127252c9b746 Mon Sep 17 00:00:00 2001 From: sdtsui Date: Mon, 31 Jul 2017 20:46:56 -0700 Subject: Use DIN OT in wallet view --- ui/app/main-container.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ui/app/main-container.js') diff --git a/ui/app/main-container.js b/ui/app/main-container.js index f891402ac..cc61860b6 100644 --- a/ui/app/main-container.js +++ b/ui/app/main-container.js @@ -11,7 +11,7 @@ function MainContainer () { } MainContainer.prototype.render = function () { - console.log("rendering MainContainer..."); + return h('div.flex-row', { style: { position: 'absolute', @@ -19,6 +19,7 @@ MainContainer.prototype.render = function () { width: '98%', zIndex: 20, boxShadow: '0 0 7px 0 rgba(0,0,0,0.08)', + fontFamily: 'DIN OT', } }, [ h(WalletView, { -- cgit From c876428044c8e6eec300ceeb0d7ab0c44e68f8d3 Mon Sep 17 00:00:00 2001 From: sdtsui Date: Mon, 31 Jul 2017 21:16:07 -0700 Subject: Add TxView, use width percentages instead of flex-grow for layout --- ui/app/main-container.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'ui/app/main-container.js') diff --git a/ui/app/main-container.js b/ui/app/main-container.js index cc61860b6..88028f8eb 100644 --- a/ui/app/main-container.js +++ b/ui/app/main-container.js @@ -2,6 +2,7 @@ const Component = require('react').Component const h = require('react-hyperscript') const inherits = require('util').inherits const WalletView = require('./components/wallet-view') +const TxView = require('./components/tx-view') module.exports = MainContainer @@ -20,6 +21,7 @@ MainContainer.prototype.render = function () { zIndex: 20, boxShadow: '0 0 7px 0 rgba(0,0,0,0.08)', fontFamily: 'DIN OT', + display: 'flex', } }, [ h(WalletView, { @@ -30,11 +32,12 @@ MainContainer.prototype.render = function () { }, [ ]), - h('div.tx-view', { + h(TxView, { style: { - width: '66.66%', - height: '82vh', - background: '#FFFFFF', + // flexGrow: 2 + // width: '66.66%', + // height: '82vh', + // background: '#FFFFFF', } }, [ ]), -- cgit From a7fc5126502a9c69aaa727178997ea4ed703c2d6 Mon Sep 17 00:00:00 2001 From: sdtsui Date: Mon, 31 Jul 2017 23:07:58 -0700 Subject: Implement mobile-friendly responsive layout with flex wrap --- ui/app/main-container.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'ui/app/main-container.js') diff --git a/ui/app/main-container.js b/ui/app/main-container.js index 88028f8eb..ae62a0e0c 100644 --- a/ui/app/main-container.js +++ b/ui/app/main-container.js @@ -13,7 +13,7 @@ function MainContainer () { MainContainer.prototype.render = function () { - return h('div.flex-row', { + return h('div', { style: { position: 'absolute', marginTop: '6vh', @@ -22,6 +22,9 @@ MainContainer.prototype.render = function () { boxShadow: '0 0 7px 0 rgba(0,0,0,0.08)', fontFamily: 'DIN OT', display: 'flex', + flexWrap: 'wrap', + alignItems: 'stretch', + overflowY: 'scroll', } }, [ h(WalletView, { -- cgit From 41c585c796a9049c2413036e7b23bf07330daa82 Mon Sep 17 00:00:00 2001 From: sdtsui Date: Wed, 2 Aug 2017 12:18:29 -0700 Subject: Make wallet view visible iff vw above 575px --- ui/app/main-container.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'ui/app/main-container.js') diff --git a/ui/app/main-container.js b/ui/app/main-container.js index ae62a0e0c..592f331b5 100644 --- a/ui/app/main-container.js +++ b/ui/app/main-container.js @@ -27,10 +27,9 @@ MainContainer.prototype.render = function () { overflowY: 'scroll', } }, [ + h(WalletView, { style: { - // width: '33.33%', - // height: '82vh', } }, [ ]), -- cgit From 7767f9f7ad7321d88a0b738d2c272961cc1ce286 Mon Sep 17 00:00:00 2001 From: sdtsui Date: Wed, 2 Aug 2017 13:03:36 -0700 Subject: Hook up responsive sidebar --- ui/app/main-container.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'ui/app/main-container.js') diff --git a/ui/app/main-container.js b/ui/app/main-container.js index 592f331b5..fb768c386 100644 --- a/ui/app/main-container.js +++ b/ui/app/main-container.js @@ -3,6 +3,7 @@ const h = require('react-hyperscript') const inherits = require('util').inherits const WalletView = require('./components/wallet-view') const TxView = require('./components/tx-view') +const SlideoutMenu = require('react-burger-menu').slide module.exports = MainContainer @@ -28,9 +29,18 @@ MainContainer.prototype.render = function () { } }, [ + h(SlideoutMenu, { + isOpen: true, + }, [ + h(WalletView, { + responsiveDisplayClassname: '.phone-visible' + }), + ]), + h(WalletView, { style: { - } + }, + responsiveDisplayClassname: '.lap-visible', }, [ ]), -- cgit From dfa10763e36f745d82fb62adc4ac42773d266da4 Mon Sep 17 00:00:00 2001 From: sdtsui Date: Wed, 2 Aug 2017 13:32:02 -0700 Subject: Integrate slideout menu with tx view --- ui/app/main-container.js | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'ui/app/main-container.js') diff --git a/ui/app/main-container.js b/ui/app/main-container.js index fb768c386..870b3e7f0 100644 --- a/ui/app/main-container.js +++ b/ui/app/main-container.js @@ -1,8 +1,8 @@ const Component = require('react').Component const h = require('react-hyperscript') const inherits = require('util').inherits -const WalletView = require('./components/wallet-view') const TxView = require('./components/tx-view') +const WalletView = require('./components/wallet-view') const SlideoutMenu = require('react-burger-menu').slide module.exports = MainContainer @@ -29,14 +29,6 @@ MainContainer.prototype.render = function () { } }, [ - h(SlideoutMenu, { - isOpen: true, - }, [ - h(WalletView, { - responsiveDisplayClassname: '.phone-visible' - }), - ]), - h(WalletView, { style: { }, -- cgit From 41250f9769d3224e0b42821058cd6445fa7efaca Mon Sep 17 00:00:00 2001 From: sdtsui Date: Wed, 2 Aug 2017 19:48:33 -0700 Subject: Adjust header spacing for 500px and 900px heights --- ui/app/main-container.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ui/app/main-container.js') diff --git a/ui/app/main-container.js b/ui/app/main-container.js index 870b3e7f0..62a8bdb7b 100644 --- a/ui/app/main-container.js +++ b/ui/app/main-container.js @@ -17,7 +17,7 @@ MainContainer.prototype.render = function () { return h('div', { style: { position: 'absolute', - marginTop: '6vh', + marginTop: '35px', width: '98%', zIndex: 20, boxShadow: '0 0 7px 0 rgba(0,0,0,0.08)', -- cgit From b70a399faa30c478ffffb5607cfe36001745adc7 Mon Sep 17 00:00:00 2001 From: sdtsui Date: Wed, 2 Aug 2017 21:53:40 -0700 Subject: Isolate container component, add refactor notes --- ui/app/main-container.js | 37 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 19 deletions(-) (limited to 'ui/app/main-container.js') diff --git a/ui/app/main-container.js b/ui/app/main-container.js index 62a8bdb7b..5194c2343 100644 --- a/ui/app/main-container.js +++ b/ui/app/main-container.js @@ -4,6 +4,7 @@ const inherits = require('util').inherits const TxView = require('./components/tx-view') const WalletView = require('./components/wallet-view') const SlideoutMenu = require('react-burger-menu').slide +const AccountAndTransactionDetails = require('./account-and-transaction-details') module.exports = MainContainer @@ -14,6 +15,22 @@ function MainContainer () { MainContainer.prototype.render = function () { + // 1. Fixing Mobile View: flush container + // media query for mobile view: + // position: absolute; + // margin-top: 35px; + // width: 100%; + // + // 2. Fix responsive sizing - smaller + // https://puu.sh/x0gDA/5ff3b734eb.png + // + // 3. summarize: + // switch statement goes inside MainContainer, + // or a method in renderPrimary + // - pass resulting h() to MainContainer + // - error checking in separate func + // - router in separate func + return h('div', { style: { position: 'absolute', @@ -27,24 +44,6 @@ MainContainer.prototype.render = function () { alignItems: 'stretch', overflowY: 'scroll', } - }, [ - - h(WalletView, { - style: { - }, - responsiveDisplayClassname: '.lap-visible', - }, [ - ]), - - h(TxView, { - style: { - // flexGrow: 2 - // width: '66.66%', - // height: '82vh', - // background: '#FFFFFF', - } - }, [ - ]), - ]) + }, [h(AccountAndTransactionDetails, {}, [])]) } -- cgit From ff7ba83a6c62abb42c0141d4cd5a53a7870a9199 Mon Sep 17 00:00:00 2001 From: sdtsui Date: Wed, 2 Aug 2017 22:09:12 -0700 Subject: Add note for styling buttons --- ui/app/main-container.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'ui/app/main-container.js') diff --git a/ui/app/main-container.js b/ui/app/main-container.js index 5194c2343..84d8c5435 100644 --- a/ui/app/main-container.js +++ b/ui/app/main-container.js @@ -30,6 +30,8 @@ MainContainer.prototype.render = function () { // - pass resulting h() to MainContainer // - error checking in separate func // - router in separate func + // + // 4. style all buttons as