Bug 1710573 Comment 7 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

Some comments:

1) We could change the `copy` method implementation (see the link above) and instead of copying the selection, we could access the original value through the `member` argument passed into the function

2) We should use the `HeadersProvider` to get the `label` using `getLabel` from the `member`
https://searchfox.org/mozilla-central/rev/6e630edb09c3ab06d0103665b16c9ea7dce782c5/devtools/client/netmonitor/src/utils/headers-provider.js#41

A provider is used to populate the tree widget used to render all the HTTP headers. And `getLabel` is used to get the original string for the UI, which is consequently (in the UI) cropped when rendered.

3) The pointer to the current provider could be passed in the same way as `contextMenuFormatters`
https://searchfox.org/mozilla-central/rev/6e630edb09c3ab06d0103665b16c9ea7dce782c5/devtools/client/netmonitor/src/components/request-details/PropertiesView.js#162

```
this.contextMenu = new PropertiesViewContextMenu({
  customFormatters: this.props.contextMenuFormatters,
  provider: this.props.provider,
});
```

4) Note that the `copy` method is duplicated here:
https://searchfox.org/mozilla-central/rev/6e630edb09c3ab06d0103665b16c9ea7dce782c5/devtools/client/netmonitor/src/widgets/HeadersPanelContextMenu.js#108

Honza

Back to Bug 1710573 Comment 7