Skip to content

Add support for symbolic nodes and box limits - #13365

Merged
mattpap merged 16 commits into
branch-3.3from
mattpap/13323_range_tool
Sep 21, 2023
Merged

Add support for symbolic nodes and box limits#13365
mattpap merged 16 commits into
branch-3.3from
mattpap/13323_range_tool

Conversation

@mattpap

@mattpap mattpap commented Sep 5, 2023

Copy link
Copy Markdown
Contributor

The goals of this PR are:

  1. Introduce a rudimentary symbolic coordinate system that would allow users to reference certain well known but hard to access coordinates like e.g. frame corners. This is required to generalize null case in BoxAnnotation.{left,right,top,bottom}.
  2. Implement movement/resize limits on BoxAnnotation, which would fix the regression in RangeTool introduced in PR Editable annotations and persistent selection overlays #12468.

TODO:

  • handle inverted boxes
  • add tests
Screencast_00000.mp4

fixes #13323

@mattpap mattpap added this to the 3.3 milestone Sep 5, 2023
@mattpap mattpap added the grant: CZI R5 Funded by CZI Round 5 grant label Sep 5, 2023
@mattpap
mattpap force-pushed the mattpap/13323_range_tool branch from 35e7828 to bfda3df Compare September 14, 2023 15:26
@codecov

codecov Bot commented Sep 14, 2023

Copy link
Copy Markdown

Codecov Report

Merging #13365 (b9c0c40) into branch-3.3 (080cc10) will increase coverage by 0.01%.
Report is 1 commits behind head on branch-3.3.
The diff coverage is 100.00%.

@@              Coverage Diff               @@
##           branch-3.3   #13365      +/-   ##
==============================================
+ Coverage       92.43%   92.44%   +0.01%     
==============================================
  Files             316      317       +1     
  Lines           20221    20264      +43     
==============================================
+ Hits            18691    18734      +43     
  Misses           1530     1530              

@mattpap
mattpap force-pushed the mattpap/13323_range_tool branch 4 times, most recently from 2866cdd to 49090ae Compare September 15, 2023 14:25
@mattpap

mattpap commented Sep 15, 2023

Copy link
Copy Markdown
Contributor Author

Tests are still needed, but is tentatively ready for review. The main feature (regression fix really) is support for movement and resize limits on BoxAnnotation and thus RangeTool's overlay. Symbolic node support is really primitive and just the bare minimum to allow for a sensible configuration API for this particular purpose. This feature is expected to be experimental for a while (Node model is marked accordingly).

@ianthomas23 ianthomas23 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've only given the code a quick scan, but it looks good so far.

Comment thread src/bokeh/core/property/bases.py Outdated
Comment thread src/bokeh/models/annotations/geometry.py Outdated
Comment thread src/bokeh/models/coordinates.py Outdated
@mattpap
mattpap force-pushed the mattpap/13323_range_tool branch from 49090ae to 87e10f7 Compare September 20, 2023 11:32
@mattpap

mattpap commented Sep 20, 2023

Copy link
Copy Markdown
Contributor Author

This is now fully completed.

@mattpap
mattpap merged commit 9f743e6 into branch-3.3 Sep 21, 2023
@mattpap
mattpap deleted the mattpap/13323_range_tool branch September 21, 2023 08:26
Chiemezuo pushed a commit to Chiemezuo/bokeh that referenced this pull request Aug 27, 2024
* Add support for symbolic nodes and box limits

* Add interaction/annotations/editable_box_annotation example

* Make `import pandas` truly optional in bases.py

* Improve test_no_pandas_common

* Correctly apply limits for inverted boxes

* Update visual baselines

* Fix interactive renderer cursor flicker

* Rename Node.term to Node.symbol

* Use math.{nan,inf} instead of ad-hoc definitions

* Move `Coordinate` property alias to a common module

* Increase size allowance for bokeh.min.js

* Add symmetric resize visual tests

* Simplify BoxAnnotation's interactive tests

* Add tests for respecting box limits

* Add visual tests for positioning with nodes

* Add release notes
@github-actions

Copy link
Copy Markdown

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Oct 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

grant: CZI R5 Funded by CZI Round 5 grant status: accepted

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Layout is broken when using RangeTool and other weird behavior

3 participants