**Disclaimer: Claude was the driver here mostly, but I tested before/after locally** Attempts to fix some issues with the Zoom livestream integration when a user clicks Join before the webinar has started by the host. This shows a 30s countdown timer and then attempts to join the webinar when the countdown ends. However, when the tab wasn't focused/visible, Chrome (and assuming other browsers) do some throttling of timers, requestAnimationFrame, and ResizeObserver callbacks. When the user switches back to the tab, the Zoom video frame appeared to not be rendered. The Zoom frame was `display: none` when `init()` measured it, the desktop rule setting that had a higher specificity than the `--visible` class meant to reveal it, so the class never applied and the element only became visible once Zoom wrote an inline `display` of its own. `computeZoomViewSize` read a zero width and clamped to its 240px minimum, meaning every session configured Zoom at the wrong size. That went unnoticed because the post-join sync corrected it immediately. But that sync runs in a frame callback, and both it and the modifier's resize observer are suspended while the document is hidden. A retry that landed in a background tab never got the correction, and the single queued frame callback fired on return racing Zoom's remount, so the meeting rendered at 240px with none of the layout heights applied, making it seem like the video didn't appear. Moves the base `display: none` to where `--visible` outranks it, so the frame is laid out before Zoom is initialized; falls back to the container's width rather than the minimum when the root measures zero; and skips the frame callbacks while hidden, re-running them on `visibilitychange` instead. |
||
|---|---|---|
| .. | ||
| app | ||
| assets | ||
| config | ||
| db | ||
| jobs | ||
| lib | ||
| spec | ||
| svg-icons | ||
| test/javascripts | ||
| vendor/holidays | ||
| .prettierignore | ||
| about.json | ||
| package.json | ||
| plugin.rb | ||
| README.md | ||
| tsconfig.json | ||
Discourse Calendar
Adds the ability to create a dynamic calendar in the first post of a topic.
Topic discussing the plugin itself can be found here: https://meta.discourse.org/t/discourse-calendar/97376
Customization
Events
discourse_post_event_event_will_startthis DiscourseEvent will be triggered one hour before an event startsdiscourse_post_event_event_startedthis DiscourseEvent will be triggered when an event startsdiscourse_post_event_event_endedthis DiscourseEvent will be triggered when an event ends
Custom Fields
Custom fields can be set in plugin settings. Once added a new form will appear on event UI. These custom fields are available when a plugin event is triggered.
Holidays
See an incorrect or missing holiday? Familiarize yourself with the holiday definition Syntax. Then make your updates in the vendor/holiday/definitions directory.
Generate updated holidays as follows.
cd vendor/holidays
# Generate holiday definitions
rake generate:definitions
Install the plugin and switch to the discourse root(not the plugin directory).
# Collect all holiday regions into assets/javascripts/lib/regions.js
bin/rails javascript:update_constants
Interactions with Other Plugins
You can use an element of this plugin with the Right Sidebar Blocks component. You'll want to ensure the desired route is enabled via the events calendar categories setting. In Right Sidebar Block's settings, the block name will be upcoming-events-list, and the params use this syntax, for example MMMM D, YYYY.