Skip to content
Draft
5 changes: 5 additions & 0 deletions .changeset/message-bookmarks.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
default: minor
---

Add message bookmarks (MSC4438). Users can bookmark messages for easy retrieval via a new Bookmarks section in the home sidebar. Gated by an operator `config.json` experiment flag (`experiments.messageBookmarks`) and a per-user experimental settings toggle.
2 changes: 1 addition & 1 deletion knip.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://unpkg.com/knip@5/schema.json",
"entry": ["src/sw.ts", "scripts/normalize-imports.js"],
"ignore": ["oxlint.config.ts", "oxfmt.config.ts"],
"ignore": ["oxlint.config.ts", "oxfmt.config.ts", "src/app/features/bookmarks/BookmarksPanel.tsx"],
"ignoreExportsUsedInFile": {
"interface": true,
"type": true
Expand Down
11 changes: 10 additions & 1 deletion src/app/components/AccountDataEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,9 @@ type AccountDataViewProps = {
type: string;
defaultContent: string;
onEdit: () => void;
onDelete?: () => void;
};
function AccountDataView({ type, defaultContent, onEdit }: AccountDataViewProps) {
function AccountDataView({ type, defaultContent, onEdit, onDelete }: AccountDataViewProps) {
return (
<Box
direction="Column"
Expand All @@ -222,6 +223,11 @@ function AccountDataView({ type, defaultContent, onEdit }: AccountDataViewProps)
<Button variant="Secondary" size="400" radii="300" onClick={onEdit}>
<Text size="B400">Edit</Text>
</Button>
{onDelete && (
<Button variant="Critical" fill="Soft" size="400" radii="300" onClick={onDelete}>
<Text size="B400">Delete</Text>
</Button>
)}
</Box>
<Box grow="Yes" direction="Column" gap="100">
<Text size="L400">JSON Content</Text>
Expand All @@ -246,13 +252,15 @@ export type AccountDataEditorProps = {
type?: string;
content?: object;
submitChange: AccountDataSubmitCallback;
onDelete?: () => void;
requestClose: () => void;
};

export function AccountDataEditor({
type,
content,
submitChange,
onDelete,
requestClose,
}: AccountDataEditorProps) {
const [data, setData] = useState<AccountDataInfo>({
Expand Down Expand Up @@ -315,6 +323,7 @@ export function AccountDataEditor({
type={data.type}
defaultContent={contentJSONStr}
onEdit={() => setEdit(true)}
onDelete={onDelete}
/>
)}
</Box>
Expand Down
Loading