mirror of
https://github.com/discourse/discourse.git
synced 2026-08-09 21:45:25 +08:00
Previously, the renewed calendar event UI had a number of rough edges reported in the [Event (calendar) UX issues](https://meta.discourse.org/t/event-calendar-ux-issues/405388) topic on Meta. The calendar card's hero image and the "Advanced settings" toggle have since been addressed separately (#41135 and #41138), so this change focuses on the remaining issues: - **Name placeholder** — editing an event with no explicit name now shows the topic title as a placeholder (mirroring the composer) without writing it as a value, keeping the event name decoupled from the topic title. - **Two-click focus** — flushing the event block triggered `composer:replace-text`, whose `insertAtTextarea` unconditionally focused the textarea and stole the click; a new opt-in `skipFocus` option mutates the value with `setRangeText` + an `input` event so focus never moves. The rich-text editor was never affected (it commits through ProseMirror transactions). - **Readable custom fields** — event custom fields are now serialized by `BasicEventSerializer`, so they are available from event listings and not just the full event view. - **Extensibility** — a `discourse-post-event-builder-custom-fields` outlet wraps the builder's custom fields section so it can be replaced or hidden, and a `discourse-post-event-composer-editor` outlet is exposed on the composer event editor. Covered by new system, request, and serializer specs. Also adds a system spec for the calendar card image behavior shipped in #41135, which previously had no coverage. |
||
|---|---|---|
| .. | ||
| admin | ||
| api | ||
| calendar_subscriptions_spec.rb | ||
| categories_controller_spec.rb | ||
| events_controller_spec.rb | ||
| group_timezones_spec.rb | ||
| invitees_controller_spec.rb | ||
| site_spec.rb | ||
| sort_event_topics_spec.rb | ||