diff --git a/internal_packages/account-sidebar/lib/account-sidebar.cjsx b/internal_packages/account-sidebar/lib/account-sidebar.cjsx index 8ffd4f681..7cc5a480f 100644 --- a/internal_packages/account-sidebar/lib/account-sidebar.cjsx +++ b/internal_packages/account-sidebar/lib/account-sidebar.cjsx @@ -29,7 +29,7 @@ AccountSidebar = React.createClass _sections: -> return @state.sections.map (section) => -
+
{@_itemComponents(section)}
diff --git a/internal_packages/search-bar/lib/search-bar.cjsx b/internal_packages/search-bar/lib/search-bar.cjsx index f235109f9..657b0c253 100644 --- a/internal_packages/search-bar/lib/search-bar.cjsx +++ b/internal_packages/search-bar/lib/search-bar.cjsx @@ -6,6 +6,7 @@ _ = require 'underscore-plus' module.exports = SearchBar = React.createClass + displayName: 'SearchBar' getInitialState: -> query: "" @@ -30,6 +31,7 @@ SearchBar = React.createClass headerComponents = [
] diff --git a/src/sheet-container.cjsx b/src/sheet-container.cjsx index 7a5fb443b..e759769fb 100644 --- a/src/sheet-container.cjsx +++ b/src/sheet-container.cjsx @@ -7,6 +7,7 @@ ReactCSSTransitionGroup = React.addons.CSSTransitionGroup ToolbarSpacer = React.createClass + className: 'ToolbarSpacer' propTypes: order: React.PropTypes.number @@ -15,6 +16,7 @@ ToolbarSpacer = React.createClass Toolbar = React.createClass + className: 'Toolbar' propTypes: type: React.PropTypes.string @@ -44,7 +46,8 @@ Toolbar = React.createClass columnToolbars = @state.itemsForViews.map ({column, name, items}) =>
+ data-column={column} + key={column}> {@_flexboxForItems(items)}
@@ -54,13 +57,13 @@ Toolbar = React.createClass _flexboxForItems: (items) -> - components = items.map (item) => - + components = items.map ({view, name}) => + {components} - - + + recomputeLayout: -> @@ -83,13 +86,13 @@ Toolbar = React.createClass _getComponentRegistryState: -> items = [] - items.push(ComponentRegistry.findAllViewsByRole("Global:Toolbar")...) - items.push(ComponentRegistry.findAllViewsByRole("#{@props.type}:Toolbar")...) + items.push(ComponentRegistry.findAllByRole("Global:Toolbar")...) + items.push(ComponentRegistry.findAllByRole("#{@props.type}:Toolbar")...) itemsForViews = [] for column in ['Left', 'Right', 'Center'] for {view, name} in ComponentRegistry.findAllByRole("#{@props.type}:#{column}") - itemsForView = ComponentRegistry.findAllViewsByRole("#{name}:Toolbar") + itemsForView = ComponentRegistry.findAllByRole("#{name}:Toolbar") if itemsForView.length > 0 itemsForViews.push({column, name, items: itemsForView}) @@ -97,6 +100,7 @@ Toolbar = React.createClass FlexboxForRoles = React.createClass + className: 'FlexboxForRoles' propTypes: roles: React.PropTypes.arrayOf(React.PropTypes.string) @@ -111,8 +115,8 @@ FlexboxForRoles = React.createClass @unlistener() if @unlistener render: -> - components = @state.items.map (item) => - + components = @state.items.map ({view, name}) => + {components} @@ -121,11 +125,12 @@ FlexboxForRoles = React.createClass _getComponentRegistryState: -> items = [] for role in @props.roles - items = items.concat(ComponentRegistry.findAllViewsByRole(role)) + items = items.concat(ComponentRegistry.findAllByRole(role)) {items} module.exports = SheetContainer = React.createClass + className: 'SheetContainer' getInitialState: -> @_getStateFromStores() diff --git a/src/sheet.cjsx b/src/sheet.cjsx index 711dc55f6..ed6cff6c3 100644 --- a/src/sheet.cjsx +++ b/src/sheet.cjsx @@ -45,7 +45,7 @@ Sheet = React.createClass _backButtonComponent: -> return [] if @props.depth is 0 -
+
Back
@@ -54,16 +54,17 @@ Sheet = React.createClass classes = @state[column] || [] return if classes.length is 0 - components = classes.map (c) => + components = classes.map ({name, view}) => - maxWidth = _.reduce classes, ((m,c) -> Math.min(c.maxWidth ? 10000, m)), 10000 - minWidth = _.reduce classes, ((m,c) -> Math.max(c.minWidth ? 0, m)), 0 + maxWidth = _.reduce classes, ((m,{view}) -> Math.min(view.maxWidth ? 10000, m)), 10000 + minWidth = _.reduce classes, ((m,{view}) -> Math.max(view.minWidth ? 0, m)), 0 resizable = minWidth != maxWidth && column != 'Center' if resizable if column is 'Left' then handle = ResizableRegion.Handle.Right if column is 'Right' then handle = ResizableRegion.Handle.Left - else @@ -84,7 +86,7 @@ Sheet = React.createClass _getComponentRegistryState: -> state = {} for column in @props.columns - state["#{column}"] = ComponentRegistry.findAllViewsByRole("#{@props.type}:#{column}") + state["#{column}"] = ComponentRegistry.findAllByRole("#{@props.type}:#{column}") state _pop: ->