Loading
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
- Run
yarn jest spec/frontend/behaviors/index_spec.js --runInBandto check the enabled, disabled, missing-flag and missing-features cases. - With
find_and_replaceenabled, open a markdown editor and confirm that the find-and-replace shortcut opens the panel. ThefindAndReplacechunk should load. - Disable the flag and reload. Confirm that the
findAndReplacechunk 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.