Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add optional diagram interactivity to editor #1107

Merged
merged 2 commits into from Sep 23, 2022
Merged

Conversation

wodeni
Copy link
Member

@wodeni wodeni commented Sep 23, 2022

Description

Related issue/PR: #644

Although we want to disable dragging for end-users until there's a good technical solution to interactivity, the default interactive mode is still useful for debugging. This PR adds interactivity as an optional debug feature.

Implementation strategy and design decisions

Conditionally call RenderStatic or RenderInteractive depending on the value

Examples with steps to reproduce them

  • In "settings": check debug mode
  • in "options": check interactive mode
  • Re-compile or resample go get a draggable diagram.

Checklist

  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new ESLint warnings
  • I have reviewed any generated changes to the diagrams/ folder

@wodeni wodeni self-assigned this Sep 23, 2022
@codecov
Copy link

codecov bot commented Sep 23, 2022

Codecov Report

Merging #1107 (d9d1dcd) into main (7874667) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main    #1107   +/-   ##
=======================================
  Coverage   64.80%   64.80%           
=======================================
  Files          59       59           
  Lines        7487     7487           
  Branches     1681     1681           
=======================================
  Hits         4852     4852           
  Misses       2535     2535           
  Partials      100      100           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@github-actions
Copy link

📊 Performance

Key

Note that each bar component rounds up to the nearest 100ms, so each full bar is an overestimate by up to 400ms.

     0s   1s   2s   3s   4s   5s   6s   7s   8s   9s
     |    |    |    |    |    |    |    |    |    |
name ▝▀▀▀▀▀▀▀▀▀▀▀▚▄▄▄▄▄▄▄▄▄▞▀▀▀▀▀▀▀▀▀▀▀▀▚▄▄▄▄▄▄▄▄▄▖
      compilation labelling optimization rendering

Data

                                        0s   1s   2s   3s   4s   5s   6s   7s   8s   9s  10s  11s  12s  13s  14s  15s  16s  17s  18s  19s  20s  21s  22s  23s  24s  25s  26s  27s  28s  29s  30s  31s  32s  33s  34s  35s  36s  37s  38s  39s  40s  41s  42s  43s  44s  45s  46s  47s  48s  49s  50s  51s  52s  53s  54s  55s  56s  57s  58s  59s  60s  61s  62s  63s  64s  65s  66s  67s  68s  69s  70s  71s  72s  73s  74s  75s  76s  77s  78s  79s  80s  81s  82s  83s  84s  85s  86s  87s  88s  89s  90s  91s  92s  93s  94s  95s  96s  97s  98s  99s 100s
                                        |    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |
3d-projection-fake-3d-linear-algebra    ▝▚▚
allShapes-dashedShapes                  ▝▞▖
circle-example-euclidean                ▝▀▀▀▞▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▖
collinear-euclidean                     ▝▀▀▞▚
congruent-triangles-euclidean           ▝▀▀▀▀▀▀▀▞▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▚
continuousmap-continuousmap             ▝▀▞▖
hypergraph-hypergraph                   ▝▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▞▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▚
incenter-triangle-euclidean             ▝▀▀▞▀▀▀▖
lagrange-bases-lagrange-bases           ▝▀▞▖
midsegment-triangles-euclidean          ▝▀▀▚▚
non-convex-non-convex                   ▝▀▀▀▚▀▀▀▀▚
one-water-molecule-atoms-and-bonds      ▝▚▚
parallel-lines-euclidean                ▝▀▀▞▚
persistent-homology-persistent-homology ▝▀▀▀▀▀▀▚▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▘⋯
points-around-line-shape-distance       ▝▀▀▀▀▀▚▚
points-around-polyline-shape-distance   ▝▀▀▀▀▀▀▀▀▀▀▀▚▀▀▖
points-around-star-shape-distance       ▝▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▞▚
siggraph-teaser-euclidean-teaser        ▝▀▀▀▞▀▀▀▀▀▚
small-graph-disjoint-rect-line-horiz    ▝▀▀▀▀▀▀▀▚▀▖
small-graph-disjoint-rects              ▝▀▞▖
small-graph-disjoint-rects-large-canvas ▝▀▞▖
small-graph-disjoint-rects-small-canvas ▝▀▞▖
tree-venn                               ▝▀▀▚▞▀▀▖
tree-venn-3d                            ▝▀▀▀▞▀▀▄▖
two-vectors-perp-vectors-dashed         ▝▀▚▀▚
wet-floor-atoms-and-bonds               ▝▀▀▚▀▀▀▀▀▀▀▀▀▀▀▀▀▚
wos-laplace-estimator-walk-on-spheres   ▝▀▀▀▚▀▀▀▖
wos-nested-estimator-walk-on-spheres    ▝▀▀▀▀▀▚▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▖
wos-offcenter-estimator-walk-on-spheres ▝▀▀▀▚▀▀▀▀▖
wos-poisson-estimator-walk-on-spheres   ▝▀▀▀▞▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▚

@cloudflare-pages
Copy link

cloudflare-pages bot commented Sep 23, 2022

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: d9d1dcd
Status: ✅  Deploy successful!
Preview URL: https://0a530432.penrose-72l.pages.dev
Branch Preview URL: https://drag-option.penrose-72l.pages.dev

View logs

@wodeni wodeni merged commit bf8cfe2 into main Sep 23, 2022
@wodeni wodeni deleted the drag-option branch September 23, 2022 20:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant