-
Notifications
You must be signed in to change notification settings - Fork 13.9k
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
Conversation
faves: PropTypes.array | ||
}; | ||
|
||
const defaultProps = { |
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.
need to replace these default props with real data.
import React, { PropTypes } from 'react'; | ||
|
||
const propTypes = { | ||
faves: PropTypes.array |
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.
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""" |
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.
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 |
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.
faves
returns an array with json with u
s 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?
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.
can you point me in the right direction here @mistercrunch?
todo
plz review @mistercrunch @bkyryliuk @vera-liu @elibrumbaugh
there are some open questions so would love your feedback. thx!