Apply the auto-fixable lint rules and the formatter, and drop the Vite build artifacts.
Checks / checks (push) Successful in 2m11s
Trigger cinny-mobile / dispatch (push) Successful in 1s

This commit is contained in:
2026-11-01 04:23:53 +11:00
parent 3cd159a63e
commit a6ad8651b3
605 changed files with 11480 additions and 9125 deletions
+64 -65
View File
@@ -15,26 +15,26 @@ Buttons render in two visual styles depending on location — **nav list rows**
These render as full-width list entries matching the style of built-in items like "Create Room" and "Message Search":
| Location | Where it appears |
|---|---|
| `channel-list` | Space channel list, below Lobby and Message Search |
| `home-section` | Home panel, inside the Rooms category above the room list |
| Location | Where it appears |
| ----------------- | ----------------------------------------------------------------------- |
| `channel-list` | Space channel list, below Lobby and Message Search |
| `home-section` | Home panel, inside the Rooms category above the room list |
| `direct-messages` | Direct Messages panel, below "Create Chat" and above the CHATS dropdown |
### Icon Buttons
These render as compact icon buttons inline with other toolbar/header controls:
| Location | Where it appears |
|---|---|
| `text-composer-toolbar` | Message composer toolbar (alongside emoji, sticker buttons) |
| `composer-actions` | Left side of the composer, beside the `+` attach button |
| `room-header` | Top room header bar, before the ⋮ menu button |
| `room-menu` | Room ⋮ dropdown menu |
| `message-actions` | Message hover action bar |
| `user-menu` | Right-click popup on the user avatar |
| `search-notification-section` | Notifications page header (right side) |
| `sidebar-actions` | Left sidebar — appears in **two** places: above the Explore Servers icon, and above the Search icon in the sticky bottom section |
| Location | Where it appears |
| ----------------------------- | -------------------------------------------------------------------------------------------------------------------------------- |
| `text-composer-toolbar` | Message composer toolbar (alongside emoji, sticker buttons) |
| `composer-actions` | Left side of the composer, beside the `+` attach button |
| `room-header` | Top room header bar, before the ⋮ menu button |
| `room-menu` | Room ⋮ dropdown menu |
| `message-actions` | Message hover action bar |
| `user-menu` | Right-click popup on the user avatar |
| `search-notification-section` | Notifications page header (right side) |
| `sidebar-actions` | Left sidebar — appears in **two** places: above the Explore Servers icon, and above the Search icon in the sticky bottom section |
> 💡 **Tip:** Install the [example-showcase-plugin](example-showcase-plugin/) to see exactly where each location appears in the UI!
@@ -46,7 +46,7 @@ These render as compact icon buttons inline with other toolbar/header controls:
module.exports = {
name: 'my-plugin',
version: '1.0.0',
onLoad: (context) => {
context.ui.registerButton({
id: 'my-button',
@@ -55,13 +55,13 @@ module.exports = {
icon: '🎨',
onClick: () => {
context.log('Button clicked!');
}
},
});
},
onUnload: () => {
// Buttons are automatically cleaned up on plugin unload
}
},
};
```
@@ -80,8 +80,8 @@ context.ui.registerButton({
position: {
before: 'emoji-picker-button', // Place before emoji picker
// OR
after: 'sticker-button' // Place after sticker button
}
after: 'sticker-button', // Place after sticker button
},
});
```
@@ -97,8 +97,8 @@ context.ui.registerButton({
icon: '1️⃣',
position: {
group: 'my-plugin-tools',
order: 1 // Lower numbers appear first
}
order: 1, // Lower numbers appear first
},
});
context.ui.registerButton({
@@ -108,8 +108,8 @@ context.ui.registerButton({
icon: '2️⃣',
position: {
group: 'my-plugin-tools',
order: 2
}
order: 2,
},
});
```
@@ -126,8 +126,8 @@ context.ui.registerButton({
position: {
group: 'my-tools',
after: 'emoji-picker-button',
order: 1
}
order: 1,
},
});
context.ui.registerButton({
@@ -137,8 +137,8 @@ context.ui.registerButton({
icon: '🔨',
position: {
group: 'my-tools',
order: 2
}
order: 2,
},
});
```
@@ -148,7 +148,7 @@ context.ui.registerButton({
module.exports = {
name: 'custom-tools',
version: '1.0.0',
onLoad: (context) => {
// Nav list row — appears below "Create Chat" in the DMs panel
context.ui.registerButton({
@@ -156,7 +156,7 @@ module.exports = {
location: 'direct-messages',
label: 'Favourites',
icon: '⭐',
onClick: () => context.log('Favourites clicked!')
onClick: () => context.log('Favourites clicked!'),
});
// Nav list row — appears in the space channel list
@@ -165,7 +165,7 @@ module.exports = {
location: 'channel-list',
label: 'Quick Access',
icon: '⚡',
onClick: () => context.log('Quick access clicked!')
onClick: () => context.log('Quick access clicked!'),
});
// Icon button — appears in the message composer toolbar
@@ -176,9 +176,9 @@ module.exports = {
icon: '𝐁',
position: {
group: 'custom-formatting',
order: 1
order: 1,
},
onClick: () => context.log('Bold clicked!')
onClick: () => context.log('Bold clicked!'),
});
// Icon button — appears in the room header
@@ -188,7 +188,7 @@ module.exports = {
label: 'Special Search',
icon: '🔍',
position: { after: 'search-button' },
onClick: () => context.log('Special search clicked!')
onClick: () => context.log('Special search clicked!'),
});
// Sidebar icon — appears above Explore and above Search
@@ -197,13 +197,13 @@ module.exports = {
location: 'sidebar-actions',
label: 'Plugin Panel',
icon: '🧩',
onClick: () => context.log('Plugin panel clicked!')
onClick: () => context.log('Plugin panel clicked!'),
});
},
onUnload: () => {
// All registered buttons are automatically cleaned up
}
},
};
```
@@ -228,13 +228,12 @@ const button: UIButtonDefinition = {
position: {
group: 'my-tools',
after: 'emoji-picker',
order: 1
order: 1,
},
onClick: () => console.log('Clicked!')
onClick: () => console.log('Clicked!'),
};
```
## Basic Usage
### Simple Button
@@ -243,7 +242,7 @@ const button: UIButtonDefinition = {
module.exports = {
name: 'my-plugin',
version: '1.0.0',
onLoad: (context) => {
context.ui.registerButton({
id: 'my-button',
@@ -252,13 +251,13 @@ module.exports = {
icon: '🎨',
onClick: () => {
context.log('Button clicked!');
}
},
});
},
onUnload: () => {
// Buttons are automatically cleaned up on plugin unload
}
},
};
```
@@ -277,8 +276,8 @@ context.ui.registerButton({
position: {
before: 'emoji-picker-button', // Place before emoji picker
// OR
after: 'sticker-button' // Place after sticker button
}
after: 'sticker-button', // Place after sticker button
},
});
```
@@ -294,8 +293,8 @@ context.ui.registerButton({
icon: '1️⃣',
position: {
group: 'my-plugin-tools',
order: 1 // Lower numbers appear first
}
order: 1, // Lower numbers appear first
},
});
context.ui.registerButton({
@@ -305,8 +304,8 @@ context.ui.registerButton({
icon: '2️⃣',
position: {
group: 'my-plugin-tools',
order: 2
}
order: 2,
},
});
```
@@ -323,8 +322,8 @@ context.ui.registerButton({
position: {
group: 'my-tools',
after: 'emoji-picker-button',
order: 1
}
order: 1,
},
});
context.ui.registerButton({
@@ -334,8 +333,8 @@ context.ui.registerButton({
icon: '🔨',
position: {
group: 'my-tools',
order: 2
}
order: 2,
},
});
```
@@ -345,7 +344,7 @@ context.ui.registerButton({
module.exports = {
name: 'custom-tools',
version: '1.0.0',
onLoad: (context) => {
// Nav list row — appears below "Create Chat" in the DMs panel
context.ui.registerButton({
@@ -353,7 +352,7 @@ module.exports = {
location: 'direct-messages',
label: 'Favourites',
icon: '⭐',
onClick: () => context.log('Favourites clicked!')
onClick: () => context.log('Favourites clicked!'),
});
// Nav list row — appears in the space channel list
@@ -362,7 +361,7 @@ module.exports = {
location: 'channel-list',
label: 'Quick Access',
icon: '⚡',
onClick: () => context.log('Quick access clicked!')
onClick: () => context.log('Quick access clicked!'),
});
// Icon button — appears in the message composer toolbar
@@ -373,9 +372,9 @@ module.exports = {
icon: '𝐁',
position: {
group: 'custom-formatting',
order: 1
order: 1,
},
onClick: () => context.log('Bold clicked!')
onClick: () => context.log('Bold clicked!'),
});
// Icon button — appears in the room header
@@ -385,7 +384,7 @@ module.exports = {
label: 'Special Search',
icon: '🔍',
position: { after: 'search-button' },
onClick: () => context.log('Special search clicked!')
onClick: () => context.log('Special search clicked!'),
});
// Sidebar icon — appears above Explore and above Search
@@ -394,13 +393,13 @@ module.exports = {
location: 'sidebar-actions',
label: 'Plugin Panel',
icon: '🧩',
onClick: () => context.log('Plugin panel clicked!')
onClick: () => context.log('Plugin panel clicked!'),
});
},
onUnload: () => {
// All registered buttons are automatically cleaned up
}
},
};
```
@@ -425,8 +424,8 @@ const button: UIButtonDefinition = {
position: {
group: 'my-tools',
after: 'emoji-picker',
order: 1
order: 1,
},
onClick: () => console.log('Clicked!')
onClick: () => console.log('Clicked!'),
};
```