Get ready for 1000+ members (#14313)

The goal of this PR is to test if Twenty can support a large number of
members, a question which was raised by a large company that is
considering moving away from Salesforce.

I was expecting the currentWorkspaceMembersState to cause a lot more
issue. It would be very hard to get rid of it in the context of actors,
I think that would require a big refactoring. I thought we'd have to do
it but it turns out the perf are pretty good. One thing we need to
improve is the pagination on the roles page, we'll wait for @Bonapara to
update that
This commit is contained in:
Félix Malfait
2025-09-05 12:37:22 +02:00
committed by GitHub
parent 094d670590
commit d5f88e566c
246 changed files with 5467 additions and 703 deletions
@@ -116,7 +116,7 @@ export const SelectInput = ({
key={`No ${clearLabel}`}
text={`No ${clearLabel}`}
color="transparent"
variant={'outline'}
variant="outline"
onClick={handleClearOption}
isKeySelected={selectedItemId === `No ${clearLabel}`}
/>
@@ -173,7 +173,7 @@ export const BlockEditor = ({
>
<CustomSideMenu editor={editor} />
<SuggestionMenuController
triggerCharacter={'/'}
triggerCharacter="/"
getItems={async (query) =>
filterSuggestionItems<SuggestionItem>(getSlashMenu(editor), query)
}
@@ -10,6 +10,7 @@ import {
SideMenuController,
} from '@blocknote/react';
import styled from '@emotion/styled';
import { useLingui } from '@lingui/react/macro';
import { IconColorSwatch, IconPlus, IconTrash } from 'twenty-ui/display';
type CustomSideMenuProps = {
@@ -21,6 +22,7 @@ const StyledDivToCreateGap = styled.div`
`;
export const CustomSideMenu = ({ editor }: CustomSideMenuProps) => {
const { t } = useLingui();
return (
<SideMenuController
sideMenu={(props) => (
@@ -35,7 +37,7 @@ export const CustomSideMenu = ({ editor }: CustomSideMenuProps) => {
<CustomAddBlockItem editor={editor}>
<CustomSideMenuOptions
LeftIcon={IconPlus}
text={'Add Block'}
text={t`Add Block`}
Variant="normal"
/>
</CustomAddBlockItem>
@@ -43,7 +45,7 @@ export const CustomSideMenu = ({ editor }: CustomSideMenuProps) => {
<BlockColorsItem {...props}>
<CustomSideMenuOptions
LeftIcon={IconColorSwatch}
text={'Change Color'}
text={t`Change Color`}
Variant="normal"
/>
</BlockColorsItem>
@@ -52,7 +54,7 @@ export const CustomSideMenu = ({ editor }: CustomSideMenuProps) => {
{' '}
<CustomSideMenuOptions
LeftIcon={IconTrash}
text={'Delete'}
text={t`Delete`}
Variant="danger"
/>
</RemoveBlockItem>