diff --git a/editor/package.json b/editor/package.json index e4e362b730e4..e1bfd54703f2 100644 --- a/editor/package.json +++ b/editor/package.json @@ -110,10 +110,10 @@ "@emotion/serialize": "1.0.2", "@emotion/styled": "11.0.0", "@emotion/styled-base": "11.0.0", - "@liveblocks/client": "1.7.1", - "@liveblocks/react": "1.7.1", - "@liveblocks/react-comments": "1.7.1", - "@liveblocks/yjs": "1.7.1", + "@liveblocks/client": "1.9.0", + "@liveblocks/react": "1.9.0", + "@liveblocks/react-comments": "1.9.0", + "@liveblocks/yjs": "1.9.0", "@popperjs/core": "2.4.4", "@remix-run/react": "2.0.1", "@remix-run/server-runtime": "2.3.1", diff --git a/editor/pnpm-lock.yaml b/editor/pnpm-lock.yaml index d0b6245df0f2..8660c7b32d53 100644 --- a/editor/pnpm-lock.yaml +++ b/editor/pnpm-lock.yaml @@ -60,10 +60,10 @@ specifiers: '@emotion/styled': 11.0.0 '@emotion/styled-base': 11.0.0 '@hot-loader/react-dom': 16.13.0 - '@liveblocks/client': 1.7.1 - '@liveblocks/react': 1.7.1 - '@liveblocks/react-comments': 1.7.1 - '@liveblocks/yjs': 1.7.1 + '@liveblocks/client': 1.9.0 + '@liveblocks/react': 1.9.0 + '@liveblocks/react-comments': 1.9.0 + '@liveblocks/yjs': 1.9.0 '@originjs/vite-plugin-commonjs': 1.0.3 '@peculiar/webcrypto': 1.4.3 '@popperjs/core': 2.4.4 @@ -353,10 +353,10 @@ dependencies: '@emotion/serialize': 1.0.2 '@emotion/styled': 11.0.0_pbv2jdxnktdx6pqidqmf5xa3ty '@emotion/styled-base': 11.0.0 - '@liveblocks/client': 1.7.1 - '@liveblocks/react': 1.7.1_react@18.1.0 - '@liveblocks/react-comments': 1.7.1_wgqxz3kjpz4ixw4iz4mbg2tk4i - '@liveblocks/yjs': 1.7.1_yjs@13.6.8 + '@liveblocks/client': 1.9.0 + '@liveblocks/react': 1.9.0_react@18.1.0 + '@liveblocks/react-comments': 1.9.0_wgqxz3kjpz4ixw4iz4mbg2tk4i + '@liveblocks/yjs': 1.9.0_yjs@13.6.8 '@popperjs/core': 2.4.4 '@remix-run/react': 2.0.1_njludxb6fcqnim6moy22jieofi '@remix-run/server-runtime': 2.3.1_typescript@5.2.2 @@ -3319,25 +3319,25 @@ packages: '@lit-labs/ssr-dom-shim': 1.1.2 dev: false - /@liveblocks/client/1.7.1: - resolution: {integrity: sha512-i/r4CrKcFAuJw7RFPsbyr3NobeVc3rylGSOtAY70Acl9UO6i0Qe1Ai7V+uWKfzooqAiThwrr8mPxtfu0ji4DRA==} + /@liveblocks/client/1.9.0: + resolution: {integrity: sha512-Q0wvvjDBgUgfp4GS1JoZ8J0ZRpgtYKGXNWVyOYKAaqiKrynjVsmhNkH5bm9+7OZ/PckSfochdbym9GnlKwKDug==} dependencies: - '@liveblocks/core': 1.7.1 + '@liveblocks/core': 1.9.0 dev: false - /@liveblocks/core/1.7.1: - resolution: {integrity: sha512-x3HBVFk9tWppCkzScVaFn8VqTPC+rKgNxiB8bkazJmplYJO6/2k0oBHEq5lA034ERzVVdW1qkWMQKhmINNJiIQ==} + /@liveblocks/core/1.9.0: + resolution: {integrity: sha512-dBrcrUs3fld8ReUMK0603GUW17r1GB0dCz9pDy6pNN0AZnSNveUR+chr8y1+MPIz1uJeLomzy9AvSHhBDouT2A==} dev: false - /@liveblocks/react-comments/1.7.1_wgqxz3kjpz4ixw4iz4mbg2tk4i: - resolution: {integrity: sha512-TfIZ253DfeeXySDOqe25A3hrm1YyVSSvPrygWWY+3FstwPz9Gbobt2cxQKWR+P0zeSEXZYpsy5ejw03gUr8XVQ==} + /@liveblocks/react-comments/1.9.0_wgqxz3kjpz4ixw4iz4mbg2tk4i: + resolution: {integrity: sha512-Auc5XAJrY8eOSngCKDCaz8ac43HgSRK6+OxkY/5+KtXz/EPQYaxzJ0Ydbk3K4jMYB3KYsmeQwLFu/rG6/vJ9mQ==} peerDependencies: react: ^16.14.0 || ^17 || ^18 dependencies: '@floating-ui/react-dom': 2.0.4_ef5jwxihqo6n7gxfmzogljlgcm - '@liveblocks/client': 1.7.1 - '@liveblocks/core': 1.7.1 - '@liveblocks/react': 1.7.1_react@18.1.0 + '@liveblocks/client': 1.9.0 + '@liveblocks/core': 1.9.0 + '@liveblocks/react': 1.9.0_react@18.1.0 '@radix-ui/react-dropdown-menu': 2.0.6_wgqxz3kjpz4ixw4iz4mbg2tk4i '@radix-ui/react-popover': 1.0.7_wgqxz3kjpz4ixw4iz4mbg2tk4i '@radix-ui/react-slot': 1.0.2_7cpxmzzodpxnolj5zcc5cr63ji @@ -3355,25 +3355,25 @@ packages: - react-dom dev: false - /@liveblocks/react/1.7.1_react@18.1.0: - resolution: {integrity: sha512-qx+zbTu0hUUj8U8ydB0YEY0+DFR0PuTGVN9hlFHTxWE5Xr0eRFlFegyE6FGtXfTHkyxtQ1vQvoBQcUO/i7+VBA==} + /@liveblocks/react/1.9.0_react@18.1.0: + resolution: {integrity: sha512-WQGEkf9ZeekgSYq1qYuNgVD1qS4Rk+JGxYHR9zslaXNdVh/Hl3VYWMrdIqte1f5wRRVtjGBTcrnVETOO038ZnQ==} peerDependencies: react: ^16.14.0 || ^17 || ^18 dependencies: - '@liveblocks/client': 1.7.1 - '@liveblocks/core': 1.7.1 + '@liveblocks/client': 1.9.0 + '@liveblocks/core': 1.9.0 nanoid: 3.3.6 react: 18.1.0_47cciibm4ysmleigs33s763fqu use-sync-external-store: 1.2.0_react@18.1.0 dev: false - /@liveblocks/yjs/1.7.1_yjs@13.6.8: - resolution: {integrity: sha512-2qB7p184GyHUBVNY3mj92RryHbNs2jGD1kEmWzVwLNfx2ghIAVwVTLX0QpeXOLEJcWcKzzUzcJ+th054rx4yEA==} + /@liveblocks/yjs/1.9.0_yjs@13.6.8: + resolution: {integrity: sha512-V+fDH7SCXNsHOVZP531xeiagnfp/Z+rm7KYCaeVnYvC2VoKuG3fAwcFfVle8pXnYVPXpUuNSQ2TSatXGz51KvQ==} peerDependencies: yjs: ^13.6.1 dependencies: - '@liveblocks/client': 1.7.1 - '@liveblocks/core': 1.7.1 + '@liveblocks/client': 1.9.0 + '@liveblocks/core': 1.9.0 js-base64: 3.7.5 yjs: 13.6.8 dev: false diff --git a/editor/src/core/commenting/comment-hooks.tsx b/editor/src/core/commenting/comment-hooks.tsx index b91a9b540626..ac68553f94bd 100644 --- a/editor/src/core/commenting/comment-hooks.tsx +++ b/editor/src/core/commenting/comment-hooks.tsx @@ -247,19 +247,23 @@ export function useActiveThreads() { } export function useResolvedThreads() { - const threads = useThreads() - return { - ...threads, - threads: threads.threads.filter((t) => t.metadata.resolved === true), - } + return useThreads({ + query: { + metadata: { + resolved: true, + }, + }, + }) } export function useUnresolvedThreads() { - const threads = useThreads() - return { - ...threads, - threads: threads.threads.filter((t) => t.metadata.resolved !== true), - } + return useThreads({ + query: { + metadata: { + resolved: false, + }, + }, + }) } export function useSetThreadReadStatusOnMount(thread: ThreadData | null) {