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
11 changes: 10 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
## vNEXT (not yet released)

## v3.23.1

### `@liveblocks/react-ui`

- Improve version history components for versions without authors, which can
occur with server-only changes. Add `HISTORY_VERSION_SUMMARY_AUTHORS_LIST` and
update `HISTORY_VERSION_PREVIEW_AUTHORS_LIST` overrides to reflect this.

## v3.23.0

This release introduces `LiveFile`: a new data structure to store files such as
Expand Down Expand Up @@ -768,7 +776,8 @@ metadata to individual comments in the same way as thread metadata.
This release introduces group mentions (e.g. `@engineering`) across all packages
and first-class support for tenants. Learn more about
[group mentions](https://liveblocks.io/docs/ready-made-features/comments/users-and-mentions)
and [tenants](https://liveblocks.io/docs/authentication/organizations) in the docs.
and [tenants](https://liveblocks.io/docs/authentication/organizations) in the
docs.

### `@liveblocks/client`

Expand Down
5 changes: 5 additions & 0 deletions docs/pages/api-reference/liveblocks-react-blocknote.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -742,6 +742,11 @@ and logic for restoring. To render a list of versions, see
Learn how to set this up in our
[version history guide](/docs/guides/how-to-add-version-history-to-your-app).

A version can have no authors when it contains only server-side changes. In that
case, `HistoryVersionPreview` displays “Unattributed edits”. You can customize
this text with
[`HISTORY_VERSION_PREVIEW_AUTHORS_LIST`](/docs/api-reference/liveblocks-react-ui#Overrides-History-version-preview).

#### Usage [#HistoryVersionPreview-usage]

```tsx
Expand Down
5 changes: 5 additions & 0 deletions docs/pages/api-reference/liveblocks-react-lexical.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1702,6 +1702,11 @@ render a list of versions, see
Learn how to set this up in our
[version history guide](/docs/guides/how-to-add-version-history-to-your-app).

A version can have no authors when it contains only server-side changes. In that
case, `HistoryVersionPreview` displays “Unattributed edits”. You can customize
this text with
[`HISTORY_VERSION_PREVIEW_AUTHORS_LIST`](/docs/api-reference/liveblocks-react-ui#Overrides-History-version-preview).

#### Usage

```tsx
Expand Down
5 changes: 5 additions & 0 deletions docs/pages/api-reference/liveblocks-react-tiptap.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1650,6 +1650,11 @@ logic for restoring. To render a list of versions, see
Learn how to set this up in our
[version history guide](/docs/guides/how-to-add-version-history-to-your-app).

A version can have no authors when it contains only server-side changes. In that
case, `HistoryVersionPreview` displays “Unattributed edits”. You can customize
this text with
[`HISTORY_VERSION_PREVIEW_AUTHORS_LIST`](/docs/api-reference/liveblocks-react-ui#Overrides-History-version-preview).

#### Usage [#HistoryVersionPreview-usage]

```tsx
Expand Down
40 changes: 27 additions & 13 deletions docs/pages/api-reference/liveblocks-react-ui.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4261,6 +4261,11 @@ up in our

Displays a version summary which includes the author and date.

A version can have no authors when it contains only server-side changes. In that
case, `HistoryVersionSummary` displays “Unattributed”. You can customize this
text with
[`HISTORY_VERSION_SUMMARY_AUTHORS_LIST`](/docs/api-reference/liveblocks-react-ui#Overrides-History-version-summary).

```tsx
<HistoryVersionSummary
onClick={() => {
Expand All @@ -4271,7 +4276,7 @@ Displays a version summary which includes the author and date.
/>
```

##### Props [#HistoryVersionSummary-props]
#### Props [#HistoryVersionSummary-props]

<PropertiesList>
<PropertiesListItem name="onClick" type="() => void">
Expand All @@ -4285,7 +4290,7 @@ Displays a version summary which includes the author and date.
</PropertiesListItem>
</PropertiesList>

#### HistoryVersionSummaryList
### HistoryVersionSummaryList

Displays a list of version summaries for a document’s history including authors
and dates.
Expand All @@ -4305,7 +4310,7 @@ and dates.
</HistoryVersionSummaryList>
```

##### Props [#HistoryVersionSummaryList-props]
#### Props [#HistoryVersionSummaryList-props]

<PropertiesList>
<PropertiesListItem name="children" type="ReactNode">
Expand Down Expand Up @@ -4723,19 +4728,28 @@ and
| `INBOX_NOTIFICATION_THREAD_MENTION` | Thread mention text | `"X mentioned you in Y"` |
| `INBOX_NOTIFICATION_TEXT_MENTION` | Text mention text | `"X mentioned you in Y"` |

##### History version preview [#Overrides-History-version-preview]
##### History version summary [#Overrides-History-version-summary]

History version preview overrides can be set on both
[`HistoryVersionSummary`](/docs/api-reference/liveblocks-react-ui#HistoryVersionSummary)
and
History version summary overrides can be set on
[`LiveblocksUiConfig`](/docs/api-reference/liveblocks-react-ui#LiveblocksUiConfig).
The authors list is `undefined` when the version has no authors.

| Name | Description | Default value |
| -------------------------------------- | ----------------- | ------------------------- |
| `HISTORY_VERSION_SUMMARY_AUTHORS_LIST` | Authors list text | `"X"` or `"Unattributed"` |

| Name | Description | Default value |
| -------------------------------------- | -------------------- | ----------------------- |
| `HISTORY_VERSION_PREVIEW_AUTHORS_LIST` | Authors list text | `"Edits from X"` |
| `HISTORY_VERSION_PREVIEW_RESTORE` | Restore button label | `"Restore"` |
| `HISTORY_VERSION_PREVIEW_EMPTY` | Empty state text | `"No content."` |
| `HISTORY_VERSION_PREVIEW_ERROR` | Error message | `"There was an error…"` |
##### History version preview [#Overrides-History-version-preview]

History version preview overrides can be set on
[`LiveblocksUiConfig`](/docs/api-reference/liveblocks-react-ui#LiveblocksUiConfig).
The authors list is `undefined` when the version has no authors.

| Name | Description | Default value |
| -------------------------------------- | -------------------- | ------------------------------------------ |
| `HISTORY_VERSION_PREVIEW_AUTHORS_LIST` | Authors list text | `"Edits from X"` or `"Unattributed edits"` |
| `HISTORY_VERSION_PREVIEW_RESTORE` | Restore button label | `"Restore"` |
| `HISTORY_VERSION_PREVIEW_EMPTY` | Empty state text | `"No content."` |
| `HISTORY_VERSION_PREVIEW_ERROR` | Error message | `"There was an error…"` |

##### AI composer [#Overrides-AI-composer]

Expand Down
3 changes: 3 additions & 0 deletions e2e/next-sandbox/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ export default function Home() {
LiveObject
</Link>
</li>
<li>
<Link href="/storage/file?room=e2e-storage-file">LiveFile</Link>
</li>
<li>
<Link href="/storage/stress/e2e-stress-test">Stress Test</Link>
</li>
Expand Down
Loading
Loading