positron icon indicating copy to clipboard operation
positron copied to clipboard

targets::tar_visnetwork() shows a blank screen only.

Open CorradoLanera opened this issue 1 year ago • 4 comments

Type: Bug

targets::tar_visnetwork open in plots and not in viewer, showing a blank screen only instead of the widget

image

reprex

tar_dir({ # tar_dir() runs code from a temp dir for CRAN.
     tar_script({
       tar_option_set()
       list(
         tar_target(y1, 1 + 1),
         tar_target(y2, 1 + 1),
         tar_target(z, y1 + y2, description = "sum of two other sums")
       )
     })
     tar_visnetwork()
     tar_visnetwork(allow = starts_with("y")) # see also any_of()
})

VS Code version: Positron 1.90.0 (a893e5b282612ccb2200102957ac38d3c14e5196, 2024-06-26T01:33:58.809Z) OS version: Windows_NT x64 10.0.26120 Modes:

System Info
Item Value
CPUs 11th Gen Intel(R) Core(TM) i7-11370H @ 3.30GHz (8 x 3302)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
Load (avg) undefined
Memory (System) 31.84GB (16.29GB free)
Process Argv
Screen Reader no
VM 0%
Extensions: none

CorradoLanera avatar Jul 01 '24 19:07 CorradoLanera

At a lower level, I tried this, the underlying library for visnetwork functions:

library(visNetwork)
# minimal example
nodes <- data.frame(id = 1:3)
edges <- data.frame(from = c(1,2), to = c(1,3))
visNetwork(nodes, edges, width = "100%")

This also shows in the Plots pane but successfully displays.

image

Positron Info

Positron Version: 2024.06.1 (Universal) build 27 Code - OSS Version: 1.90.0 Commit: a893e5b282612ccb2200102957ac38d3c14e5196 Date: 2024-06-26T02:08:06.673Z Electron: 29.4.0 Chromium: 122.0.6261.156 Node.js: 20.9.0 V8: 12.2.281.27-electron.0 OS: Darwin arm64 23.4.0

jthomasmock avatar Jul 01 '24 19:07 jthomasmock

See #2023; there's a known issue preventing some HTML widgets from showing up correctly in Positron. I think this is another instance of that problem.

jmcphers avatar Jul 01 '24 20:07 jmcphers

Should be resolved with #4151:

image

jmcphers avatar Jul 25 '24 22:07 jmcphers

@jmcphers the issue still there to me. image

Positron Version: 2024.07.0 (system setup) build 2024.07.0-100 Code - OSS Version: 1.91.0 Commit: 9d858046178da1bae0c31309db1a8d8f5ebc8b28 Date: 2024-07-26T03:19:27.206Z Electron: 29.4.0 Chromium: 122.0.6261.156 Node.js: 20.9.0 V8: 12.2.281.27-electron.0 OS: Windows_NT x64 10.0.26120

CorradoLanera avatar Jul 29 '24 05:07 CorradoLanera

This does appear to be working now on OS X. @jmcphers are there any logs that @CorradoLanera could provide to help understand what is happening on Windows?

testlabauto avatar Jul 29 '24 14:07 testlabauto

As of build 107, works for me on Linux.

rmflight avatar Jul 29 '24 14:07 rmflight

On Windows with build 107, this works as well:

image

I think this is ready to be called done @testlabauto. ✅

juliasilge avatar Jul 29 '24 17:07 juliasilge

Verified Fixed

Positron Version(s) : 2024.07.0-107
OS Version          : OSX

Test scenario(s)

Verified on OSX, Linux and windows

Link(s) to TestRail test cases run or created: N/A

testlabauto avatar Jul 29 '24 17:07 testlabauto

I confirm that w/ 107 works with me as well!! image

CorradoLanera avatar Jul 30 '24 01:07 CorradoLanera