Commit Graph
2719 Commits
Author SHA1 Message Date
Shea Duma 3cfbb99ece add checking for bad choices 2026-04-23 03:05:51 +03:00
Shea Duma 49e8d6f85a more complex edgecasing maybe 2026-04-23 02:41:31 +03:00
Shea Duma 3446423ed9 edgecase of setting the color to #000 2026-04-23 02:17:19 +03:00
Shea Duma b4bd3a5f8b add setting button 2026-04-23 01:39:37 +03:00
Shea Duma b6b967bb30 fix message button look 2026-04-23 00:46:40 +03:00
Shea Duma e32376b6d5 make chips, and messages have the right formatting 2026-04-23 00:38:52 +03:00
Shea Duma 51d476672c set the username color to respect the hero in brightness 2026-04-22 22:37:07 +03:00
Shea Duma 67a2d7ccb3 introduced basic typechecking 2026-04-22 19:49:17 +03:00
Shea Duma b8e6b796c9 inner coloring 2026-04-22 19:26:28 +03:00
Shea Duma e5fcc494c7 basic color rendering 2026-04-22 15:52:10 +03:00
Shea Duma 2361dd5504 fix weird merge issue 2026-04-20 20:54:45 +03:00
Shea Duma ffdc3d9587 Merge remote-tracking branch 'upstream/dev' into muliple-previews
merge upstream
2026-04-20 20:47:48 +03:00
7w1 d85c9408d5 Feat - misc data styling in user heros (#663)
<!-- Please read
https://github.com/SableClient/Sable/blob/dev/CONTRIBUTING.md before
submitting your pull request -->

### Description

<!-- Please include a summary of the change. Please also include
relevant motivation and context. List any dependencies that are required
for this change. -->

This PR proposes styling the misc data (the fields from extended profile
that sable does not recognize) in a more robust form, with json
formatting, and tapping through the options in order to have a clear
visual differentiation between it and anything else.

(current view for an example from someone using a different client and
thus having different fields)
<img width="350" height="701" alt="image"
src="https://github.com/user-attachments/assets/996bbcef-f7cf-4bbb-8667-051181d72835"
/>

(proposed new view, with the badge key selected)
<img width="344" height="661" alt="image"
src="https://github.com/user-attachments/assets/09cb347d-d287-477b-9562-5854ab09905b"
/>

(proposed new view when selecting an item)
<img width="345" height="564" alt="image"
src="https://github.com/user-attachments/assets/e52d18af-ae60-4747-9fd6-eef086373fe1"
/>
<img width="345" height="653" alt="image"
src="https://github.com/user-attachments/assets/9252b65f-d8ea-4926-8793-1b9ddff99b0a"
/>

(proposed view when there is only one key, and showing it is selected)
<img width="346" height="573" alt="image"
src="https://github.com/user-attachments/assets/4003f601-ddf4-44e9-b05d-4c07a4015033"
/>

Fixes #

#### Type of change

- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [ ] This change requires a documentation update

### Checklist:

- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings

### AI disclosure:

- [ ] Partially AI assisted (clarify which code was AI assisted and
briefly explain what it does).
- [ ] Fully AI generated (explain what all the generated code does in
moderate detail).
<!-- Write any explanation required here, but do not generate the
explanation using AI!! You must prove you understand what the code in
this PR does. -->
My partner's avocado gasped the implementation as its last breath before
rotting away
2026-04-20 17:38:57 +00:00
7w1 ff01d8d5d0 Merge branch 'dev' into muliple-previews 2026-04-20 10:52:01 -05:00
7w1 a0295803a0 fix: cross-instance settings link recognition without hardcoded app.sable.moe (#695)
<!-- Please read
https://github.com/SableClient/Sable/blob/dev/CONTRIBUTING.md before
submitting your pull request -->

### Description

Fixes #646

Changed settings link behavior to use a query parameter marker instead,
this avoids hardcoding `app.sable.moe`, keeps links valid on non-Sable
clients, and lets self-hosted Sable instances recognize links copied
from other Sable instances without misclassifying arbitrary third-party
`/settings/...` URLs.

Example:
`https://client.example/settings/account?focus=display-name&moe.sable.client.action=settings`

Edit:

I've ended up expanding the scope of the PR. Thanks to some suggestions
from @dozro and also general QoL improvements.

- Settings link URLs now get rewritten when sent from the RoomInput by
turning bare settings URLs into markdown links, so they look better on
non-Sable clients.
- Example on non-Sable clients: [Settings > Emojis & Stickers > Select
Pack](http://localhost:8080/settings/emojis?focus=select-pack&moe.sable.client.action=settings)
- Raw markdown sent: `[Settings > Emojis & Stickers > Select
Pack](http://localhost:8080/settings/emojis?focus=select-pack&moe.sable.client.action=settings)`
- Hardened settings link detection to avoid misclassifying invalid or
malformed URLs as settings links.
- Added validation so a settings link only renders as a settings chip if
it points to a real shareable settings target that exists.
- Invalid or malformed settings-looking URLs now fall back to normal
links instead of rendering as settings chips or trying to open invalid
focus targets.
- Fixed a styling issue where the settings link chip was not vertically
aligned with surrounding text.
- Removed settings links from dynamic/user-driven rows, such as emoji
packs and similar targets that are not stable to share across clients or
instances.

Migration note:
- `settingsLinkBaseUrl` is no longer used and can be removed from
`config.json`.

#### Type of change

- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [ ] This change requires a documentation update

### Checklist:

- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings

### AI disclosure:

- [x] Partially AI assisted (clarify which code was AI assisted and
briefly explain what it does).
- [ ] Fully AI generated (explain what all the generated code does in
moderate detail).
<!-- Write any explanation required here, but do not generate the
explanation using AI!! You must prove you understand what the code in
this PR does. -->
2026-04-20 15:39:29 +00:00
hazre e4c2e0ed19 Move send-time link rewrites behind transform boundary 2026-04-19 13:01:33 +02:00
hazre 1072ece46f Ignore malformed settings focus ids 2026-04-18 18:28:25 +02:00
hazre 42a9114983 Rewrite copied settings links on send 2026-04-18 18:28:20 +02:00
hazre 4dbdb6fcc9 Harden settings link parsing and rendering 2026-04-18 18:27:16 +02:00
7w1 b8ef2418fa fix(pwa): re-enable Workbox precaching (remove injectionPoint override) (#611)
> Related to closed PR #548 (`fix/media-error-handling`), which was
split into smaller focused PRs.

### Description

`injectionPoint: undefined` was set in `vite.config.ts` to silence a
Workbox `AssertionError` about multiple `self.__WB_MANIFEST` occurrences
(an `if` guard in `sw.ts` plus the `precacheAndRoute()` call = two
matches; Workbox requires exactly one). The unintended consequence:
Workbox never injected the precache manifest, so **no assets were
precached** — every cold start hit the network instead of serving from
cache, and offline use was broken entirely.

Fix: remove the `if` guard in `sw.ts` (leaving exactly one
`self.__WB_MANIFEST` reference) then remove `injectionPoint: undefined`
from `vite.config.ts` to restore normal precaching behaviour.

Fixes #

#### Type of change

- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [ ] This change requires a documentation update

### Checklist:

- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] My changes generate no new warnings

### AI disclosure:

- [x] Partially AI assisted (clarify which code was AI assisted and
briefly explain what it does).
- [ ] Fully AI generated (explain what all the generated code does in
moderate detail).

The root cause diagnosis (two `self.__WB_MANIFEST` references causing
Workbox to silently skip injection) was identified with AI assistance. I
verified the fix by checking Workbox's `injectionPoint` behaviour and
confirming precaching was restored.
2026-04-16 15:10:07 +00:00
7w1 618d71bc5d Fix the first message showing as empty because it is expecting a prevContent (#685)
<!-- Please read
https://github.com/SableClient/Sable/blob/dev/CONTRIBUTING.md before
submitting your pull request -->

### Description

<!-- Please include a summary of the change. Please also include
relevant motivation and context. List any dependencies that are required
for this change. -->
Fixes the first message showing as empty because it is expecting a
prevContent

Fixes #

#### Type of change

- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [ ] This change requires a documentation update

### Checklist:

- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [x] My changes generate no new warnings

### AI disclosure:

- [ ] Partially AI assisted (clarify which code was AI assisted and
briefly explain what it does).
- [ ] Fully AI generated (explain what all the generated code does in
moderate detail).
<!-- Write any explanation required here, but do not generate the
explanation using AI!! You must prove you understand what the code in
this PR does. -->
Having a hard time to think of a pun here made me optimize the fix
instead.
2026-04-15 19:44:47 +00:00
hazre bf30f94bf1 Remove copy settings links from dynamic settings rows 2026-04-15 19:10:33 +02:00
hazre fcf44ffdd3 Change settings links to use explicit markers 2026-04-15 18:19:50 +02:00
Evie Gauthier 8ea42131ed Merge branch 'dev' into fix/workbox-precaching 2026-04-15 11:48:19 -04:00
7w1 7783707d87 fix(ui): suppress button hover transform inside VList rows to prevent smearing (#614)
> Related to closed PR #598 (`fix/perf-rerender-reduction`), which was
split into smaller focused PRs.

### Description

Buttons inside VList rows were applying a CSS `transform` on `:hover`.
Because VList row elements use `position: relative` with `will-change:
transform` for virtualisation, the button transform was composited
against the row's own transform layer, producing a visual smear — the
button appeared to shift or blur while the row stayed in place.

Fix: add a scoped CSS override in `General.css.ts` that resets
`transform: none` on `:hover` for buttons inside VList row containers.

Fixes #

#### Type of change

- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [ ] This change requires a documentation update

### Checklist:

- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] My changes generate no new warnings

### AI disclosure:

- [x] Partially AI assisted (clarify which code was AI assisted and
briefly explain what it does).
- [ ] Fully AI generated (explain what all the generated code does in
moderate detail).

The CSS override was partially AI assisted. I identified the smearing
symptom and verified that the transform interaction between VList row
layers and button hover state was the cause before applying the fix.
2026-04-14 22:28:41 +00:00
7w1 0ae344aa6e fix spamming the abbreviation crashing sable (#665)
<!-- Please read
https://github.com/SableClient/Sable/blob/dev/CONTRIBUTING.md before
submitting your pull request -->

### Description

<!-- Please include a summary of the change. Please also include
relevant motivation and context. List any dependencies that are required
for this change. -->
Checks if the click is real and returns; if it isn't

Fixes #588

#### Type of change

- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [ ] This change requires a documentation update

### Checklist:

- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings

### AI disclosure:

- [ ] Partially AI assisted (clarify which code was AI assisted and
briefly explain what it does).
- [ ] Fully AI generated (explain what all the generated code does in
moderate detail).
<!-- Write any explanation required here, but do not generate the
explanation using AI!! You must prove you understand what the code in
this PR does. -->
A Cupid with a Yellow Rose hit me with its arrow that had fix wrapped
around the shaft <3
2026-04-14 22:26:21 +00:00
Evie Gauthier 2db7b605a4 refactor(css): simplify VList hover transform overrides
The catch-all [data-index] button:hover and [data-index] [role="button"]:hover
selectors already cover every button variant inside VList items, making the
intermediate class-specific selectors redundant. Remove them.
2026-04-13 23:57:51 -04:00
Shea Duma 472b822eea smolest fix :plead::plead::plead: 2026-04-14 03:15:02 +03:00
Shea Duma f70d9a99b4 smoler fix :plead::plead: 2026-04-14 03:12:00 +03:00
Shea Duma 294103f00a smol fix :plead: 2026-04-14 03:02:32 +03:00
Shea Duma aafa651966 forgot the console log 2026-04-12 11:02:48 +03:00
Shea Duma 32a165a43e added setting for only showing one preview per legacy view 2026-04-12 10:47:09 +03:00
Shea Duma 9310e5c07c moved embed settings to their own section 2026-04-12 10:31:21 +03:00
Shea Duma 471e77e15f fix showing multiple previews 2026-04-12 10:18:52 +03:00
Shea Duma e16d96fab4 fix issue #588 2026-04-12 04:02:21 +03:00
Shea Duma 0b658e671b proper fix for more wide presence issues too! 2026-04-12 03:06:57 +03:00
Shea Duma 9d77e8ab9f small fix sticking and showing the wrong item in the preview 2026-04-11 20:43:34 +03:00
Shea Duma bde822f2d5 make variable names make sense 2026-04-11 12:15:08 +03:00
Shea Duma 5f5957a293 style misc selector 2026-04-11 11:54:55 +03:00
Shea Duma 688feabccf style misc data 2026-04-11 07:47:01 +03:00
Shea Duma afc33a18d1 break misc data into sections 2026-04-11 04:25:45 +03:00
Shea Duma 21aea95ce8 Merge remote-tracking branch 'upstream/dev' into heros 2026-04-10 08:05:19 +03:00
7w1 b16c8e57be Remove commented-out GitHub button from WelcomePage
Removed commented-out button for GitHub link.
2026-04-09 22:09:47 -05:00
7w1 0fdbc9081f Update link in About component to Open Collective 2026-04-09 22:08:53 -05:00
Shea Duma e875fc06cb bodge to fix the hero going under the screen when clicking the bottom item 2026-04-10 06:06:43 +03:00
7w1 882876e9ff feat(threads): thread drawer, thread browser, live reply counts, and unread badges (#564)
📝 **Docs:** Already live at [Threads — Sable
Docs](https://docs.sable.moe/new-features/threads/) — no separate docs
PR needed.

---

### Description

Expands Matrix thread support with a full thread drawer, server-side
thread browser, live reply counts, unread badges, and several UX fixes.

#### ThreadDrawer

- Slide-in drawer for reading and replying in threads without leaving
the main room
- Thread root message shown at top with full reply history below
- Up-arrow edit-last-message: pressing ↑ in the thread input edits the
user's last own message in that thread
- Reactions add/remove trigger immediate re-renders without manual
refresh (handles the fact that reaction events carry
`m.relates_to.event_id` not `threadRootId` directly — fetches target
event to check thread membership)
- Thread root message box sized to content with `maxHeight: 200px` to
avoid dead whitespace on short messages

#### ThreadBrowser

- Lists all threads in the room; calls `room.fetchRoomThreads()` on
mount to load threads beyond the local timeline window
- Load-more button when the server has additional thread pages
- Each thread preview shows sender avatar, display name, reply count,
and last message body with ellipsis truncation
- Jump button navigates to the thread root in the main timeline (via
`useRoomNavigate`) instead of re-opening the drawer
- Thread unread badges on each preview item via
`room.getThreadUnreadNotificationCount()`

#### ThreadReplyChip (main timeline)

- Shows unread badge for threads with unseen replies via
`room.getThreadUnreadNotificationCount()`

#### Thread button (RoomViewHeader)

- If a thread drawer is open, button closes the drawer and opens the
thread browser (allows going from a single thread to the full list)
- If no thread is open, button toggles the thread browser as before
- `aria-pressed` reflects both thread browser state and open thread
drawer

Fixes #

#### Type of change

- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [ ] This change requires a documentation update

### Checklist:

- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings

### AI disclosure:

- [x] Partially AI assisted (clarify which code was AI assisted and
briefly explain what it does)
- [ ] Fully AI generated (explain what all the generated code does in
moderate detail)

ThreadDrawer/ThreadBrowser/thread-chip iterations were partially AI
assisted; I reviewed and adjusted logic for timeline processing, thread
loading, and event rendering behavior.
2026-04-10 03:01:30 +00:00
7w1 29d90e6285 formatting 2026-04-09 21:58:44 -05:00
7w1 02876e032f Clean up comments in ThreadBrowser component
Removed comments explaining reply count logic.
2026-04-09 21:47:30 -05:00
7w1 595d990ced remove some unnecessary comments 2026-04-09 21:46:20 -05:00
7w1 f590b99339 fix: use file name instead of 'a voice message' for non-voice audio (#651)
<!-- Please read
https://github.com/SableClient/Sable/blob/dev/CONTRIBUTING.md before
submitting your pull request -->

### Description

Only labels audio files as "a voice message" when they actually are
voice messages (have waveform data). Regular audio files (music,
podcasts) now use the file name as the body text instead.

Fixes #543

#### Type of change

- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [ ] This change requires a documentation update

### Checklist:

- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings

### AI disclosure:

- [x] Partially AI assisted (clarify which code was AI assisted and
briefly explain what it does).
- [ ] Fully AI generated (explain what all the generated code does in
moderate detail).

The `isVoice` check logic was written alongside an AI tool. It checks
whether the audio message event contains `waveform` data in
`content.info` to distinguish voice messages from regular audio file
uploads. If waveform data is absent, the message body falls back to the
file name from `content.body` instead of the hardcoded "a voice message"
string.
2026-04-10 02:41:59 +00:00