-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Build message threads #3593
Build message threads #3593
Conversation
c10516f
to
cf081ee
Compare
cf081ee
to
986b0dc
Compare
} else { | ||
setIsOpenedMessage(id); | ||
} | ||
}; |
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.
Should I build a hook useThreadMessage ? Or is it acceptable to keep that logic in the component?
986b0dc
to
dd68e85
Compare
dd68e85
to
258c269
Compare
packages/twenty-front/src/modules/activities/emails/components/MessageThread.tsx
Outdated
Show resolved
Hide resolved
packages/twenty-front/src/modules/activities/emails/components/MessageThread.tsx
Outdated
Show resolved
Hide resolved
packages/twenty-front/src/modules/activities/emails/components/MessageThread.tsx
Outdated
Show resolved
Hide resolved
packages/twenty-front/src/modules/activities/emails/components/MessageThread.tsx
Outdated
Show resolved
Hide resolved
...ges/twenty-front/src/modules/activities/emails/right-drawer/components/RightDrawerThread.tsx
Outdated
Show resolved
Hide resolved
|
||
import { MockedThread } from '@/activities/emails/mocks/mockedThreads'; | ||
|
||
export const viewableThreadState = atom<MockedThread | 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.
I'm very surprise about the typing getting out of the mocks!
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.
Also, I think this state is not useful, we should rely on apollo and not on the cache.
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.
Agreed. But I will test it once I do not have to mock the data anymore. For now I am not performing any query
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.
About the typing, this is something you want to discuss with Coco and Raphael to redefine the API?
Adding logic to fill the right drawer with all messages:
In future PRs:
Enregistrement.de.l.ecran.2024-01-24.a.10.56.42.mov