Page MenuHomePhabricator

Side lock isn't enabled when starting selection from outside the diff table
Closed, ResolvedPublic1 Estimated Story Points

Description

If you start selecting from outside the diff table, the side-locking code doesn't run, as it require you to click (or start selecting from) inside the diff table (test link). This task is to investigate how difficult it would be to fix that. It should be easy to some extent (e.g. if one column is shorter than the other, and you start selecting from the empty space after the short column), but it might be harder in general (up to the point where the selection starts very far away from the table, and it's also unclear what side should be locked).

Event Timeline

Restricted Application added a subscriber: Aklapper. ยท View Herald TranscriptAug 11 2021, 9:39 PM

This should be easy if we limit that to the main diff table. What we need to do is add the "diff-left" and "diff-right" classes to the following elements:

  • Headers (diff-otitle and diff-ntitle)
  • Line numbers (diff-lineno)
  • Empty lines

EDIT: Actually, not line numbers, as those aren't selectable anyway.

Daimona set the point value for this task to 1.

Change 712366 had a related patch set uploaded (by Daimona Eaytoy; author: Daimona Eaytoy):

[mediawiki/core@master] Apply side lock to diff headers and empty lines, too

https://gerrit.wikimedia.org/r/712366

Change 712367 had a related patch set uploaded (by Daimona Eaytoy; author: Daimona Eaytoy):

[mediawiki/php/wikidiff2@master] Apply side lock to diff headers and empty lines, too

https://gerrit.wikimedia.org/r/712367

Change 712367 merged by jenkins-bot:

[mediawiki/php/wikidiff2@master] Add CSS classes for side lock to empty lines, too

https://gerrit.wikimedia.org/r/712367

Change 712366 merged by jenkins-bot:

[mediawiki/core@master] Apply side lock to diff headers and empty lines, too

https://gerrit.wikimedia.org/r/712366

Daimona changed the task status from Open to Stalled.Aug 18 2021, 11:13 PM

Cannot be tested until T285857 is done for the beta cluster.

Daimona changed the task status from Stalled to Open.Oct 15 2021, 12:12 PM

Hey @nayoub, hope your day is going well. I have a question on the copy and paste diff2 features. Do you know what tools the users typically paste their copied text to. Below screen shot is copy and paste to an excel-sheet. The first one is simple copy and paste from diff, the second one I clicked the cell and pasted the text. Would that be an acceptable behavior as far as the layout on excel-sheet?

Screen Shot 2021-10-19 at 1.57.42 PM.png (1ร—2 px, 458 KB)

Below is screenshot example that user can copy and paste one section at a time.
Screen Shot 2021-10-19 at 4.48.24 PM.png (1ร—2 px, 558 KB)

Hi @imaigwilo, I'm doing well, thank you - hope you are too!
I actually haven't worked on the Copy and Paste from Diffs project so I'm not sure what users' behavior might be in this case. I think @Daimona or @NRodriguez will be more helpful to answer your question :)

My understanding is that the scope of the wish is limited to allowing users to select just one column, and doesn't cover the use cases of pasting text.