hippo-fw 0.9.5 → 0.9.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (151) hide show
  1. checksums.yaml +4 -4
  2. data/.nvmrc +2 -0
  3. data/.travis.yml +1 -1
  4. data/client/hippo/access/login-dialog.jsx +3 -5
  5. data/client/hippo/boot.jsx +2 -2
  6. data/client/hippo/components/asset.jsx +0 -1
  7. data/client/hippo/components/data-list.jsx +16 -15
  8. data/client/hippo/components/data-list/data-list.scss +10 -0
  9. data/client/hippo/components/data-table.jsx +14 -14
  10. data/client/hippo/components/data-table/header-cell.jsx +0 -1
  11. data/client/hippo/components/data-table/table-styles.scss +7 -0
  12. data/client/hippo/components/date-time.jsx +19 -16
  13. data/client/hippo/components/date-time/calendar.jsx +5 -7
  14. data/client/hippo/components/date-time/date-time-drop.jsx +0 -2
  15. data/client/hippo/components/date-time/time.jsx +0 -1
  16. data/client/hippo/components/form.jsx +1 -1
  17. data/client/hippo/components/form/{model.js → api.js} +25 -7
  18. data/client/hippo/components/form/fields.jsx +12 -11
  19. data/client/hippo/components/form/fields/date-wrapper.jsx +1 -1
  20. data/client/hippo/components/form/fields/form-field.scss +9 -1
  21. data/client/hippo/components/form/fields/label.jsx +14 -0
  22. data/client/hippo/components/form/fields/select-wrapper.jsx +2 -3
  23. data/client/hippo/components/form/wrapper.jsx +1 -3
  24. data/client/hippo/components/icon.jsx +2 -69
  25. data/client/hippo/components/master-detail.jsx +0 -2
  26. data/client/hippo/components/network-activity-overlay.jsx +1 -4
  27. data/client/hippo/components/query-builder.jsx +15 -16
  28. data/client/hippo/components/record-finder.jsx +2 -5
  29. data/client/hippo/components/record-finder/query-layer.jsx +1 -5
  30. data/client/hippo/components/screen.jsx +7 -3
  31. data/client/hippo/components/text-editor.jsx +2 -8
  32. data/client/hippo/components/tool-tip.jsx +2 -3
  33. data/client/hippo/components/warning-notification.jsx +3 -3
  34. data/client/hippo/lib/date-range.js +28 -0
  35. data/client/hippo/lib/util.js +6 -0
  36. data/client/hippo/models/asset.js +6 -3
  37. data/client/hippo/models/config.js +1 -1
  38. data/client/hippo/models/pub_sub.js +12 -7
  39. data/client/hippo/models/pub_sub/channel.js +6 -4
  40. data/client/hippo/models/query.js +19 -4
  41. data/client/hippo/models/query/array-result.js +9 -8
  42. data/client/hippo/models/query/clause.js +21 -13
  43. data/client/hippo/models/query/field.js +7 -2
  44. data/client/hippo/models/query/info.js +7 -3
  45. data/client/hippo/models/sync.js +11 -14
  46. data/client/hippo/react/Root.jsx +1 -2
  47. data/client/hippo/react/{DefaultComponentNotFound.jsx → component-not-found.jsx} +1 -3
  48. data/client/hippo/screens/index.js +6 -2
  49. data/client/hippo/screens/system-settings.jsx +10 -6
  50. data/client/hippo/screens/system-settings/mailer-config.jsx +0 -2
  51. data/client/hippo/screens/system-settings/tenant.jsx +1 -4
  52. data/client/hippo/screens/user-management.jsx +0 -1
  53. data/client/hippo/screens/user-management/edit-form.jsx +1 -2
  54. data/client/hippo/workspace/index.jsx +21 -12
  55. data/client/hippo/workspace/menu-group.jsx +4 -7
  56. data/client/hippo/workspace/menu-option.jsx +1 -3
  57. data/client/hippo/workspace/menu.jsx +29 -11
  58. data/client/hippo/workspace/navbar.jsx +1 -2
  59. data/client/hippo/workspace/root-view.jsx +5 -2
  60. data/client/hippo/workspace/screen.jsx +2 -3
  61. data/client/hippo/workspace/styles.scss +17 -0
  62. data/command-reference-files/screen/client/appy-app/screens/ready-set-go.jsx +2 -1
  63. data/db/migrate/20170530120004_create_users.rb +1 -1
  64. data/hippo-fw.gemspec +3 -2
  65. data/lib/hippo/api/cable.rb +13 -13
  66. data/lib/hippo/api/controller_base.rb +1 -0
  67. data/lib/hippo/api/handlers/tenant.rb +1 -1
  68. data/lib/hippo/api/handlers/user_session.rb +2 -1
  69. data/lib/hippo/api/helper_methods.rb +4 -1
  70. data/lib/hippo/api/pub_sub.rb +7 -6
  71. data/lib/hippo/api/to_json.rb +1 -1
  72. data/lib/hippo/api/updates.rb +2 -0
  73. data/lib/hippo/command/console.rb +11 -3
  74. data/lib/hippo/command/jest.rb +2 -0
  75. data/lib/hippo/configuration.rb +4 -7
  76. data/lib/hippo/rake_tasks.rb +1 -1
  77. data/lib/hippo/screen.rb +31 -93
  78. data/lib/hippo/screen/definition.rb +76 -0
  79. data/lib/hippo/screen/group.rb +26 -0
  80. data/lib/hippo/spec_helper.rb +3 -0
  81. data/lib/hippo/system_settings.rb +6 -0
  82. data/lib/hippo/user.rb +11 -3
  83. data/lib/hippo/version.rb +1 -1
  84. data/package-lock.json +419 -533
  85. data/package.json +32 -30
  86. data/spec/client/access/login-dialog.spec.jsx +4 -5
  87. data/spec/client/components/__snapshots__/query-builder.spec.jsx.snap +1 -1
  88. data/spec/client/components/__snapshots__/record-finder.spec.jsx.snap +72 -0
  89. data/spec/client/components/asset.spec.jsx +2 -6
  90. data/spec/client/components/data-list.spec.jsx +2 -6
  91. data/spec/client/components/data-table.spec.jsx +3 -5
  92. data/spec/client/components/date-time.spec.jsx +1 -1
  93. data/spec/client/components/form.spec.jsx +2 -2
  94. data/spec/client/components/master-detail.spec.jsx +1 -2
  95. data/spec/client/components/network-activity-overlay.spec.jsx +2 -3
  96. data/spec/client/components/query-builder.spec.jsx +3 -6
  97. data/spec/client/components/record-finder.spec.jsx +4 -4
  98. data/spec/client/models/pub_sub.spec.js +3 -1
  99. data/spec/client/models/query.spec.js +4 -9
  100. data/spec/client/screens/system-settings-tenants.spec.jsx +1 -1
  101. data/spec/client/screens/system-settings.spec.jsx +1 -4
  102. data/spec/client/workspace/__snapshots__/menu.spec.jsx.snap +15 -20
  103. data/spec/client/workspace/menu.spec.jsx +1 -2
  104. data/spec/server/api/user_sessions_spec.rb +15 -0
  105. data/templates/client/screens/screen.jsx +2 -1
  106. data/views/hippo_root_view.erb +1 -0
  107. metadata +30 -52
  108. data/client/hippo/components/calendar/Calendar.jsx +0 -25
  109. data/client/hippo/components/calendar/index.js +0 -3
  110. data/client/hippo/components/calendar/styles.scss +0 -3
  111. data/client/hippo/components/shared/AssetsListing.jsx +0 -23
  112. data/client/hippo/components/shared/Checkbox.jsx +0 -49
  113. data/client/hippo/components/shared/CountBadge.jsx +0 -13
  114. data/client/hippo/components/shared/DateTime.jsx +0 -58
  115. data/client/hippo/components/shared/DisplayValue.jsx +0 -15
  116. data/client/hippo/components/shared/ErrorDisplay.jsx +0 -37
  117. data/client/hippo/components/shared/FieldMixin.jsx +0 -254
  118. data/client/hippo/components/shared/FieldSet.jsx +0 -52
  119. data/client/hippo/components/shared/FieldWrapper.jsx +0 -94
  120. data/client/hippo/components/shared/FormGroup.jsx +0 -41
  121. data/client/hippo/components/shared/GenericField.jsx +0 -7
  122. data/client/hippo/components/shared/IconButton.jsx +0 -13
  123. data/client/hippo/components/shared/ImageAsset.jsx +0 -78
  124. data/client/hippo/components/shared/IndeterminateCheckbox.jsx +0 -31
  125. data/client/hippo/components/shared/Input.jsx +0 -16
  126. data/client/hippo/components/shared/InputFieldMixin.jsx +0 -78
  127. data/client/hippo/components/shared/JobProgress.jsx +0 -46
  128. data/client/hippo/components/shared/NumberInput.jsx +0 -37
  129. data/client/hippo/components/shared/PanelHeader.jsx +0 -15
  130. data/client/hippo/components/shared/RadioField.jsx +0 -33
  131. data/client/hippo/components/shared/ResizeSensor.jsx +0 -18
  132. data/client/hippo/components/shared/ScreenWrapper.jsx +0 -17
  133. data/client/hippo/components/shared/TextArea.jsx +0 -19
  134. data/client/hippo/components/shared/Throbber.jsx +0 -8
  135. data/client/hippo/components/shared/ToggleField.jsx +0 -2
  136. data/client/hippo/components/shared/Tooltip.jsx +0 -23
  137. data/client/hippo/components/shared/fields.scss +0 -58
  138. data/client/hippo/components/shared/fieldset.scss +0 -27
  139. data/client/hippo/components/shared/image-asset.scss +0 -53
  140. data/client/hippo/components/shared/index.js +0 -5
  141. data/client/hippo/components/shared/overlay.scss +0 -83
  142. data/client/hippo/components/shared/resize-sensor.scss +0 -30
  143. data/client/hippo/components/shared/styles.scss +0 -64
  144. data/client/hippo/components/shared/throbber.scss +0 -53
  145. data/client/hippo/fonts/fontawesome-webfont.woff +0 -0
  146. data/client/hippo/fonts/fontawesome-webfont.woff2 +0 -0
  147. data/client/hippo/workspace/content.jsx +0 -22
  148. data/client/hippo/workspace/tabs.jsx +0 -60
  149. data/client/hippo/workspace/viewport.jsx +0 -82
  150. data/spec/client/screens/__snapshots__/tabs.spec.jsx.snap +0 -127
  151. data/spec/client/screens/tabs.spec.jsx +0 -36
@@ -3,14 +3,13 @@ import React from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
 
5
5
  export default class Root extends React.Component {
6
-
7
6
  static childContextTypes = {
8
7
  viewport: PropTypes.object,
9
8
  }
10
9
 
11
10
  getChildContext() {
12
11
  return (
13
- {viewport: this.props.viewport}
12
+ { viewport: this.props.viewport }
14
13
  );
15
14
  }
16
15
 
@@ -3,8 +3,7 @@ import PropTypes from 'prop-types';
3
3
  import { get } from 'lodash';
4
4
  import { classify } from '../lib/util';
5
5
 
6
- export default class DefaultComponentNotFound extends React.Component {
7
-
6
+ export default class ComponentNotFound extends React.PureComponent {
8
7
  static propTypes = {
9
8
  extension: PropTypes.shape({
10
9
  identifier: PropTypes.string,
@@ -19,5 +18,4 @@ export default class DefaultComponentNotFound extends React.Component {
19
18
  </div>
20
19
  );
21
20
  }
22
-
23
21
  }
@@ -1,5 +1,5 @@
1
1
  import { observable, computed } from 'mobx';
2
- import { map, filter, intersection } from 'lodash';
2
+ import { map, filter, compact, intersection } from 'lodash';
3
3
  import Group from './group';
4
4
  import Config from '../config';
5
5
 
@@ -14,7 +14,11 @@ const Screens = observable({
14
14
  },
15
15
 
16
16
  @computed get active() {
17
- return map(Config.screen_ids, id => this.all.get(id));
17
+ return compact(map(Config.screen_ids, id => this.all.get(id)));
18
+ },
19
+
20
+ @computed get unGrouped() {
21
+ return filter(this.active, s => !s.group_id);
18
22
  },
19
23
 
20
24
  reset() {
@@ -1,8 +1,8 @@
1
1
  import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
- import { observable, action, computed } from 'mobx';
3
+ import { observable, action } from 'mobx';
4
4
  import { observer } from 'mobx-react';
5
- import { map, compact, invoke, each } from 'lodash';
5
+ import { map, compact, invoke } from 'lodash';
6
6
  import Heading from 'grommet/components/Heading';
7
7
  import Header from 'grommet/components/Header';
8
8
  import Button from 'grommet/components/Button';
@@ -12,7 +12,7 @@ import Screen from 'hippo/components/screen';
12
12
  import Asset from 'hippo/components/asset';
13
13
  import Settings from 'hippo/models/system-setting';
14
14
 
15
- import {Row, Col} from 'react-flexbox-grid';
15
+ import { Row, Col } from 'react-flexbox-grid';
16
16
  import ScreenInstance from 'hippo/screens/instance';
17
17
  import Extensions from '../extensions';
18
18
  import MailerConfig from './system-settings/mailer-config';
@@ -21,7 +21,6 @@ import './system-settings/system-settings.scss';
21
21
 
22
22
  @observer
23
23
  export default class SystemSettings extends React.PureComponent {
24
-
25
24
  @observable settings = new Settings();
26
25
  extensionPanelRefs = new Map();
27
26
 
@@ -56,10 +55,15 @@ export default class SystemSettings extends React.PureComponent {
56
55
  @action.bound
57
56
  onSave() {
58
57
  this.extensionPanelRefs.forEach(panel => invoke(panel, 'onSave'));
59
- this.tenantSettings.onSave()
58
+ this.tenantSettings.onSave();
60
59
  this.settings.save();
61
60
  }
62
61
 
62
+ @action.bound
63
+ setTenantRef(ts) {
64
+ this.tenantSettings = ts;
65
+ }
66
+
63
67
  render() {
64
68
  return (
65
69
  <Screen {...this.props}>
@@ -72,7 +76,7 @@ export default class SystemSettings extends React.PureComponent {
72
76
  />
73
77
  </Header>
74
78
  <Heading>{this.props.screen.definition.title}</Heading>
75
- <TenantSettings ref={ts => this.tenantSettings = ts} />
79
+ <TenantSettings ref={this.setTenantRef} />
76
80
  <Heading tag="h3">Images</Heading>
77
81
  <Row>
78
82
  <Col sm={4} xs={12}>
@@ -8,7 +8,6 @@ import { Form, Field, FormState, nonBlank, validEmail } from 'hippo/components/
8
8
 
9
9
  @observer
10
10
  export default class MailerConfig extends React.PureComponent {
11
-
12
11
  formState = new FormState()
13
12
 
14
13
  @action.bound
@@ -40,5 +39,4 @@ export default class MailerConfig extends React.PureComponent {
40
39
  </div>
41
40
  );
42
41
  }
43
-
44
42
  }
@@ -1,14 +1,12 @@
1
1
  import React from 'react';
2
- import PropTypes from 'prop-types';
3
2
  import { observer } from 'mobx-react';
4
3
  import { observable } from 'mobx';
5
- import { Row, Col } from 'react-flexbox-grid';
4
+ import { Row } from 'react-flexbox-grid';
6
5
  import Heading from 'grommet/components/Heading';
7
6
  import Box from 'grommet/components/Box';
8
7
  import { Form, Field, FormState, nonBlank } from 'hippo/components/form';
9
8
 
10
9
  import Notification from 'grommet/components/Notification';
11
- import Extensions from '../../extensions';
12
10
  import Layer from 'grommet/components/Layer';
13
11
  import Paragraph from 'grommet/components/Paragraph';
14
12
  import Anchor from 'grommet/components/Anchor';
@@ -36,7 +34,6 @@ function TenantSlugChange({ oldSlug }) {
36
34
 
37
35
  @observer
38
36
  export default class TenantConfig extends React.PureComponent {
39
-
40
37
  formState = new FormState()
41
38
 
42
39
  @observable slugChangedFrom;
@@ -15,7 +15,6 @@ import Editor from './user-management/edit-form';
15
15
 
16
16
  @observer
17
17
  export default class UserManagement extends React.PureComponent {
18
-
19
18
  @observable editingId;
20
19
 
21
20
  static contextTypes = {
@@ -11,11 +11,10 @@ import Warning from 'hippo/components/warning-notification';
11
11
 
12
12
  import Query from 'hippo/models/query';
13
13
 
14
- import { Form, Field, FormState, nonBlank, validEmail, booleanValue, field } from 'hippo/components/form';
14
+ import { Form, Field, FormState, nonBlank, validEmail, booleanValue } from 'hippo/components/form';
15
15
 
16
16
  @observer
17
17
  export default class EditForm extends React.PureComponent {
18
-
19
18
  static propTypes = {
20
19
  query: PropTypes.instanceOf(Query).isRequired,
21
20
  rowIndex: PropTypes.number.isRequired,
@@ -2,19 +2,18 @@ import React from 'react';
2
2
 
3
3
  import { action, observable } from 'mobx';
4
4
  import { observer } from 'mobx-react';
5
- import { bindAll } from 'lodash';
5
+ import cn from 'classnames';
6
6
  import {
7
7
  BrowserRouter as Router,
8
8
  Route,
9
9
  Switch,
10
10
  } from 'react-router-dom';
11
-
12
-
13
11
  import App from 'grommet/components/App';
14
12
  import Sidebar from 'react-sidebar';
15
13
  import 'hippo/config-data';
16
14
  import 'hippo/screen-definitions';
17
-
15
+ import Button from 'grommet/components/Button';
16
+ import CirclePlayIcon from 'grommet/components/icons/base/CirclePlay';
18
17
  import Extensions from '../extensions';
19
18
  import Menu from './menu';
20
19
  import Screen from './screen';
@@ -36,13 +35,11 @@ function NoMatch({ match: { path } }) {
36
35
 
37
36
  @observer
38
37
  class Workspace extends React.Component {
39
-
40
38
  @observable sidebarOpen = true;
41
39
  @observable sidebarDocked = false;
42
40
 
43
41
  constructor() {
44
42
  super();
45
- bindAll(this, 'onMediaQueryChanged', 'onSetSidebarOpen');
46
43
  this.mql = window.matchMedia(`(min-width: ${DOCKED_WIDTH_BREAKPOINT}px)`);
47
44
  this.mql.addListener(this.onMediaQueryChanged);
48
45
  this.onMediaQueryChanged();
@@ -52,28 +49,40 @@ class Workspace extends React.Component {
52
49
  this.mql.removeListener(this.onMediaQueryChanged);
53
50
  }
54
51
 
55
- @action
52
+ @action.bound
56
53
  onMediaQueryChanged() {
57
54
  this.sidebarDocked = this.mql.matches;
58
55
  }
59
56
 
60
- @action
57
+ @action.bound
61
58
  onSetSidebarOpen(open) {
62
59
  this.sidebarOpen = open;
63
60
  }
61
+
62
+ @action.bound
63
+ toggleSidebarDocked() {
64
+ this.sidebarOpen = !this.sidebarOpen;
65
+ }
66
+
64
67
  render() {
65
68
  return (
66
- <App
67
- centered={false}
68
- >
69
+ <App centered={false}>
69
70
  <LoginDialog />
70
71
  <Sidebar
71
72
  styles={{ sidebar: { zIndex: 5 } }}
72
- sidebar={<Menu />}
73
+ sidebar={<Menu onDockToggle={this.toggleSidebarDocked} />}
73
74
  open={this.sidebarOpen}
74
75
  docked={this.sidebarDocked}
75
76
  onSetOpen={this.onSetSidebarOpen}
76
77
  >
78
+
79
+ <Button
80
+ primary
81
+ icon={<CirclePlayIcon />}
82
+ onClick={this.toggleSidebarDocked}
83
+ className={cn('sidebar-toggle', { 'is-open': this.sidebarOpen })}
84
+ />
85
+
77
86
  <Switch>
78
87
  <Route name='screen' path="/:screenId/:identifier?" component={Screen} />
79
88
  <Route component={NoMatch} />
@@ -1,19 +1,16 @@
1
1
  import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
- import classnames from 'classnames';
4
- import { bindAll } from 'lodash';
5
3
  import { observer } from 'mobx-react';
6
4
 
7
5
  import Heading from 'grommet/components/Heading';
8
6
  import Header from 'grommet/components/Header';
7
+ import Menu from 'grommet/components/Menu';
9
8
 
10
9
  import MenuOption from './menu-option';
11
- import Menu from 'grommet/components/Menu';
12
- import Icon from '../components/icon';
10
+ import Icon from '../components/icon';
13
11
 
14
12
  @observer
15
- export default class Group extends React.Component {
16
-
13
+ export default class Group extends React.PureComponent {
17
14
  static propTypes = {
18
15
  group: PropTypes.shape({
19
16
  active: PropTypes.bool.isRequired,
@@ -29,7 +26,7 @@ export default class Group extends React.Component {
29
26
  <Header align="end" pad={{ horizontal: 'medium' }}>
30
27
  <Heading tag="h4" strong>
31
28
  {group.title}
32
- <Icon type={group.icon} />
29
+ <Icon name={group.icon} />
33
30
  </Heading>
34
31
  </Header>
35
32
  {group.screens.map(s => <MenuOption key={s.id} screen={s} />)}
@@ -10,7 +10,6 @@ import Anchor from 'grommet/components/Anchor';
10
10
 
11
11
  @observer
12
12
  export default class MenuOption extends React.Component {
13
-
14
13
  static propTypes = {
15
14
  screen: PropTypes.shape({
16
15
  title: PropTypes.string.isRequired,
@@ -33,9 +32,8 @@ export default class MenuOption extends React.Component {
33
32
  return (
34
33
  <Anchor path={`/${screen.id}/`} onClick={this.activateScreen}>
35
34
  {screen.title}
36
- <Icon type={screen.icon} />
35
+ <Icon name={screen.icon} />
37
36
  </Anchor>
38
37
  );
39
38
  }
40
39
  }
41
- //<div>{screen.title}</div>
@@ -1,21 +1,22 @@
1
1
  import React from 'react';
2
2
  import { observer } from 'mobx-react';
3
3
  import { action } from 'mobx';
4
+ import { isEmpty, get } from 'lodash';
4
5
  import PropTypes from 'prop-types';
6
+ import Box from 'grommet/components/Box';
5
7
  import Sidebar from 'grommet/components/Sidebar';
6
8
  import Header from 'grommet/components/Header';
7
9
  import Anchor from 'grommet/components/Anchor';
8
10
  import Menu from 'grommet/components/Menu';
9
11
  import Group from './menu-group';
10
12
  import Screens from '../screens';
11
-
12
-
13
+ import MenuOption from './menu-option';
13
14
  import User from '../user';
15
+ import Config from '../config';
16
+ import Asset from '../models/asset';
14
17
 
15
18
  @observer
16
19
  class Logout extends React.PureComponent {
17
-
18
-
19
20
  static contextTypes = {
20
21
  router: PropTypes.object,
21
22
  }
@@ -32,19 +33,37 @@ class Logout extends React.PureComponent {
32
33
  if (!User.isLoggedIn) { return null; }
33
34
  return (
34
35
  <Menu direction="column" align="start" justify="between" primary>
35
- <Header align="end" pad={{ horizontal: 'medium' }}>
36
- </Header>
37
36
  <Anchor label="Log Out" onClick={this.onLogoutClick}>
38
37
  Log Out
39
38
  </Anchor>
40
39
  </Menu>
41
40
  );
42
41
  }
43
-
44
42
  }
45
43
 
44
+
45
+ const Logo = observer(() => {
46
+ if (!get(Config, 'logo.thumbnail')) {
47
+ if (!isEmpty(Config.product_name)) {
48
+ return <Box className="product-name">{Config.product_name}</Box>;
49
+ }
50
+ return null;
51
+ }
52
+ return (
53
+ <Box className="logo"><img src={Asset.urlForSize(Config.logo, 'thumbnail')} /></Box>
54
+ );
55
+ });
56
+
46
57
  @observer
47
- export default class WorkspaceMenu extends React.Component {
58
+ export default class WorkspaceMenu extends React.PureComponent {
59
+ renderUnGrouped() {
60
+ if (!User.isLoggedIn || isEmpty(Screens.unGrouped)) { return null; }
61
+ return (
62
+ <Menu direction="column" align="start" justify="between" primary>
63
+ {Screens.unGrouped.map(s => <MenuOption key={s.id} screen={s} />)}
64
+ </Menu>
65
+ );
66
+ }
48
67
 
49
68
  render() {
50
69
  return (
@@ -53,12 +72,11 @@ export default class WorkspaceMenu extends React.Component {
53
72
  colorIndex="brand"
54
73
  >
55
74
  <Header justify="between" size="large" pad={{ horizontal: 'medium' }}>
56
- Logo
75
+ <Logo />
57
76
  </Header>
58
77
  {Screens.activeGroups.map(g => <Group key={g.id} group={g} />)}
59
-
78
+ {this.renderUnGrouped()}
60
79
  <Logout />
61
-
62
80
  </Sidebar>
63
81
  );
64
82
  }
@@ -13,7 +13,6 @@ function Logo() {
13
13
  }
14
14
 
15
15
  export default class Navbar extends React.Component {
16
-
17
16
  static contextTypes = {
18
17
  uistate: PropTypes.object.isRequired,
19
18
  }
@@ -36,7 +35,7 @@ export default class Navbar extends React.Component {
36
35
  <button className="screens-menu-toggle" onClick={this.switchMenu} type="button">
37
36
  <span className="sr-only">
38
37
  Toggle navbar
39
- </span>
38
+ </span>
40
39
  <i className="icon" />
41
40
  </button>
42
41
  </div>
@@ -1,10 +1,13 @@
1
- import React from 'react';
1
+ import React from 'react'; // eslint-disable-line no-unused-vars
2
2
 
3
3
  export default function RootView() {
4
4
  return (
5
5
  <div className="fancy-header">
6
6
  <h1>Welcome to the Hippo Framework</h1>
7
- <p>This is the default root view. You can change it by returning a different one from the rootView() method in the the extension.js file.</p>
7
+ <p>
8
+ This is the default root view. You can change it by returning a
9
+ different one from the rootView() method in the the extension.js file.
10
+ </p>
8
11
  </div>
9
12
  );
10
13
  }
@@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
3
3
  import { observer } from 'mobx-react';
4
4
  import Box from 'grommet/components/Box';
5
5
  import Screens from '../screens';
6
- import ScreenInstances from '../screens/instance';
6
+ import { displaying } from '../screens/instance';
7
7
 
8
8
  const ScreenView = observer((props) => {
9
9
  const { screen: Screen, ...rest } = props;
@@ -15,7 +15,6 @@ ScreenView.displayName = 'ScreenView';
15
15
 
16
16
  @observer
17
17
  export default class Screen extends React.Component {
18
-
19
18
  static propTypes = {
20
19
  match: PropTypes.shape({
21
20
  params: PropTypes.shape({
@@ -41,7 +40,7 @@ export default class Screen extends React.Component {
41
40
  align="stretch"
42
41
  flex="grow"
43
42
  >
44
- {ScreenInstances.displaying.map(s =>
43
+ {displaying.models.map(s =>
45
44
  <ScreenView key={s.id} {...this.props.match.params} screen={s} />)}
46
45
  </Box>
47
46