Commit Graph
69 Commits
Author SHA1 Message Date
hazre b59c927b24 refactor: emoji detection in text 2026-06-18 03:56:53 +02:00
7w1 e76c33c0e1 update twemoji package and emoji lists 2026-06-17 16:24:08 -05:00
7w1 bed7024ab1 address lint rules & update package.json
via an exclusion and lots of copy paste
as part of that swapped space banner and abbr to use buttons and disabled button styles for them
2026-06-16 18:05:31 -05:00
7w1 285a76bc8b More hidden events & Phosphor Icons replacement & Add reactions button (#934)
<!-- 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. -->

Copied from changesets :p

Add more hidden timeline events with settings and rendering.

#### Settings

- Add a master Show Hidden Events toggle with per-type sub-toggles for
message edits, redactions, reactions, and other unrecognized events
- Sub-toggles stay visible beneath the master toggle and are disabled
while hidden events are off
- Fold the redacted-message tombstone setting into the redactions group
and migrate existing tombstone preferences

#### Timeline filtering and rendering

- Show message edits as timeline events with reply navigation and an
inline word/line diff between versions
- Show reactions, message redactions, and reaction redactions as
timeline events instead of message bubbles
- Keep redacted reactions in the timeline as tombstones with redaction
events linking back to them when possible
- Improve reply-chip previews for edits, redactions, reactions, and
redacted targets
- Merge related edit and reaction events into the timeline when they are
missing from pagination

#### Safeguards

- Hide forward, delete, and other message actions on timeline meta
events that cannot be forwarded or meaningfully deleted
- Disallow forwarding deleted messages and other non-message event types

Migrated all icons to Phosphor Icons and added a setting to display
globe/lock icon instead of the hash tag for the room sidebar.

Added a reaction shortcut when a message already has a reaction.

+ fixed the polls changeset formatting a little, i think...

#### Type of change

- [x] 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
- [ ] 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).
<!-- 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. -->

AI did the bit of test generation and assisted with some of the bulk
icon replacement, although the icons were manually picked out.
2026-06-13 21:31:22 -05:00
7w1 e29de131c8 formatting and tests and changeset 2026-06-13 20:39:27 -05:00
7w1 2912b2c56c hook parser into parser 2026-06-13 19:56:01 -05:00
7w1 6b9c7ac582 formatting 2026-06-13 18:04:20 -05:00
7w1 9c751bd6c7 bulk rename iconAt to sizedIcon
was a silly choice
2026-06-13 18:04:05 -05:00
7w1 221c2e7c25 phosphor icons 2026-06-13 17:50:02 -05:00
7w1 b0349b431c fix: lists rendering p tags causing new lines 2026-05-26 23:37:09 -05:00
7w1 95493d6f1a fix: lists pushing off screen 2026-05-18 13:22:38 -05:00
7w1 bd4b2137b1 fix inline image height and add settings for capping incoming height 2026-05-07 12:48:58 -05:00
7w1 7ef0f61d94 fix matrixto link rendering 2026-05-05 16:18:20 -05:00
7w1 574e177d82 dynamically load math library 2026-04-30 10:47:16 -05:00
7w1 5832b71da1 deduplicate the url things + fix code block urls 2026-04-30 00:48:43 -05:00
7w1 7aa82bb9d4 always open links in new tab 2026-04-30 00:43:12 -05:00
7w1 c59c81ed39 linting & formatting 2026-04-30 00:38:20 -05:00
7w1 fc846e26e6 math rendering 2026-04-29 23:38:19 -05:00
hazre bb9d59d7f6 Merge remote-tracking branch 'origin/dev' into migrate-oxlint-oxfmt
# Conflicts:
#	src/app/components/RenderMessageContent.tsx
#	src/app/components/url-preview/UrlPreviewCard.tsx
#	src/app/components/user-profile/UserRoomProfile.tsx
#	src/app/features/settings/Settings.test.tsx
#	src/app/features/settings/general/SettingsLinkBaseUrlSetting.test.tsx
#	src/app/features/settings/general/SettingsLinkBaseUrlSetting.tsx
#	src/app/features/settings/settingsLink.ts
2026-04-21 16:35:04 +02:00
hazre 4dbdb6fcc9 Harden settings link parsing and rendering 2026-04-18 18:27:16 +02:00
7w1 40bb35f34c linting awayy 2026-04-17 16:23:59 -05:00
7w1 144e148154 many lint fixes 2026-04-17 14:09:04 -05:00
7w1 b13c9b61d4 formatting 2026-04-16 22:38:18 -05:00
7w1 1717ca872f migrate to oxlint and oxfmt
ran formatter
fixed lint issues, primarily getting rid of "any"s and swapping to .toSorted()
2026-04-16 22:15:13 -05:00
hazre a5251818d3 fix: preserve linkification in formatted body text 2026-04-02 13:49:48 +02:00
hazre 0c4face49e Merge remote-tracking branch 'origin/dev' into hazre/feat/settings-routing-links
# Conflicts:
#	src/app/plugins/react-custom-html-parser.test.tsx
2026-03-31 14:07:53 +02:00
hazre 3bb692fdb0 Merge branch 'dev' of github.com:SableClient/Sable into hazre/feat/arborium-migration
# Conflicts:
#	src/app/plugins/react-custom-html-parser.test.tsx
#	src/app/plugins/react-custom-html-parser.tsx
#	src/app/utils/sanitize.test.ts
#	src/app/utils/sanitize.ts
2026-03-30 23:30:29 +02:00
hazre be8912675b Merge remote-tracking branch 'origin/dev' into hazre/feat/settings-routing-links
# Conflicts:
#	src/app/plugins/react-custom-html-parser.test.tsx
#	src/app/plugins/react-custom-html-parser.tsx
2026-03-30 23:29:26 +02:00
hazre fb1732ce82 fix: harden MXC image rendering and simplify HTML paths 2026-03-29 23:42:17 +02:00
hazre 6bd125be5d Merge origin/dev into codex/settings-routing-links 2026-03-28 20:06:12 +01:00
hazre 8bfe21ab6e refactor: rename settings permalinks to setting links 2026-03-28 19:54:04 +01:00
hazre 50542e9e91 fix: polish settings permalink controls 2026-03-28 19:42:14 +01:00
hazre ee1b718737 fix: harden Matrix HTML sanitization 2026-03-28 17:11:25 +01:00
hazre 95335de49a feat: route settings and add permalinks 2026-03-27 13:03:29 +01:00
hazre 428505cc21 fix: preserve structured code blocks in parser 2026-03-27 12:31:55 +01:00
hazre bfdda68483 fix: handle whitespace in code block language lookup 2026-03-27 12:31:55 +01:00
hazre f804f07a3c feat: render message code blocks with arborium 2026-03-27 12:31:55 +01:00
Evie Gauthier bf9deae8a1 fix(abbreviations): fix lint, typecheck, and format errors 2026-03-25 12:49:18 -04:00
Evie Gauthier 18a7ca092b fix(abbreviations): highlight terms in HTML-formatted messages
Previously, abbreviation term highlighting was skipped for any message
that has a formatted_body (virtually all messages from modern clients
using a rich-text editor), because RenderBody returned early from the
customBody path before reaching the abbreviation logic.

The fix adds an optional replaceTextNode callback to
getReactCustomHtmlParser. Since opts closes over itself, renderChildren
inside element handlers recurses through the same replace function, so
text nodes nested inside <p>, <strong>, <em>, list items, etc. are all
processed correctly.

buildAbbrReplaceTextNode is exported from RenderBody.tsx and wired
into both RoomTimeline and ThreadDrawer via useRoomAbbreviationsContext.
2026-03-25 12:13:21 -04:00
7w1 418fe2cc1a unduplicate code 2026-03-24 09:56:13 -05:00
7w1 7a6c74eeee decode urls safely! 2026-03-24 09:45:14 -05:00
7w1 c90794c5a5 lint fixes 2026-03-07 02:58:56 -06:00
7w1 5e39237e16 added settings for disabling autoplay of gifs (& banners), stickers, and emojis. 2026-03-07 02:56:21 -06:00
Evie Gauthier e232be64d9 fix(media): remove allowRedirects, add error fallbacks, apply useAuthentication in html parser 2026-03-05 19:11:28 -05:00
7w1 3cf0e1f3d2 fix: replace small html with sub 2026-03-03 10:24:11 -06:00
7w1 08fa7cd67f make eslint happy 2026-03-02 15:10:21 -06:00
hazre bde1505ad4 refactor: normalize parent-relative imports to aliases 2026-03-02 20:00:26 +01:00
hazre 77fda81374 chore(lint): drop redundant React default imports and add jsx runtime config 2026-03-01 14:40:58 +01:00
7w1 e05ba70439 fix #37 add support for ---, -#, and swap - to unordered 2026-02-28 17:37:37 -06:00
hazre b8a998cab7 Merge remote-tracking branch 'sable/dev' into chore/cleanup-codebase-1 2026-02-26 19:04:09 +01:00