mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-04 00:20:20 +08:00
This commit introduces deprecation warnings for accessing Site.mobileView or Site.desktopView during application initialization to prevent layout-related errors and improve code reliability. The changes include: * Added deprecation warnings for Site.mobileView and Site.desktopView access during the initialization phase. * Updated multiple plugins and components to avoid these deprecated calls during startup. * Refactored initialization logic across discourse-ai, discourse-chat, discourse-calendar, discourse-reactions, discourse-assign, discourse-subscriptions, and discourse-user-notes plugins * Improved error prevention by discouraging early access to view-dependent properties before the application is fully initialized * Enhanced code maintainability by establishing clearer boundaries between initialization and runtime phases This deprecation helps prevent subtle bugs that can occur when components try to determine the view type before the application context is properly established, leading to more robust plugin initialization patterns. |
||
|---|---|---|
| .. | ||
| components | ||
| lib | ||
| services | ||