mirror of
https://github.com/discourse/discourse.git
synced 2026-08-06 05:42:36 +08:00
When a link to an event topic is oneboxed from another post, it will now render the event's interactive card instead of a generic quote, which would sometimes be empty if the only content of the topic was the event. This covers replies, the composer markdown preview, and the composer rich text editor. When a card can't render it falls back to the standard onebox quote. This mirrors core's `localized_oneboxes` pattern for the event data, and uses a cooked decorator to swap the quote for `<DiscoursePostEvent>`. In the rich text editor a ProseMirror NodeView renders the read-only card. Before: <img width="828" height="298" alt="image" src="https://github.com/user-attachments/assets/41df1ece-ca38-4747-8c5a-3dda0b06998a" /> After: <img width="757" height="540" alt="image" src="https://github.com/user-attachments/assets/6312242d-f7c1-43e3-b641-0d471680c107" /> A pared down read-only card is rendered in the composer for preview. <img width="600" alt="image" src="https://github.com/user-attachments/assets/c06cd020-6acb-4a45-87be-4621ff2bf308" /> <img width="800" alt="image" src="https://github.com/user-attachments/assets/8250458b-0082-4be8-980a-bfb69a5191d3" /> |
||
|---|---|---|
| .. | ||
| discourse_calendar | ||
| discourse_post_event | ||
| tasks | ||
| calendar.rb | ||
| calendar_custom_fields_validator.rb | ||
| calendar_first_day_of_week.rb | ||
| calendar_settings_validator.rb | ||
| calendar_upcoming_events_default_view.rb | ||
| calendar_validator.rb | ||
| event_validator.rb | ||
| group_timezones.rb | ||
| holiday_status.rb | ||
| time_sniffer.rb | ||
| users_on_holiday.rb | ||