PaperMC / PaperMC/diff-viewer

Don't pushState until drag selection completes

Open
#55 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area: diff viewer type: feature
Dominant language
TypeScript
Stars
50
Forks
8
Avg merge
1h 38m
Merged PRs (30d)
6

Description

Currently each line dragged over will make a history entry, which is neat that it works properly, but ideally a drag selection would count as a single history entry to reduce spam.

Can probably be done with a flag set by the drag logic? Not sure how to do it cleanly while keeping the diff view logic separated the from the viewer - but at this point that distinction is kind of pointless. Maybe some general cleanup can be done if that's removed or refactored in some way.

Or can just have some "optimistic" selection state for rendering only local to the patch view.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the drag-selection logic and the history pushState path described in the issue. Read how the patch view and viewer currently exchange selection state, then determine whether the optimistic rendering approach or a drag-completion flag fits. Done means a complete drag creates one history entry while selection rendering remains responsive.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.