Merge branch 'dev' into sable-edit-history

This commit is contained in:
7w1 authored and GitHub committed 2026-03-11 00:28:36 -05:00
commit 718367909f
34 files changed
+494 -2440

No files matched your search

View File
Whitespace-only changes.
+5
View File
@@ -0,0 +1,5 @@
---
default: patch
---
added a few accessibility tags to the elements involved in message composing
@@ -1,5 +1,5 @@
---
sable: minor
default: minor
---
add button to save a sticker you see in the message timeline to your personal account sticker pack
+5
View File
@@ -0,0 +1,5 @@
---
default: minor
---
Added config option `hideUsernamePasswordFields` for hosts to hide username and password fields from login page.
@@ -0,0 +1,5 @@
---
sable: minor
---
add silent replies when clicking the bell icon during composing a reply
@@ -0,0 +1,5 @@
---
default: patch
---
Clarify notification settings and functionality once and for all.
+5
View File
@@ -0,0 +1,5 @@
---
default: patch
---
Fix images without an empty body display as "Broken Message"
@@ -0,0 +1,5 @@
---
default: patch
---
chang to more standard compliant msgtype `m.emote` for `/headpat` event
@@ -0,0 +1,5 @@
---
default: patch
---
"Underline Links" setting no longer affects the entire app, only links in chat, bios, and room descriptions.
+1 -1
View File
@@ -21,7 +21,7 @@ jobs:
- uses: fregante/setup-git-user@024bc0b8e177d7e77203b48dab6fb45666854b35 # v2.0.2
- uses: knope-dev/action@407e9ef7c272d2dd53a4e71e39a7839e29933c48 # v2.1.0
- uses: knope-dev/action@19617851f9f13ab2f27a05989c55efb18aca3675 # v2.1.2
with:
version: 0.22.1
+1 -1
View File
@@ -19,7 +19,7 @@ jobs:
fetch-depth: 0
persist-credentials: false
- uses: knope-dev/action@407e9ef7c272d2dd53a4e71e39a7839e29933c48 # v2.1.0
- uses: knope-dev/action@19617851f9f13ab2f27a05989c55efb18aca3675 # v2.1.2
with:
version: 0.22.1
+1 -1
View File
@@ -91,7 +91,7 @@ jobs:
\`\`\`md
---
sable: patch
default: patch
---
Short user-facing summary of the change.
+1 -1
View File
@@ -85,7 +85,7 @@ Alternatively, you can document the change manually by creating a change file:
```md
---
sable: patch
default: patch
---
Short user-facing summary of the change.
+2
View File
@@ -2,6 +2,8 @@
A Matrix client built to enhance the user experience with quality-of-life features, cosmetics, utilities, and sheer usability. See the [changelog](https://github.com/SableClient/Sable/blob/dev/CHANGELOG.md).
Soon to be replaced desktop apps can be downloaded [here](https://github.com/7w1/sable/releases/tag/1.0.0). They auto-update by pulling the website.
Join our matrix space [here](https://matrix.to/#/#sable:sable.moe) to discuss features, issues, or meowing.
Forked from [Cinny](https://github.com/cinnyapp/cinny/).
+1
View File
@@ -5,6 +5,7 @@
"elementCallUrl": null,
"disableAccountSwitcher": false,
"hideUsernamePasswordFields": false,
"pushNotificationDetails": {
"pushNotifyUrl": "https://cinny.cc/_matrix/push/v1/notify",
+1 -1
View File
@@ -23,7 +23,7 @@ type = "PrepareRelease"
[[workflows.steps]]
type = "Command"
command = "git commit -m \"chore: prepare release\""
command = "git commit -m \"chore: prepare release $version\""
[[workflows.steps]]
type = "Command"
+283 -2379
View File
File diff suppressed because it is too large. Load diff
+10 -2
View File
@@ -1,7 +1,7 @@
{
"name": "sable",
"version": "1.6.0",
"description": "Yet another matrix client fork",
"description": "An almost stable Matrix client",
"type": "module",
"packageManager": "[email protected]",
"engines": {
@@ -120,5 +120,13 @@
"vite-plugin-svgr": "4.5.0",
"vite-plugin-top-level-await": "^1.6.0",
"wrangler": "^4.70.0"
},
"overrides": {
"serialize-javascript": ">=7.0.3",
"rollup": ">=4.59.0",
"minimatch": ">=10.2.3",
"lodash": ">=4.17.23",
"esbuild": ">=0.25.0",
"brace-expansion": ">=1.1.12"
}
}
}
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "Sable",
"short_name": "Sable",
"description": "Yet another matrix client fork",
"description": "An almost stable Matrix client",
"dir": "auto",
"lang": "en-US",
"display": "standalone",
+12 -1
View File
@@ -120,8 +120,9 @@ function RenderMessageContentInternal({
);
const renderCaption = () => {
const hasCaption = content.body && content.body.trim().length > 0;
if (captionPosition === CaptionPosition.Hidden) return null;
if (content.filename && content.filename !== content.body) {
if (hasCaption && content.filename && content.filename !== content.body) {
if (captionPosition !== CaptionPosition.Inline)
return (
<MText
@@ -217,6 +218,15 @@ function RenderMessageContentInternal({
}
if (msgType === MsgType.Emote) {
if (content['fyi.cisnt.headpat']) {
return (
<MCuteEvent
content={content}
type={CuteEventType.Headpat}
mentionedUserIds={content?.['m.mentions']?.user_ids}
/>
);
}
return (
<MEmote
displayName={displayName}
@@ -358,6 +368,7 @@ function RenderMessageContentInternal({
mentionedUserIds={content?.['m.mentions']?.user_ids}
/>
);
// as fallback to render older events where msgtype was set instead of m.emote with a custom property
if (msgType === 'fyi.cisnt.headpat')
return (
<MCuteEvent
@@ -29,7 +29,7 @@ export const RoomTopicViewer = as<
<Icon src={Icons.Cross} />
</IconButton>
</Header>
<Scroll className={css.ModalScroll} size="300" hideTrack>
<Scroll data-room-topic className={css.ModalScroll} size="300" hideTrack>
<Box className={css.ModalContent} direction="Column" gap="100">
<Text size="T300" className={css.ModalTopic} priority="400">
<Linkify options={LINKIFY_OPTS}>{scaleSystemEmoji(topic)}</Linkify>
@@ -26,9 +26,15 @@ export function UnreadBadge({ highlight, count, dm }: UnreadBadgeProps) {
const [badgeCountDMsOnly] = useSetting(settingsAtom, 'badgeCountDMsOnly');
const [showPingCounts] = useSetting(settingsAtom, 'showPingCounts');
// Show count when: (showUnreadCounts OR highlight+showPingCounts) AND (not DM-only mode OR this is a DM)
/**
* Show a number if there is a count and:
* - Its a dm and dm counts are enabled
* - Its a normal room and unread counts are enabled
* - Its a ping and ping counts are enabled
*/
const showNumber =
count > 0 && (showUnreadCounts || (highlight && showPingCounts)) && (!badgeCountDMsOnly || dm);
count > 0 &&
((dm && badgeCountDMsOnly) || (!dm && showUnreadCounts) || (highlight && showPingCounts));
return (
<Badge
@@ -180,6 +180,7 @@ function UserExtendedSection({
{bioContent && (
<Scroll
data-profile-bio
direction="Vertical"
variant="SurfaceVariant"
visibility="Always"
+74 -18
View File
@@ -285,6 +285,7 @@ export const RoomInput = forwardRef<HTMLDivElement, RoomInputProps>(
);
const [scheduleMenuAnchor, setScheduleMenuAnchor] = useState<RectCords>();
const [showSchedulePicker, setShowSchedulePicker] = useState(false);
const [silentReply, setSilentReply] = useState(false);
const [hour24Clock] = useSetting(settingsAtom, 'hour24Clock');
const isEncrypted = room.hasEncryptionStateEvent();
@@ -344,6 +345,12 @@ export const RoomInput = forwardRef<HTMLDivElement, RoomInputProps>(
[roomId, editor, setMsgDraft]
);
useEffect(() => {
if (replyDraft !== undefined) {
setSilentReply(replyDraft.userId === mx.getUserId());
}
}, [mx, replyDraft]);
const handleFileMetadata = useCallback(
(fileItem: TUploadItem, metadata: TUploadMetadata) => {
setSelectedFiles({
@@ -517,7 +524,7 @@ export const RoomInput = forwardRef<HTMLDivElement, RoomInputProps>(
body,
};
if (replyDraft && replyDraft.userId !== mx.getUserId()) {
if (replyDraft && !silentReply) {
mentionData.users.add(replyDraft.userId);
}
@@ -581,6 +588,7 @@ export const RoomInput = forwardRef<HTMLDivElement, RoomInputProps>(
mx,
roomId,
replyDraft,
silentReply,
scheduledTime,
editingScheduledDelayId,
handleQuickReact,
@@ -828,6 +836,7 @@ export const RoomInput = forwardRef<HTMLDivElement, RoomInputProps>(
variant="SurfaceVariant"
size="300"
radii="300"
title="schedule message send"
>
<Icon src={Icons.Cross} size="50" />
</IconButton>
@@ -853,27 +862,61 @@ export const RoomInput = forwardRef<HTMLDivElement, RoomInputProps>(
variant="SurfaceVariant"
size="300"
radii="300"
aria-label="Cancel reply"
title="Cancel reply"
>
<Icon src={Icons.Cross} size="50" />
</IconButton>
<Box direction="Row" gap="200" alignItems="Center">
{replyDraft.relation?.rel_type === RelationType.Thread && <ThreadIndicator />}
<ReplyLayout
userColor={replyUsernameColor}
username={
<Text size="T300" truncate style={{ fontFamily: replyUsernameFont }}>
<b>
{getMemberDisplayName(room, replyDraft.userId, nicknames) ??
getMxIdLocalPart(replyDraft.userId) ??
replyDraft.userId}
</b>
</Text>
}
<Box
direction="Row"
gap="200"
alignItems="Center"
grow="Yes"
style={{ minWidth: 0 }}
>
<Box
direction="Row"
gap="200"
alignItems="Center"
grow="Yes"
style={{ minWidth: 0 }}
>
<Text size="T300" truncate>
{replyBodyJSX}
</Text>
</ReplyLayout>
{replyDraft.relation?.rel_type === RelationType.Thread && (
<ThreadIndicator />
)}
<ReplyLayout
userColor={replyUsernameColor}
username={
<Text size="T300" truncate style={{ fontFamily: replyUsernameFont }}>
<b>
{getMemberDisplayName(room, replyDraft.userId, nicknames) ??
getMxIdLocalPart(replyDraft.userId) ??
replyDraft.userId}
</b>
</Text>
}
>
<Text size="T300" truncate>
{replyBodyJSX}
</Text>
</ReplyLayout>
</Box>
<IconButton
variant="SurfaceVariant"
size="300"
radii="300"
title={
silentReply ? 'Unmute reply notifications' : 'Mute reply notifications'
}
aria-pressed={silentReply}
aria-label={
silentReply ? 'Unmute reply notifications' : 'Mute reply notifications'
}
onClick={() => setSilentReply(!silentReply)}
>
{!silentReply && <Icon src={Icons.BellPing} />}
{silentReply && <Icon src={Icons.BellMute} />}
</IconButton>
</Box>
</Box>
</div>
@@ -886,6 +929,8 @@ export const RoomInput = forwardRef<HTMLDivElement, RoomInputProps>(
variant="SurfaceVariant"
size="300"
radii="300"
title="Upload File"
aria-label="Upload and attach a File"
>
<Icon src={Icons.PlusCircle} />
</IconButton>
@@ -896,6 +941,9 @@ export const RoomInput = forwardRef<HTMLDivElement, RoomInputProps>(
variant="SurfaceVariant"
size="300"
radii="300"
title={toolbar ? 'Hide Toolbar' : 'Show Toolbar'}
aria-pressed={toolbar}
aria-label={toolbar ? 'Hide Toolbar' : 'Show Toolbar'}
onClick={() => setToolbar(!toolbar)}
>
<Icon src={toolbar ? Icons.AlphabetUnderline : Icons.Alphabet} />
@@ -940,6 +988,8 @@ export const RoomInput = forwardRef<HTMLDivElement, RoomInputProps>(
variant="SurfaceVariant"
size="300"
radii="300"
title="open sticker picker"
aria-label="Open sticker picker"
>
<Icon
src={Icons.Sticker}
@@ -956,6 +1006,8 @@ export const RoomInput = forwardRef<HTMLDivElement, RoomInputProps>(
variant="SurfaceVariant"
size="300"
radii="300"
title="open emoji picker"
aria-label="Open emoji picker"
>
<Icon
src={Icons.Smile}
@@ -1012,6 +1064,8 @@ export const RoomInput = forwardRef<HTMLDivElement, RoomInputProps>(
/>
<Box display="Flex" alignItems="Center">
<IconButton
title="Send Message"
aria-label="Send your composed Message"
onClick={() => {
if (isLongPress.current) {
isLongPress.current = false;
@@ -1053,6 +1107,8 @@ export const RoomInput = forwardRef<HTMLDivElement, RoomInputProps>(
onClick={(evt: MouseEvent<HTMLButtonElement>) => {
setScheduleMenuAnchor(evt.currentTarget.getBoundingClientRect());
}}
title="Schedule Message"
aria-label="Schedule message send"
variant={scheduledTime ? 'Primary' : 'SurfaceVariant'}
size="300"
radii="0"
@@ -98,7 +98,13 @@ export function SchedulePickerDialog({
<Box grow="Yes">
<Text size="H4">Schedule Send</Text>
</Box>
<IconButton size="300" onClick={onCancel} radii="300">
<IconButton
size="300"
onClick={onCancel}
radii="300"
title="Cancel scheduling"
aria-label="Cancel scheduling"
>
<Icon src={Icons.Cross} />
</IconButton>
</Header>
@@ -243,7 +249,14 @@ export function SchedulePickerDialog({
{error || 'Selected time is in the past'}
</Text>
)}
<Button type="submit" variant="Primary" aria-disabled={isPast} onClick={handleSubmit}>
<Button
type="submit"
variant="Primary"
aria-disabled={isPast}
onClick={handleSubmit}
title="Schedule Send"
aria-label="Schedule send"
>
<Text size="B400">Schedule Send</Text>
</Button>
</Box>
+1 -1
View File
@@ -186,7 +186,7 @@ export function About({ requestClose }: AboutProps) {
<Text size="H3">Sable</Text>
<Text size="T200">{`v${APP_VERSION}${devLabel}${buildLabel}`}</Text>
</Box>
<Text>Yet another matrix client fork(ed from cinny).</Text>
<Text>An almost stable Matrix client.</Text>
</Box>
<Box gap="200" wrap="Wrap">
@@ -305,7 +305,7 @@ function ThemeSettings() {
<SequenceCard className={SequenceCardStyle} variant="SurfaceVariant" direction="Column">
<SettingTile
title="Underline Links"
description="Always show underlines on links in chat."
description="Always show underlines on links in chat, bios and room descriptions."
after={<Switch variant="Primary" value={underlineLinks} onChange={setUnderlineLinks} />}
/>
</SequenceCard>
@@ -192,16 +192,33 @@ export function SystemNotification() {
// Describe what the current badge combo actually does so users aren't left guessing.
const badgeBehaviourSummary = (): string => {
if (!showUnreadCounts && !showPingCounts) {
return 'Badges show a plain dot for any unread activity — no numbers displayed.';
const showDMs = badgeCountDMsOnly;
const showRooms = showUnreadCounts;
const showPings = showPingCounts;
if (showDMs && showRooms && showPings) {
return 'All unread messages—DMs, Rooms, and mentions—show a number count.';
}
if (!showUnreadCounts && showPingCounts) {
return 'Badges show a number only when you are directly mentioned; all other unread activity shows a plain dot.';
if (!showDMs && !showRooms && !showPings) {
return 'Badges show a plain dot for all unread activity—no numbers displayed.';
}
if (showUnreadCounts && badgeCountDMsOnly) {
return 'Only Direct Message badges show a number count. Rooms and spaces show a plain dot instead.';
}
return 'All rooms and DMs show a number count for every unread message.';
if (showDMs && !showRooms && !showPings)
return 'Only Direct Messages show a number count. Rooms and mentions show a plain dot.';
if (!showDMs && showRooms && !showPings)
return 'Only Rooms and spaces show a number count. DMs and mentions show a plain dot.';
if (!showDMs && !showRooms && showPings)
return 'Only mentions and keywords show a number count. All other activity shows a plain dot.';
// Case 4: Exactly two are ON
if (showDMs && showRooms && !showPings)
return 'DMs and Rooms show a number count. Mentions show a plain dot.';
if (showDMs && !showRooms && showPings)
return 'DMs and mentions show a number count. Rooms and spaces show a plain dot.';
if (!showDMs && showRooms && showPings)
return 'Rooms and mentions show a number count. Direct Messages show a plain dot.';
return ''; // Fallback
};
return (
@@ -328,8 +345,8 @@ export function SystemNotification() {
gap="400"
>
<SettingTile
title="Show Message Counts"
description="Show a number on room, space, and DM badges for every unread message."
title="Show Room Counts"
description="Displays a number for unread activity in Rooms and Spaces."
after={
<Switch variant="Primary" value={showUnreadCounts} onChange={setShowUnreadCounts} />
}
@@ -342,15 +359,10 @@ export function SystemNotification() {
gap="400"
>
<SettingTile
title="Direct Messages Only"
description="Only DM badges display a count. Room and space badges show a plain dot instead."
title="Show DM Counts"
description="Displays a number for unread Direct Messages."
after={
<Switch
variant="Primary"
value={badgeCountDMsOnly}
onChange={setBadgeCountDMsOnly}
disabled={!showUnreadCounts}
/>
<Switch variant="Primary" value={badgeCountDMsOnly} onChange={setBadgeCountDMsOnly} />
}
/>
</SequenceCard>
@@ -361,8 +373,8 @@ export function SystemNotification() {
gap="400"
>
<SettingTile
title="Always Count Mentions"
description="Show a number on any badge where you were directly mentioned, even if message counts are turned off."
title="Show Mention Counts"
description="Displays a number for mentions and keyword alerts."
after={<Switch variant="Primary" value={showPingCounts} onChange={setShowPingCounts} />}
/>
</SequenceCard>
+1
View File
@@ -12,6 +12,7 @@ export type ClientConfig = {
elementCallUrl?: string;
disableAccountSwitcher?: boolean;
hideUsernamePasswordFields?: boolean;
pushNotificationDetails?: {
pushNotifyUrl?: string;
+3 -2
View File
@@ -1375,11 +1375,12 @@ export const useCommands = (mx: MatrixClient, room: Room): CommandRecord => {
exe: async (payload) => {
const target = payload.trim();
await mx.sendMessage(room.roomId, {
msgtype: 'fyi.cisnt.headpat',
msgtype: 'm.emote',
'm.mentions': {
user_ids: target ? [target] : [],
},
body: `*pat pat*`,
body: `pats ${target || 'you'}`,
'fyi.cisnt.headpat': true,
} as any);
},
},
+2 -1
View File
@@ -37,6 +37,7 @@ const useLoginSearchParams = (searchParams: URLSearchParams): LoginPathSearchPar
export function Login() {
const server = useAuthServer();
const { hashRouter } = useClientConfig();
const { hideUsernamePasswordFields } = useClientConfig();
const { loginFlows } = useAuthFlows();
const [searchParams] = useSearchParams();
const loginSearchParams = useLoginSearchParams(searchParams);
@@ -62,7 +63,7 @@ export function Login() {
{parsedFlows.token && loginSearchParams.loginToken && (
<TokenLogin token={loginSearchParams.loginToken} />
)}
{parsedFlows.password && (
{!hideUsernamePasswordFields && parsedFlows.password && (
<>
<PasswordLoginForm
defaultUsername={loginSearchParams.username}
+1 -1
View File
@@ -17,7 +17,7 @@ export function WelcomePage() {
title="Welcome to Sable"
subTitle={
<span>
Yet another matrix client fork.{' '}
An almost stable Matrix client.{' '}
<a
href="https://github.com/SableClient/Sable"
target="_blank"
+1 -1
View File
@@ -160,7 +160,7 @@ const defaultSettings: Settings = {
hideMembershipInReadOnly: true,
useRightBubbles: false,
showUnreadCounts: false,
badgeCountDMsOnly: false,
badgeCountDMsOnly: true,
showPingCounts: true,
hideReads: false,
emojiSuggestThreshold: 2,
+3 -1
View File
@@ -177,7 +177,9 @@ pre {
/* Accessibility Overrides :D */
.force-underline-links a {
.force-underline-links [data-message-id] a:not([data-mention-id]),
.force-underline-links [data-profile-bio] a,
.force-underline-links [data-room-topic] a {
text-decoration: underline !important;
text-decoration-thickness: 1px;
text-underline-offset: 2px;