Skip to content

feat: Embeds allowed directly in messages to enable powerful Markdown formatting#1027

Open
Pecacheu wants to merge 10 commits intostoatchat:mainfrom
Pecacheu:embed-the-embeds
Open

feat: Embeds allowed directly in messages to enable powerful Markdown formatting#1027
Pecacheu wants to merge 10 commits intostoatchat:mainfrom
Pecacheu:embed-the-embeds

Conversation

@Pecacheu
Copy link
Copy Markdown
Contributor

@Pecacheu Pecacheu commented Mar 14, 2026

Split off from #835

The old style of placing all embeds at end of the message can lead to confusion, for instance the embeds are often out of order from the links themselves, such as the example below.

This alternative approach places the embeds directly into the message content like a more traditional Markdown style, allowing for much clearer communication, with relevant images/links placed right where they're needed! To prevent an embed from appearing, you can use a Markdown link with custom text.

This fails safe in both directions: Embeds that the client can't find a matching link for still appear at the end as normal, and links that don't have a matching embed appear as a normal anchor link.

Also fixes this erroneous warning when clicking embed links.

@Pecacheu Pecacheu added the ux review This needs UX review label Mar 14, 2026
@ThomasJRyan ThomasJRyan requested a review from infi March 15, 2026 05:03
@Pecacheu Pecacheu requested a review from a team as a code owner March 19, 2026 04:30
@Pecacheu Pecacheu requested a review from a team as a code owner March 21, 2026 15:09
@insertish
Copy link
Copy Markdown
Contributor

This seems like a logical continuation of the invite handling, lets see what UI/UX thinks haha

Pecacheu added 10 commits March 31, 2026 14:41
- Remove redundant Show/For's in Message.tsx

Signed-off-by: Pecacheu <3608878+Pecacheu@users.noreply.github.com>
We heard you like embeds... so we embeded your embeds; Now you can embed while you embed!
- Fix link warnings not working right on some links/embeds (eg. trailing slash & picking up embed link text as empty string)
- Fix inconsistent display of Stoat invites due to nested anchor glitch

Signed-off-by: Pecacheu <3608878+Pecacheu@users.noreply.github.com>
…unused to end

- Prefer 'originalUrl' over 'url' for Website embeds
- Fix syntax erros in ast-to-solid
- Add back 'noopener' to open in LinkWarning

Signed-off-by: Pecacheu <3608878+Pecacheu@users.noreply.github.com>
- Derrive title from URL if title is unknown for website embed, ensuring it's still clickable
- Fix for Stoat links not appearing if in middle of a paragraph with no linebreaks
- Make internal-only Context parameters more clear for childrenToSolid
- Add more class names to elements as required for CSS rules that don't work in Panda, but now using a naming convention more compatible with stoatchat#791
- Change code in SizedContent to resize the container more dynamically and be more computationally efficent
- Fix attachment download button underscore on hover & hitbox being wrong (caused by wrapping a button in an anchor)

Signed-off-by: Pecacheu <3608878+Pecacheu@users.noreply.github.com>
…a trailing slash.

Tangentially related to stoatchat#737, but not fixing that here because I don't want to upstage an existing PR

Signed-off-by: Pecacheu <3608878+Pecacheu@users.noreply.github.com>
…r limit, avoiding formatting glitches

- Apply same right-edge margin to preview as is on main message body, cutoff with ellipsis
- Improve link -> embed detection via new trimURL method

Signed-off-by: Pecacheu <3608878+Pecacheu@users.noreply.github.com>
Signed-off-by: Pecacheu <3608878+Pecacheu@users.noreply.github.com>
Signed-off-by: Pecacheu <3608878+Pecacheu@users.noreply.github.com>
Former appears to be side-effect of stoatchat#717, latter caused by this PR.

Signed-off-by: Pecacheu <3608878+Pecacheu@users.noreply.github.com>
Signed-off-by: Pecacheu <3608878+Pecacheu@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ux review This needs UX review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants