What do you mean? This is a desktop component.
Just to clarify - I know inline PDF previews are still supported in Discourse.
My question is specifically about the theme component itself - it currently throws deprecation warnings in the console on recent Discourse versions.
Would this need a PR to update the deprecated API usage (e.g. plugin API / Ember hooks), or is there already work underway to modernize it?
Since it’s marked official , it’s reasonable to assume that it’ll be updated before it’s too late.
A post was split to a new topic: Gating system similar to Scribd
Yeah, my feature PR above fixes the deprecated API. However, it needs more work, and I’ve been too busy to look at it again.
I’m disappointed that the viewing of a pdf on a mobile device is not permitted. I’m hoping to migrate my phpBB site to Discourse, because phpBB is clunky - but, I’ve hacked a feature into my board using pdf.js that permits me to embed pdfs. And pdf.js permits you to zoom and pan - while it’s not as robust as on the desktop, it’s useful in the garage to scan a manual without having to run back into the house. This example is not that of a manual, but demonstrates the principle: Bulletin #361 - A Diesel in America
Facebook is eating my lunch, and primarily with mobile devices - I’m hoping to win users back with a Discourse integration. But losing pdf on the handheld is not a win for me.
-Dan
Console throws discourse.static-viewport-initialization deprecation warning.
log_manager.js:98 [Gemini Nexus] Background Service Worker Started
index.js:4 Gemini Nexus v4.2.3 Ready
runtime.ts:81 DEPRECATION: Importing `inject` from `@ember/service` is deprecated. Please import `service` instead. [deprecation id: importing-inject-from-ember-service] This will be removed in ember-source 7.0.0. See https://deprecations.emberjs.com/id/importing-inject-from-ember-service for more details.
(anonymous) @ deprecate.js:72
s.<computed> @ handlers.js:10
(anonymous) @ deprecate.js:108
s.<computed> @ handlers.js:10
(anonymous) @ deprecate.js:116
s.<computed> @ handlers.js:10
(anonymous) @ index.js:75
(anonymous) @ index.js:110
s.<computed> @ handlers.js:10
(anonymous) @ index.js:115
s.<computed> @ handlers.js:10
r @ handlers.js:19
l @ deprecate.js:189
k @ index.js:31
p @ index.js:126
o @ index.js:31
n @ runtime.ts:81
<static_initializer> @ external-link-confirm.gjs:18
(anonymous) @ external-link-confirm.gjs:18
app.js:297 ℹ️ Discourse v2026.1.0-latest — https://github.com/discourse/discourse/commits/1c90b0dd85 — Ember v6.6.0
deprecated.js:52 DEPRECATION NOTICE: Accessing `site.mobileView` or `site.desktopView` during the site initialization can lead to errors and inconsistencies when the browser window is resized. Please move these checks to a component, transformer, or API callback that executes during page rendering. [deprecated since Discourse 3.5.0.beta9-dev] [deprecation id: discourse.static-viewport-initialization] [info: https://meta.discourse.org/t/367810]
d @ deprecated.js:52
get mobileView @ site.js:123
(anonymous) @ compat.js:22
X @ index.js:416
i.get @ compat.js:21
(anonymous) @ initialize-for-pdf-preview.js:10
eH @ plugin-api.gjs:3363
initialize @ initialize-for-pdf-preview.js:9
i.initialize @ app.js:265
(anonymous) @ index.js:379
e.each @ index.js:183
e.walk @ index.js:112
e.each @ index.js:59
e.topsort @ index.js:65
_runInitializer @ index.js:392
runInstanceInitializers @ index.js:377
_bootSync @ instance.js:116
didBecomeReady @ index.js:784
invoke @ index.js:262
flush @ index.js:180
flush @ index.js:334
_end @ index.js:762
_boundAutorunEnd @ index.js:499
Promise.then
(anonymous) @ index.js:18
flush @ index.js:29
_scheduleAutorun @ index.js:928
_ensureInstance @ index.js:919
schedule @ index.js:618
f @ index.js:343
waitForDOMReady @ index.js:512
init @ index.js:412
_ @ core.js:97
create @ core.js:599
(anonymous) @ start-app.js:18
await in (anonymous)
(anonymous) @ discourse-boot.js:13
(anonymous) @ discourse-boot.js:1
loader.js:46 Lazy dependencies loading...
