Skip to content

Allow annotations to be selected along with their line#155

Merged
amadeus merged 1 commit intofat/selectionfrom
amadeus/annotation-fixes
Nov 13, 2025
Merged

Allow annotations to be selected along with their line#155
amadeus merged 1 commit intofat/selectionfrom
amadeus/annotation-fixes

Conversation

@amadeus
Copy link
Copy Markdown
Member

@amadeus amadeus commented Nov 13, 2025

This removes some of the tricky hacks required to fake an annotation being attached to its selected line. Now any annotation following a selected line will also become selected.

@amadeus amadeus requested review from fat and mdo November 13, 2025 22:03
@vercel
Copy link
Copy Markdown

vercel Bot commented Nov 13, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Updated (UTC)
pierrejs-diff-demo Ready Ready Preview Nov 13, 2025 10:03pm
pierrejs-docs Ready Ready Preview Nov 13, 2025 10:03pm

@amadeus amadeus merged commit 86ce133 into fat/selection Nov 13, 2025
2 checks passed
@amadeus amadeus deleted the amadeus/annotation-fixes branch November 13, 2025 22:21
amadeus added a commit that referenced this pull request Nov 13, 2025
* line selec

* add example

* okay cool

* split

* okay great

* side by side selection working

* rmeove a bunch of bullshit

* calc annotaiton on mouse up

* fix line selection logic

* prgo

* closer and warmer

* sre

* okay

* mostly working

* continue the blue selection down the page

* jesus fuck

* update the css vars

* 432.5

* wesom

* fix not null isus

* use buttons

* Another pass at selection colors (#148)

* New blue, more cyan than indigo

* mdo: wip

* wowzers

* Edit content, new design

* Remove commented out blocks

* Line Selection Improvements (#142)

* First pass at improved handling for selection related code

* Unify composedPath generation

* Adding `data-alt-line` property to context lines

This will make it much easier to mux selection types between unified and
split diffs

* Reworked LineSelectionManager

This commit accomplished quite a lote

* Simplified and improved SelectedLineRange API
  * Much simpler interface with a more human API (similar in spirit to
    LineAnnotations)
* Selected lines fully transition between 'split' and 'unified' diffs
* DOM updates from mouse events are now debounced through
  requestAnimationFrame
* Rendering is now smarter to not actually perform dom node changes if
  not necessary
* Improved some O(n) when it comes to processing/updating lines

* Update docs to fit new types

* Allow annotations to be selected along with their line (#155)

* Tweak documentation for `selectedLines` in react components (#156)

* Tweak documentation for `selectedLines` in react components

* hopefully make it clearer

* More docs content updates

* consistency

---------

Co-authored-by: Mark Otto <markdotto@gmail.com>
Co-authored-by: Amadeus Demarzi <amadeus@users.noreply.github.com>
SlexAxton added a commit that referenced this pull request Apr 21, 2026
Improves the packages/trees file-tree profiler startup path for large pre-expanded/open trees. The change stack removes redundant prepared-input validation, represents profiler workloads with initialExpansion: 'open', slims PathStore node/storage shapes, reduces cold startup writes, tunes visible-child chunk summaries, and removes redundant FileTreeView mount/render work.

Experiments: kept runs #1, #16, #18, #24, #25, #26, #28, #36, #41, #42, #43, #44, #51, #65, #67, #68, #71, #74, #80, #82, #137, #139, #140, #142, #143, #147, #149, #153, #155, #163, #165, #171, #180, #182, #186, #196
Metric: visibleRowsReadyMs 334.8ms -> 253.8ms best (-24.2%); final kept sample 267.8ms (-20.0%).
SlexAxton added a commit that referenced this pull request Apr 22, 2026
Improves the packages/trees file-tree profiler startup path for large pre-expanded/open trees. The change stack removes redundant prepared-input validation, represents profiler workloads with initialExpansion: 'open', slims PathStore node/storage shapes, reduces cold startup writes, tunes visible-child chunk summaries, and removes redundant FileTreeView mount/render work.

Experiments: kept runs #1, #16, #18, #24, #25, #26, #28, #36, #41, #42, #43, #44, #51, #65, #67, #68, #71, #74, #80, #82, #137, #139, #140, #142, #143, #147, #149, #153, #155, #163, #165, #171, #180, #182, #186, #196
Metric: visibleRowsReadyMs 334.8ms -> 253.8ms best (-24.2%); final kept sample 267.8ms (-20.0%).
SlexAxton added a commit that referenced this pull request Apr 22, 2026
)

Optimize file-tree startup for large open trees

Improves the packages/trees file-tree profiler startup path for large pre-expanded/open trees. The change stack removes redundant prepared-input validation, represents profiler workloads with initialExpansion: 'open', slims PathStore node/storage shapes, reduces cold startup writes, tunes visible-child chunk summaries, and removes redundant FileTreeView mount/render work.

Experiments: kept runs #1, #16, #18, #24, #25, #26, #28, #36, #41, #42, #43, #44, #51, #65, #67, #68, #71, #74, #80, #82, #137, #139, #140, #142, #143, #147, #149, #153, #155, #163, #165, #171, #180, #182, #186, #196
Metric: visibleRowsReadyMs 334.8ms -> 253.8ms best (-24.2%); final kept sample 267.8ms (-20.0%).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant