[feat] new LiveCollaborators behind feature flag (#1219)

In this PR I'm adding new versions of the `LiveCollaborators` and
`Collaborators` components for the ephemeral state work. They are behind
a feature flag for now.
This commit is contained in:
David Sheldrick 2023-05-03 14:48:46 +01:00 committed by GitHub
parent 9e5de0c48e
commit 00e3d20dc8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 167 additions and 14 deletions

View file

@ -17,6 +17,7 @@ import { useQuickReactor } from '../hooks/useQuickReactor'
import { useScreenBounds } from '../hooks/useScreenBounds'
import { debugFlags } from '../utils/debug-flags'
import { LiveCollaborators } from './LiveCollaborators'
import { LiveCollaboratorsNext } from './LiveCollaboratorsNext'
import { SelectionBg } from './SelectionBg'
import { SelectionFg } from './SelectionFg'
import { Shape } from './Shape'
@ -134,7 +135,11 @@ export const Canvas = track(function Canvas({
<HintedShapeIndicator />
<SnapLinesWrapper />
<HandlesWrapper />
<LiveCollaborators />
{process.env.NEXT_PUBLIC_TLDRAW_NEW_COLLABORATORS ? (
<LiveCollaboratorsNext />
) : (
<LiveCollaborators />
)}
</g>
</svg>
</div>