Migrate navigator.clipboard in MLflow usage modal to copyToClipboard

What does this MR do and why?

Replaces the direct navigator.clipboard.writeText call in the MLflow usage modal with copyToClipboard from ~/lib/utils/copy_to_clipboard. This helper also works on non-secure (http) pages, and it lets us remove the no-restricted-properties eslint-disable comment. The spec now mocks copyToClipboard.

Closes #579487.

References

Part of epic &19827.

Screenshots or screen recordings

Not applicable — no visual change.

How to set up and validate locally

  1. Run yarn jest spec/frontend/ml/experiment_tracking/routes/experiments/index/components/mlflow_usage_modal_spec.js.

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist.

This contribution was prepared with the help of an AI assistant. I reviewed the changes and take responsibility for them.

Merge request reports

Loading
Loading