Skip to content
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

--WIP-- add faves/starred things to /welcome #1169

Closed
wants to merge 9 commits into from
Closed

--WIP-- add faves/starred things to /welcome #1169

wants to merge 9 commits into from

Conversation

ascott
Copy link
Contributor

@ascott ascott commented Sep 22, 2016

  • adds starred slices and dashboards to the welcome page.
  • adds placeholder for search bar
  • split view 50/50 with all dashboards and starred things

screenshot 2016-09-22 00 39 38

todo

  • get real starred data, replace dummy data
  • query dashboard/slice model for name once we have starred id's

plz review @mistercrunch @bkyryliuk @vera-liu @elibrumbaugh
there are some open questions so would love your feedback. thx!

faves: PropTypes.array
};

const defaultProps = {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

need to replace these default props with real data.

import React, { PropTypes } from 'react';

const propTypes = {
faves: PropTypes.array
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this should be PropTypes.array.isRequired

@@ -1918,6 +1918,14 @@ class FavStar(Model):
obj_id = Column(Integer)
dttm = Column(DateTime, default=func.now())

"""todo(alanna) - return name of slice or dashboard with these props"""
Copy link
Contributor Author

Choose a reason for hiding this comment

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

what's the best way to query each starred item for it's name?

return self.render_template(
'caravel/welcome.html',
utils=utils,
faves=faves
Copy link
Contributor Author

@ascott ascott Sep 22, 2016

Choose a reason for hiding this comment

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

faves returns an array with json with us prepended to the name. [{u'class_name': u'Dashboard', u'user_id': 1, u'obj_id': 2}, {u'class_name': u'Dashboard', u'user_id': 1, u'obj_id': 1}]

need to figure out how to fix this. do we have a pattern for sending model data to the view as json?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

can you point me in the right direction here @mistercrunch?

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.

1 participant