Skip to content

Fix Discourse deprecation warnings (hbs-extension, resolver-resolutions, static-viewport) - #2

Open
mavi-sqr wants to merge 1 commit into
mainfrom
community-theme-fix
Open

Fix Discourse deprecation warnings (hbs-extension, resolver-resolutions, static-viewport)#2
mavi-sqr wants to merge 1 commit into
mainfrom
community-theme-fix

Conversation

@mavi-sqr

Copy link
Copy Markdown
Collaborator

Why

Admins on community.seqera.io (Discourse 2026.9.0-latest) see three recurring
"Theme 'Clean' contains code which needs updating" warnings:

  • discourse.hbs-extension
  • discourse.resolver-resolutions
  • discourse.static-viewport-initialization

These are Discourse deprecations (not the Dependabot/npm audit findings — those
are dev-only lint tooling that never ships to the forum). .hbs support is being
removed in the 2026.8+ line, so this is time-sensitive.

What

  • Convert clean-user-info.hbs.gjs with the correct core imports for 2026.9
    (discourse/ui-kit/helpers/*, discourse-i18n). Dates use dFormatDate, whose
    medium/title defaults replicate the old {{bound-date}} output exactly — and
    bound-date is itself now deprecated, so this avoids trading one warning for another.
  • Delete the dead navigation-bar.hbs template override. Template overrides were
    removed from core in June 2025; the file only emitted warnings (its content was the
    default nav items plus the already-existing extra-nav-item outlet). Clears both
    hbs-extension and resolver-resolutions for that file.
  • Drop the deprecated site.mobileView lookup in init-nav-controls.js. The
    mobile-only hide-on-scroll effect stays correctly scoped via the existing
    @media (max-width: 780px) block in common.scss (verified — desktop is unaffected).

Also cleaned up a mixed package-manager state (stray package-lock.json removed;
yarn.lock restored).

Note on why not merge upstream Lhcfl

Merging upstream would fix only 2 of 3 warnings, and destructively: upstream deleted
the custom user-info panel (moved to a separate theme-component) and never fixed the
static-viewport call. Histories have also diverged (15 ahead / 99 behind). Surgical
fixes here clear all three while keeping the Seqera branding.

Verification

  • ember-template-lint and prettier pass clean on the changed files.
  • Before merge, test on a Discourse dev instance: import the theme, confirm
    Admin → Customize → Themes → Clean shows no deprecation banners for the three IDs,
    and check the user-profile panel + navigation render identically (mobile: nav hides on
    scroll; desktop: unaffected).

🤖 Generated with Claude Code

…ns, static-viewport)

- Convert clean-user-info.hbs to .gjs with ui-kit helper imports (Discourse
  2026.9); use dFormatDate, whose medium/title defaults replicate the now-
  deprecated bound-date helper, so no new deprecation is introduced.
- Delete the dead navigation-bar.hbs template override (template overrides were
  removed from core in June 2025) — clears both hbs-extension and
  resolver-resolutions for that file.
- Drop the deprecated static-viewport `site.mobileView` lookup in
  init-nav-controls.js. The mobile-only hide-on-scroll effect stays correctly
  scoped via the existing @media (max-width: 780px) block in common.scss.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.

1 participant