discourse/spec/lib/onebox
Rafael dos Santos Silva 6096c3551b
FEATURE: Native Reddit embeds for oneboxes (#39162)
Reddit increasingly blocks server-side fetches from Discourse instances,
which makes the current Reddit onebox path unreliable. This switches
Reddit oneboxes to Reddit's native embed path instead of trying to fetch
and render post metadata on the server.

Changes:
- replace the Reddit onebox engine with a native `embed.reddit.com`
iframe
- listen for Reddit resize messages so embeds grow to the correct height
- remove the now-unused Reddit OAuth site settings and auth mixin
- update Reddit onebox specs and add a JS unit test for the resize
handler

Screenshots:
<img width="704" height="1861" alt="image"
src="https://github.com/user-attachments/assets/ce332dfb-c76b-4700-ab26-fae9123cbd8c"
/>
2026-04-09 11:56:22 -03:00
..
engine FEATURE: Native Reddit embeds for oneboxes (#39162) 2026-04-09 11:56:22 -03:00
domain_checker_spec.rb DEV: Apply syntax_tree formatting to spec/* 2023-01-09 11:49:28 +00:00
engine_spec.rb DEV: Apply syntax_tree formatting to spec/* 2023-01-09 11:49:28 +00:00
helpers_spec.rb FIX: Support Dropbox /scl/ URL format in video and image oneboxes (#38394) 2026-03-11 10:37:57 +01:00
json_ld_spec.rb DEV: Apply syntax_tree formatting to spec/* 2023-01-09 11:49:28 +00:00
layout_spec.rb Add RSpec 4 compatibility (#17652) 2022-07-28 10:27:38 +08:00
matcher_spec.rb DEV: Apply syntax_tree formatting to spec/* 2023-01-09 11:49:28 +00:00
movie_spec.rb DEV: Apply syntax_tree formatting to spec/* 2023-01-09 11:49:28 +00:00
oembed_spec.rb Add RSpec 4 compatibility (#17652) 2022-07-28 10:27:38 +08:00
open_graph_spec.rb FIX: Don't escape HTML entities twice in oneboxes (#37141) 2026-01-16 11:40:18 +01:00
preview_spec.rb SECURITY: Fixes for main (#28137) 2024-07-30 14:19:01 +08:00
status_check_spec.rb DEV: Apply syntax_tree formatting to spec/* 2023-01-09 11:49:28 +00:00