You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The shiny widget that wraps the diffr comparator is excellent. A fine piece of work that is much appreciated. :)
Sadly the width parameter (of diffrOutput) does not allow the widget to be drawn within more than 50% of the available width. Using larger values does bring a horizontal slider into play which suggests that the widget is indeed the size it is asked to be. However the widget is always drawn on the first 50% of available width.
Changing the font size of the browser does improve things. However, it should do as it claims at 100% zoom.
Reprex below:
library(shiny)
library(diffr)
library(dplyr)
ui <- fluidPage(
diffr::diffrOutput(outputId = "Iris", width = "400%") ## here I am using 400% but only 50% is used for the widget display
)
server <- function(input, output) {
output$Iris <- diffr::renderDiffr({
data(iris)
f1 <- tempfile()
f2 <- tempfile()
capture.output(
dplyr::glimpse(iris, width = 120),
file = f1
)
capture.output(
dplyr::glimpse(rev(iris), width = 120),
file = f2
)
diffr::diffr(f1, f2, wordWrap = TRUE)
})
}
# Run the application
shinyApp(ui = ui, server = server)
While this Reprex is using the browser size, my actual use-case involves bslib::cards that switch between card and full screen. The lack of genuine full screen sizing (at 100%) is problematic.
The text was updated successfully, but these errors were encountered:
library(shiny)
library(diffr)
library(dplyr)
ui<- fluidPage(
diffr::diffrOutput(outputId="Iris", width="400%") ## here I am using 400% but only 50% is used for the widget display
)
server<-function(input, output) {
output$Iris<-diffr::renderDiffr({
data(iris)
f1<- tempfile()
f2<- tempfile()
capture.output(
dplyr::glimpse(iris, width=120),
file=f1
)
capture.output(
dplyr::glimpse(rev(iris), width=120),
file=f2
)
diffr::diffr(f1, f2, wordWrap=TRUE)
})
}
# Run the application
shinyApp(ui=ui, server=server)
That was a quick reply.
The shiny control does now occupy the full width available. See my app's screenshot below.
There is quite a bit of wasted space (grey coloured) either side of the main box. I hoped that the actual box might go from edge to edge. I am using width = "100%" for both the diffr() and the diffrOutput() calls. The position of the "original" label is curious.
The shiny widget that wraps the diffr comparator is excellent. A fine piece of work that is much appreciated. :)
Sadly the width parameter (of
diffrOutput
) does not allow the widget to be drawn within more than 50% of the available width. Using larger values does bring a horizontal slider into play which suggests that the widget is indeed the size it is asked to be. However the widget is always drawn on the first 50% of available width.Changing the font size of the browser does improve things. However, it should do as it claims at 100% zoom.
Reprex below:
While this Reprex is using the browser size, my actual use-case involves
bslib::card
s that switch between card and full screen. The lack of genuine full screen sizing (at 100%) is problematic.The text was updated successfully, but these errors were encountered: