Page MenuHomePhabricator

Use pseudoelements, not Zero Width Space, to implement copy/paste behavior in Paste/Diffusion
ClosedPublic

Authored by epriestley on Apr 11 2018, 9:30 PM.
Tags
None
Referenced Files
F14079063: D19349.diff
Fri, Nov 22, 6:34 AM
Unknown Object (File)
Oct 22 2024, 5:58 AM
Unknown Object (File)
Sep 4 2024, 9:47 PM
Unknown Object (File)
Sep 1 2024, 8:33 PM
Unknown Object (File)
Sep 1 2024, 1:54 AM
Unknown Object (File)
Aug 28 2024, 10:40 AM
Unknown Object (File)
Aug 25 2024, 5:21 AM
Unknown Object (File)
Aug 17 2024, 7:20 AM
Subscribers
None

Details

Summary

Depends on D19348. Ref T13105. When copying text from Paste or Diffusion, we'd like to copy only source, not line numbers.

We currently accomplish this with zero-width spaces plus a trigger that fires on "copy" in Paste and Diffusion. This is quite gross.

In the new-style Harbormaster logs, we use an approach that seems slightly better: CSS psuedoelements.

This isn't a complete solution (see also PHI504 / T5032) but puts us in a slightly better place.

Use it in Paste/Files/Diffusion too.

This gives us good behavior in all browsers in Files and Paste.

This gives us good behavior in Chrome and Firefox in Diffusion. Safari will copy (but not visually select) blame information in Diffusion. I think we can live with that for now.

Test Plan

Selected and copy/pasted stuff in Diffusion, Files, and Paste. Got good behavior everywhere except Safari + Diffusion.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable