Page MenuHomePhabricator

Conditionally load Growth frontend modules based on feature availability
Open, Needs TriagePublic

Description

Parent Task: T369312 (Fix callers to SuggestedEdits config when that feature is disabled)

Background:
While working on T369312, we discovered that the Help Panel unconditionally instantiates SuggestedEditsPanel JavaScript objects even when:

  • Suggested Edits is completely disabled on a wiki ($wgGEHomepageSuggestedEditsEnabled = false)
  • Users are performing manual edits outside the Suggested Edits workflow

Currently, HelpPanelProcessDialog.js calls new SuggestedEditsPanel(...) regardless of feature state, and the panel's build() function defensively short-circuits when it lacks proper configuration data. While this prevents the interface from breaking, we're loading and running code that will never actually be used.
The issue comes from HelpPanelHooks::getModuleData() always including GEHelpPanelSuggestedEditsPreferredEditor in the configuration payload, and frontend code assuming this data will always be present. We need to implement conditional module loading at the ResourceLoader level rather than relying on runtime defensive checks.

Acceptance Criteria:

  • Create a method eg. areNewcomerTasksEnabled() or similar for frontend feature detection
  • Refactor HelpPanelProcessDialog.js to conditionally require/instantiate SuggestedEdits

Event Timeline

Is this something that you'd still like to consider doing? I noticed that it's not received an update in the last 30 days.

Michael moved this task from Inbox to Triaged on the Growth-Team board.

Is this something that you'd still like to consider doing? I noticed that it's not received an update in the last 30 days.

It is, but not urgent. Let's move it out of the inbox.