Skip to content

Conversation

@scavin
Copy link
Contributor

@scavin scavin commented Sep 23, 2025

Fixes deprecation warning in Discourse 3.6.0.beta1-dev by moving 'site mobileView check from plugininitialization to component rendering phase.

Changes:

  • Move mobile view detection to component level using@service site
  • Replace conditional outlet registration with conditional rendering
  • Eliminates 'discourse.static-viewport-initialization' deprecation warning

Testing:

  • Plugin works correctly on mobile and desktop
  • No deprecation warnings in console

… component rendering

- Remove deprecated site.mobileView access during plugin initialization
- Move mobile/desktop view detection to component rendering phase
- Add @service site injection to component
- Register both before/after outlets with conditional rendering
- Fixes Discourse 3.5.0.beta9-dev deprecation warning for static-viewport-initialization
@Arkshine Arkshine requested a review from Copilot September 28, 2025 21:22
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a deprecation warning in Discourse 3.6.0.beta1-dev by refactoring mobile view detection from plugin initialization to component rendering phase, eliminating the use of deprecated site.mobileView during initialization.

  • Move mobile view detection from initialization to component level using @service site
  • Replace conditional outlet registration with conditional rendering logic
  • Register both before and after outlets with conditional templates

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@Arkshine Arkshine merged commit ec62599 into paviliondev:master Sep 28, 2025
3 checks passed
@Arkshine
Copy link
Collaborator

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants