-
Notifications
You must be signed in to change notification settings - Fork 11
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
[DRAFT]- Elizabeth/cord poc #605
Conversation
superset/message_threads/models.py
Outdated
class MessageThread(Model): | ||
table_name = "message_threads" | ||
id = Column(Integer, primary_key=True) | ||
user_id = Column(Integer, ForeignKey("ab_user.id"), nullable=False) |
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.
remove this
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.
user_id = Column(Integer, ForeignKey("ab_user.id"), nullable=False) |
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.
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #605 +/- ##
===========================================
- Coverage 68.89% 58.50% -10.39%
===========================================
Files 1906 1909 +3
Lines 74628 74762 +134
Branches 8208 8206 -2
===========================================
- Hits 51412 43742 -7670
- Misses 21086 28891 +7805
+ Partials 2130 2129 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
op.create_table( | ||
"message_threads", | ||
sa.Column("id", sa.Integer(), nullable=False), | ||
sa.Column("user_id", sa.Integer(), nullable=False), |
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.
sa.Column("user_id", sa.Integer(), nullable=False), |
chart_id=self._chart_id, | ||
dashboard_id=self._dashboard_id, | ||
) | ||
return thread |
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.
we may need to return a flag if this is new so that the client side knows to generate a new thread on the cord side.
7ce6542
to
dbbfda5
Compare
@@ -373,6 +424,29 @@ const SliceHeaderControls = (props: SliceHeaderControlsPropsWithRouter) => { | |||
? t('Exit fullscreen') | |||
: t('Enter fullscreen'); | |||
|
|||
const [threadListId, setthreadListId] = useState<string | null>(null); | |||
const [threadIsOpen, setThreadIsOpen] = useState<boolean>(false); | |||
const [selectedThreadID, setSelectedThreadID] = useState<string | null>(null); |
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.
@kgabryje I had originally intended for this UUID to be for a thread, not a threadList, so that's why the naming is a bit wonky.
default=lambda o: {key: value for key, value in o.__dict__.items() if value}, | ||
indent=4, | ||
allow_nan=False, | ||
) |
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.
the above code is all from Cord's python sdk file. We may not need it, but I left it here in case you wanted it for anything.
# the existing auth_token if it exists | ||
return get_client_auth_token( | ||
app_id="<todo>", | ||
secret="<todo>", |
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.
you'll want to update this on your local implementation.
user_uuid = Column(String(255), nullable=False, default=uuid.uuid4) | ||
expires_at = Column(Integer, nullable=False) | ||
|
||
def __init__(self, user_id, workspace_name, auth_token, expires_at, user_uuid): |
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 doesn't persist to the db, but is used in just setting up an instance of the model for the api
logger = logging.getLogger(__name__) | ||
|
||
|
||
class MessageThreadDAO(BaseDAO[MessageThread]): |
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.
these MessageThreads are actually all going to be ThreadList components now.. this was my earlier naming. @Antonio-RiveroMartnez
|
||
# not sure if we also need this check | ||
dashboard = ( | ||
db.session.query(Dashboard).filter(Dashboard.id == dashboard_id).first() |
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.
per the discussion, not sure if we want to persist this or not.
dashboard_id = Column(Integer, ForeignKey("dashboards.id"), nullable=True) | ||
chart_id = Column(Integer, ForeignKey("slices.id"), nullable=True) | ||
uuid = Column(String(36), unique=True, nullable=False, default=uuid.uuid4) | ||
workspace_name = Column(String(255), nullable=False) |
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.
we don't need workspace name any more
dbbfda5
to
8795ab4
Compare
SUMMARY
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION