Skip to content

Conversation

rueckstiess
Copy link
Contributor

@rueckstiess rueckstiess commented Oct 31, 2016

Some larger refactors in this PR:

  • move TabNavBar to internal-packages/app (use this as shared components home for now)
  • give TabNavBar a dark and light theme
  • create a internal-packages/database package, with a single tab "Collections" and a CollectionsTable view
  • Change navigation structure so that ./src/app/home maintains the state for navigating between all main views (i.e. not "Connect")
  • make databases clickable in sidebar and navigate to new Database view.

Current state: Collections are in a table but InstanceStore doesn't actually contain most information required at this level, e.g. size of each collection. This only happens once we click on a collection. So we need to go and fetch all that info in the store (async.parallel ?)

screen shot 2016-10-31 at 22 47 11

const React = require('react');
const app = require('ampersand-app');
const CollectionsActions = require('../actions/collections-actions');
const SortableTable = app.appRegistry.getComponent('App.SortableTable');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you move this into the contructor please? See: https://github.com/10gen/compass/blob/master/src/internal-packages/server-stats/lib/component/databases-table.jsx#L17

The only reason this does work is that the app package is loaded before the database package but the order in which packages are loaded will never be guaranteed and should not be depended on.

@durran
Copy link
Member

durran commented Nov 1, 2016

Just the one thing to address from me then LGTM. If you guys can't get to it today then I'll take care of it.

@durran durran force-pushed the COMPASS-80-collections-table branch from bd9d95d to 095e3d4 Compare November 1, 2016 06:56
@durran
Copy link
Member

durran commented Nov 1, 2016

I fixed my own comments, rebased, and pushed the fixes. However...

Was this intentional? The zero state for me is no longer showing the database list.

screen shot 2016-11-01 at 7 56 19 am

@rueckstiess
Copy link
Contributor Author

@durran, this latest rebase + force push messed up my local branch. Could you add the following line in ./src/app/home/index.js at the end of the render() method?

this.switchMainContent('');

That will cause the zero state to go to the "empty" namespace, which is the instance level.

@durran durran merged commit 84c3d62 into master Nov 1, 2016
@durran durran deleted the COMPASS-80-collections-table branch November 1, 2016 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants