twenty/packages
pereira0x c3417ddba1
Share an email thread to workspace members chip and dropdown (#4199) (#5640)
# Feature: Email thread members visibility

For this feature we implemented a chip and a dropdown menu that allows
users to check which workspace members can see an email thread, as
depicted on issue (#4199).

## Implementations

- create a new database table (messageThreadMember)
- relations between `messageThreadMembers` and the relevant existing
tables (`MessageThread` and `WorkspaceMembers`)
- added a new column to the `MessageThread table`: `everyone` - to
indicate that all workspace members can see the email thread
- create a new repository for the new table, including new queries
- edit the queries so that the new fields could be fetched from the
frontend
- created a component `MultiChip`, that shows a group of user avatars,
instead of just one
- created a component, `ShareDropdownMenu`, that shows up once the
`EmailThreadMembersChip` is clicked. On this menu you can see which
workspace members can view the email thread.

## Screenshots

Here are some screenshots of the frontend components that were created:

Chip with everyone in the workspace being part of the message thread:

![image](https://github.com/twentyhq/twenty/assets/26422084/80d75cdc-656f-490d-9eb1-a07346aad75c)

Chip with just one member of the workspace (the owner) being part of the
message thread:

![image](https://github.com/twentyhq/twenty/assets/26422084/c26677c6-ab93-4149-8201-b110d7346a28)

Chip with some members of the workspace being part of the message
thread:

![image](https://github.com/twentyhq/twenty/assets/26422084/9eccf5f8-134c-4c62-9145-5d5aa2346071)

How the chip looks in a message thread:

![image](https://github.com/twentyhq/twenty/assets/26422084/a9de981d-7288-4aed-8616-c1cb7de524e2)

Dropdown that opens when you click on the chip:

![image](https://github.com/twentyhq/twenty/assets/26422084/a1bb9cd4-01bb-45c5-bf8b-b31c2f3d85e0)

## Testing and Mock data

We also added mock data (TypeORM seeds), focusing on adding mock data
related to message thread members.

## Conclusion

As some of the changes that we needed to do, regarding the change of
visibility of the message thread, were not covered by the existing
documentation, we were told to open a PR and ask for feedback on this
part of the implementation. Right now, our implementation is focused on
displaying who is part of an email thread.

Feel free to let us know which steps we should follow next :)

---------

Co-authored-by: Simão Sanguinho <simao.sanguinho@tecnico.ulisboa.pt>
Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-07-31 18:50:27 +02:00
..
twenty-chrome-extension Updated MessageChannelSyncStatus enum: changed COMPLETED to ACTIVE (#5965) 2024-07-25 21:17:55 +02:00
twenty-docker mod: entrypoint for docker to setup db even in server with less memory (#5815) 2024-07-19 14:54:00 +02:00
twenty-emails Improve performance of demo workspace - Rename getImageAbsoluteURIOrBase64 function (#6282) 2024-07-29 14:07:21 +02:00
twenty-front Share an email thread to workspace members chip and dropdown (#4199) (#5640) 2024-07-31 18:50:27 +02:00
twenty-postgres Upgrade pg graphql version to 1.5.6 (#5937) 2024-06-18 17:34:16 +02:00
twenty-server Share an email thread to workspace members chip and dropdown (#4199) (#5640) 2024-07-31 18:50:27 +02:00
twenty-ui Activity as standard object (#6219) 2024-07-31 15:36:11 +02:00
twenty-utils Fix docs build in CI (#5826) 2024-06-11 19:06:37 +02:00
twenty-website 0.23 changelog (#6472) 2024-07-31 15:04:41 +02:00
twenty-zapier [Fix] Remove usage of deprecated FieldMetadata type probability (#6279) 2024-07-16 11:36:10 +02:00