-
Notifications
You must be signed in to change notification settings - Fork 3
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
Feature/use grid layout #25
Changes from all commits
dc023a3
885d1cc
38f5ec9
2cc3948
faa74f3
c930b90
79307e7
a56fb57
713a326
395eb43
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
// Items should not be rearranged as the order has implications | ||
@import "foundation/components/global"; | ||
@import "foundation/components/type"; | ||
@import "foundation/components/grid"; | ||
@import "foundation/components/side-nav"; | ||
@import "foundation/components/buttons"; | ||
@import "foundation/components/panels"; | ||
@import "foundation/components/icon-bar"; | ||
@import "foundation/components/visibility"; |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,4 +6,10 @@ $include-html-global-classes: true; | |
|
||
// this is used for Headers | ||
$include-html-type-classes: true; | ||
$include-html-grid-classes: true; | ||
|
||
$include-html-grid-classes: false; | ||
|
||
// this is used as extensions for sass-based styles | ||
$include-html-visibility-classes: true; | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 |
||
$include-html-icon-bar-classes: true; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
@import "foundation/functions"; | ||
|
||
$row-width: rem-calc(1000); | ||
$row-width: 1000px; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 1000px is a requirement from design guys? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes |
||
$total-columns: 20; | ||
$column-gutter: rem-calc(0); |
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
'use strict'; | ||
|
||
var React = require('react'), | ||
Link = require('react-router').Link, | ||
StyleMixin = require('mixins/style-mixin'); | ||
|
||
var Navigation = React.createClass({ | ||
mixins: [StyleMixin(require("./style.scss"))], | ||
render: function () { | ||
// TODO: Use mixins instead of CSS classes | ||
// TODO: Pass number of elements to mixin instead of specifying class name | ||
var classes = "cc_navigation icon-bar two-up " + this.props.orientation; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Classes |
||
|
||
var items = this.props.items.map(function (item, i) { | ||
return ( | ||
<Link to={item.linkTo} key={i} className="cc_navigation__link item"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. class There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we need key here? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes. The answer is the same as to the same question you did recently. It's needed by react: https://coderwall.com/p/jdybeq/the-importance-of-component-keys-in-react-js There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @larsblumberg two comments:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not defining the |
||
<label>{item.title}</label> | ||
</Link> | ||
); | ||
}); | ||
|
||
return ( | ||
<div className={classes}> | ||
{items} | ||
</div> | ||
); | ||
} | ||
}); | ||
|
||
module.exports = Navigation; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
@import "theme"; | ||
|
||
.cc_navigation { | ||
@include icon-bar(); | ||
|
||
.cc_navigation__link { | ||
// .active is applied to selected link by foundation automatically | ||
&.active { | ||
font-weight: bold; | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
'use strict'; | ||
var React = require('react'); | ||
var StyleMixin = require('mixins/style-mixin'); | ||
|
||
var Device = React.createClass({ | ||
mixins: [StyleMixin(require('./style.scss'))], | ||
render: function () { | ||
return ( | ||
<div className="cc-devices__device row"> | ||
<div className="cc-devices__device--title small-6 column">{this.props.device.title}</div> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shouldn't we move small-6 to mixin? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is NOT a part of template scope - it should be addressed when dealing with |
||
<div className="cc-devices__device--type small-6 column">{this.props.device.type}</div> | ||
<div className="cc-devices__device--control small-4 column">Control</div> | ||
<div className="cc-devices__device--state small-4 column">{this.props.device.state}</div> | ||
</div> | ||
); | ||
} | ||
}); | ||
|
||
module.exports = Device; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
@import "theme"; | ||
|
||
.cc-devices { | ||
.cc-devices__device { | ||
.cc-devices__device--title { | ||
font-weight: bold; | ||
|
||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
'use strict'; | ||
|
||
var React = require('react'); | ||
var Device = require('screens/main/devices/device/index'); | ||
var Device = require('../device'); | ||
|
||
require('./style.scss'); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why StyleMixin isn't used here? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. was not part of the PR, we worked on the main screen and navigation bar. This could be done by a separate PR |
||
|
||
var Room = React.createClass({ | ||
render: function () { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You decided to get rid of subrouting for now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, there's currently no need for it. Can be added if necessary
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, anyway we do know how it works.