Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
## vNEXT (not yet released)

## v3.18.1

### `@liveblocks/react-ui`

- Mentions suggestions now appear in more cases after typing `@`:
- After punctuation like `!`, `.`, `(`, etc. (e.g. `Hello!@`,
`cc: the other team (@`)
- After emojis (e.g. `Hello 👋@`)

## v3.18.0

For full upgrade instructions, see the
Expand Down
40 changes: 40 additions & 0 deletions e2e/next-sandbox/test/comments/composer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,17 @@ test.describe("Composer", () => {
]);
});

test("should not support mentions preceded by non-whitespace characters", async () => {
const { editor } = getComposer(page);

await editor.pressSequentially("Hello stacy@example");
await sleep(100);

await expect(
page.locator(".lb-composer-mention-suggestions-list")
).not.toBeVisible();
});

test("should support non-alphanumeric characters in mentions but not leading or consecutive whitespace", async () => {
const { editor } = getComposer(page);

Expand Down Expand Up @@ -562,6 +573,35 @@ test.describe("Composer", () => {
).not.toBeVisible();
});

test("should support mentions preceded by emojis", async () => {
const { editor } = getComposer(page);

await editor.pressSequentially("Hello 👋@");

await expect(
page.locator(".lb-composer-suggestions-list-item").first()
).toBeVisible();
});

test("should support mentions preceded by some specific punctuations", async () => {
const { editor } = getComposer(page);

await editor.pressSequentially("Hello!@");
await expect(
page.locator(".lb-composer-suggestions-list-item").first()
).toBeVisible();

await editor.pressSequentially("Hello.@");
await expect(
page.locator(".lb-composer-suggestions-list-item").first()
).toBeVisible();

await editor.pressSequentially("Hello (@");
await expect(
page.locator(".lb-composer-suggestions-list-item").first()
).toBeVisible();
});

test("should support user and group mentions", async () => {
const { editor } = getComposer(page);

Expand Down
2 changes: 2 additions & 0 deletions examples/nextjs-3d-builder/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# https://liveblocks.io/dashboard/apikeys
NEXT_PUBLIC_LIVEBLOCKS_PUBLIC_KEY=
78 changes: 39 additions & 39 deletions examples/nextjs-3d-builder/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions examples/nextjs-ai-app-builder/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# https://liveblocks.io/dashboard/apikeys
LIVEBLOCKS_SECRET_KEY=

# https://liveblocks.io/dashboard/copilots
NEXT_PUBLIC_LIVEBLOCKS_COPILOT_ID=
5 changes: 5 additions & 0 deletions examples/nextjs-ai-calendar/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# https://liveblocks.io/dashboard/apikeys
LIVEBLOCKS_SECRET_KEY=

# https://liveblocks.io/dashboard/copilots
NEXT_PUBLIC_LIVEBLOCKS_COPILOT_ID=
5 changes: 5 additions & 0 deletions examples/nextjs-ai-chats/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# https://liveblocks.io/dashboard/apikeys
LIVEBLOCKS_SECRET_KEY=

# https://liveblocks.io/dashboard/copilots
NEXT_PUBLIC_LIVEBLOCKS_COPILOT_ID=
5 changes: 5 additions & 0 deletions examples/nextjs-ai-dashboard-reports/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# https://liveblocks.io/dashboard/apikeys
LIVEBLOCKS_SECRET_KEY=

# https://liveblocks.io/dashboard/copilots
NEXT_PUBLIC_LIVEBLOCKS_COPILOT_ID=
5 changes: 5 additions & 0 deletions examples/nextjs-ai-popup/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# https://liveblocks.io/dashboard/apikeys
LIVEBLOCKS_SECRET_KEY=

# https://liveblocks.io/dashboard/copilots
NEXT_PUBLIC_LIVEBLOCKS_COPILOT_ID=
5 changes: 5 additions & 0 deletions examples/nextjs-ai-support/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# https://liveblocks.io/dashboard/apikeys
LIVEBLOCKS_SECRET_KEY=

# https://liveblocks.io/dashboard/copilots
NEXT_PUBLIC_LIVEBLOCKS_COPILOT_ID=
2 changes: 2 additions & 0 deletions examples/nextjs-blocknote/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# https://liveblocks.io/dashboard/apikeys
LIVEBLOCKS_SECRET_KEY=
2 changes: 2 additions & 0 deletions examples/nextjs-comments-ag-grid/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# https://liveblocks.io/dashboard/apikeys
LIVEBLOCKS_SECRET_KEY=
2 changes: 2 additions & 0 deletions examples/nextjs-comments-audio/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# https://liveblocks.io/dashboard/apikeys
LIVEBLOCKS_SECRET_KEY=
2 changes: 2 additions & 0 deletions examples/nextjs-comments-canvas/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# https://liveblocks.io/dashboard/apikeys
LIVEBLOCKS_SECRET_KEY=
Loading
Loading