Ethsim2
(Ethan )
6 سبتمبر 2026، 3:52م
631
قد يكون من المفيد أيضًا التحقق مما إذا كان لهذا طلب المسح (PR) أي تأثير على خيار ترتيب الموضوعات حسب تاريخ بدء الحدث في الإعدادات الخاصة بكل فئة:
main ← Ethsim12:fix-event-topic-event_time-live-refresh
opened 12:59PM - 04 Sep 26 UTC
## What changed
Event date badges in topic lists could become stale in two wa… ys:
- relative labels such as `in a minute`, `Ends in a minute`, or `a minute ago` did not rerender as time passed unless something else caused the component to update;
- when a recurring event advanced to its next occurrence, `/latest` did not publish an update for the topic, and the existing Topic model did not track the event date fields needed to rerender after rehydration.
This change:
- makes `EventDate` consume Discourse's existing once-per-minute `a11y.autoUpdatingRelativeDateRef`, so future/current/past relative labels update as time passes without adding another timer;
- registers the event date/topic fields as tracked Topic properties so rehydrating an existing topic updates the badge;
- publishes a latest-topic update after a recurring event advances to its next date, while leaving non-recurring event completion unchanged.
## Tests
Automated:
- `bin/qunit --standalone plugins/discourse-events/test/javascripts/integration/components/event-date-test.gjs` — 274 tests, 273 passed, 1 skipped, 0 failed
- `bin/rspec plugins/discourse-events/spec/jobs/scheduled/monitor_event_dates_spec.rb` — 9 examples, 0 failures
- Prettier, ESLint, RuboCop, Syntax Tree and `git diff --check` pass
Manual GUI smoke tests:
- a non-recurring event updated automatically from pre-event relative time to the active `Ends in …` state, then to past relative time, and continued updating each minute without a page refresh;
- a recurring event advanced through the same future/current/past states, then showed Discourse's normal `See 1 new or updated topic` notice after rollover; loading that update changed the badge to the next weekly occurrence (`in 7 days`) without a full page refresh.
لم يُكتب هذا الطلب (PR) خصيصًا لترتيب الفئات، لكنه يغيّر كيفية انتشار تواريخ الأحداث المحدّثة إلى نماذج الموضوعات الموجودة، وينشر تحديثًا لأحدث موضوع عندما ينتقل الحدث المتكرر إلى ظهوره التالي.
إذا كان أي شخص يستخدم خيار ترتيب الموضوعات حسب تاريخ بدء الحدث قد لاحظ فشل الموضوعات في التحديث أو إعادة الترتيب بشكل صحيح عند تغيير تواريخ الأحداث، فسيكون من المفيد معرفة ما إذا كان ذلك لا يزال قابلًا للتكرار عند رأس الطلب (PR head).
إعجاب واحد (1)