Load find-and-replace only when enabled

What does this MR do and why?

Load the find-and-replace behavior only when gon.features.findAndReplace is enabled. This keeps the disabled behavior out of the global behavior bundle.

References

Closes #604092 (closed)

Screenshots or screen recordings

No visual change.

How to set up and validate locally

  1. Run yarn jest spec/frontend/behaviors/index_spec.js --runInBand to check the enabled, disabled, missing-flag and missing-features cases.
  2. With find_and_replace enabled, open a markdown editor and confirm that the find-and-replace shortcut opens the panel. The findAndReplace chunk should load.
  3. Disable the flag and reload. Confirm that the findAndReplace chunk is not requested.

MR acceptance checklist

The feature remains controlled by the existing flag. The new test checks that the global behavior entry point loads it only when enabled.

Merge request reports

Loading
Loading