Joe Cheng
aaba9aafd0
Add session ID to graph entries
2014-08-04 20:06:26 -04:00
Yihui Xie
c095085d84
fixes #557 : choicesWithNames() turns a character vector to a list, which is no longer appropriate as a column in data.frame()
2014-08-01 16:37:20 -05:00
Winston Chang
21fb7959a5
Fix edge case with nested choices. Fixes #560
...
When the set of choices is a list containing a named vector of length 1,
choicesWithNames would return the wrong result.
2014-08-01 16:11:51 -05:00
Winston Chang
c7e0bd037a
Merge pull request #552 from rstudio/no-catools
...
Remove caTools dependency
2014-07-25 14:43:15 -05:00
Yihui Xie
ab618235f1
one more check before we use UTF-8: see if there are embedded nul's
2014-07-24 14:48:23 -05:00
Joe Cheng
e4239c924b
Remove caTools dependency
...
Instead, use base64 encoding function from httpuv
2014-07-24 10:37:14 -07:00
Yihui Xie
ffead9ed70
add explanations of skipping *nix when checking encoding, and point to the shiny dev center article
2014-07-24 11:57:46 -05:00
Yihui Xie
983e7e9b75
warn against the byte order mark if exists; fixes #545
2014-07-22 16:22:50 -05:00
Yihui Xie
029595f8ea
an edge case selectInput(choices = NULL)
...
firstChoice() may fail with an error "subscript out of bounds"
2014-07-17 15:59:33 -05:00
Yihui Xie
f6bf4a416f
Merge pull request #537 from yihui/bugfix/native-encoding
...
Use native encoding internally
2014-07-17 14:49:53 -05:00
Yihui Xie
af978a68e3
tweak the warning message
...
and simply stop() in case the user has set option(encoding = 'UTF-8')
2014-07-17 14:39:21 -05:00
Yihui Xie
89dc1323e1
add a note section about the clickId/hoverId arguments in plotOutput(), since they seem to have been confusing grid graphics users
...
and re-wrap the roxygen comments
2014-07-16 17:27:00 -05:00
Yihui Xie
a4b5f63deb
a single quote ' was omitted here, making the Rd for plotOutput() incomplete since this line was ignored
2014-07-16 17:27:00 -05:00
Winston Chang
7159293337
Use consistent indentation for function definitions
2014-07-16 17:04:22 -05:00
Winston Chang
4a5b31e3a7
Simplify needOptgroup function
2014-07-16 16:57:17 -05:00
Yihui Xie
29dd405fe5
the options and ... arguments are no longer needed
2014-07-16 15:50:31 -05:00
Yihui Xie
0f0b0cd3d8
explicitly define updateSelectInput() instead of using the trick to change the options argument of updateInputOptions()
2014-07-16 15:50:08 -05:00
Winston Chang
597e86dd57
Make listify work on nested lists of depth > 1
2014-07-16 12:02:55 -05:00
Winston Chang
9b413de4d8
selectOptions: handle mixed options and optgroups
2014-07-16 00:51:57 -05:00
Winston Chang
3d77cbd677
Slight clarification of comment
2014-07-16 00:51:57 -05:00
Winston Chang
d7a01c32cc
Always convert choices to a (named) list
...
Converting it to a list, and ensuring that it's a named list reduces
many checks elsewhere.
2014-07-16 00:51:57 -05:00
Yihui Xie
cc493fd545
fall back to native encoding on Windows if UTF-8 does not work
2014-07-15 16:05:23 -05:00
Yihui Xie
6b8679454d
factor out .Platform$OS.type == 'windows' as isWindows()
2014-07-15 16:04:02 -05:00
Yihui Xie
1b68d61e54
R CMD check will warn against the possibly missing variables inline and type
2014-07-11 17:36:37 -05:00
Yihui Xie
418de862e6
rename newOptions to config
2014-07-11 14:17:08 -05:00
Yihui Xie
413653858e
inherit doc for updateFooInput() from fooInput()
2014-07-11 14:03:47 -05:00
Yihui Xie
f0886a7556
when we need <optgroup> for the child elements of choices, we just generate it no matter what the child element is
...
e.g. we use <optgroup> for A even if A only has one element: list(A = 'a', B = c('b1', 'b2'))
2014-07-11 14:03:47 -05:00
Yihui Xie
0e2666948f
when choice is not a list, we need to return its first element
2014-07-11 14:03:47 -05:00
Yihui Xie
d2fc851816
make updateSelectInput(), updateCheckboxGroupInput(), and updateRadioButtons() work
...
now session$sendInputMessage() does not send options as the choices data, but as a pre-generated raw HTML string; in shiny.js, we just receive this string, and .append() it to the input after the input is emptied
2014-07-11 14:03:47 -05:00
Yihui Xie
e1fb29c8c5
factor out the code to generate options from checkboxGrouptInput() and radioButtons(), and use the new generator generateOptions() for them
2014-07-11 14:03:47 -05:00
Yihui Xie
fe3158fdd6
validateSelected() does not validate selected for the optgroup case; this function is only for shiny <= 0.9
2014-07-11 14:03:47 -05:00
Yihui Xie
721b26f80b
choicesWithNames() should also consider the optgroup case now: all optgroup nodes must be named
2014-07-11 14:03:47 -05:00
Yihui Xie
d3ecfb22ee
closes #326 : generate <optgroup> when choices is a named list of choices
...
note the nested level of optgroup can be greater than one here, however, the HTML4 spec only allows one level, i.e. optgroup must have select as its direct parent http://stackoverflow.com/q/1037732/559676
2014-07-11 14:03:47 -05:00
Yihui Xie
27a98020c9
recursively select the first choice, to make sure selected is a scalar, even when choices is a list of lists (optgroup)
2014-07-11 14:03:47 -05:00
Yihui Xie
ab56b72f39
json2.js modified and uglified from https://github.com/yihui/JSON-js via http://lisperator.net/uglifyjs/
...
I'm using the date of json2 as its version number, since it does not really have a version number
This should close rstudio/shiny-server#79
2014-07-10 17:56:23 -05:00
Yihui Xie
8063f66958
let's read ui.R, server.R, README.md, and DESCRIPTION also with UTF-8
...
the reason for this is that htmltools::htmlEscape() uses gsub(..., x, fixed =
TRUE), which does not work on Windows if x is encoded in UTF-8; fixed = TRUE
only works with the native encoding
2014-07-10 15:59:42 -05:00
Yihui Xie
bf270b9adb
convert the message to native encoding from UTF-8 before decoding it
...
on Windows, switch(input$foo, foo1 = val1) does not work even if input$foo ==
foo1 but Encoding(input$foo) is UTF-8 while foo1 is unknown (native encoding);
to prevent such problems, let's always use native encoding inside the shiny
process, and only do the UTF-8 conversion at I/O time
special thanks to @desar for the thorough tests
2014-07-10 15:59:42 -05:00
Yihui Xie
6326c7cbaa
add a Note section to the documentation of conditionalPanel(), since it always confuses R users
...
e.g. https://groups.google.com/d/msg/shiny-discuss/AFItYcRXzyw/ywRy3EEtjw4J
2014-07-10 00:11:11 -05:00
Joe Cheng
9f76def7ce
Merge pull request #533 from rstudio/bugfix/slow-options
...
Calling getOption() with default is slow
2014-07-06 16:38:25 -07:00
Joe Cheng
3458d924ca
Calling getOption() with default is slow
...
This has a measurable effect in apps with lots of reactives.
Reported by Aran Lunzer
2014-07-06 12:10:51 -07:00
Yihui Xie
0749b9500c
use UTF-8 for showcase mode, and assume DESCRIPTION is also UTF-8
...
this time we should fix #136 now; I did not find other files that have to be
read with UTF-8
2014-06-26 15:41:12 -05:00
Jonathan McPherson
7b25c282c0
append rather than replace knit_meta with Shiny warning
2014-06-25 10:20:07 -07:00
Jonathan McPherson
f266cab580
emit R Markdown warnings for render* functions as well as shinyApps
2014-06-24 16:43:58 -07:00
Yihui Xie
23bf9aaf17
Merge pull request #526 from rstudio/bugfix/plot-captures-output
...
Revert "tweak after #492 : capture.output() does withVisible() and print(...
2014-06-24 13:40:45 -05:00
Joe Cheng
1983f60ec6
Revert "tweak after #492 : capture.output() does withVisible() and print() if necessary"
...
This reverts commit 451f950d0d .
Too-aggressive capture.output was causing browser() not to work in
renderPlot().
2014-06-24 06:09:36 -07:00
Joe Cheng
77b125ce2d
Add windowTitle parameter to navbarPage
...
Fixes #493
2014-06-19 09:36:50 -07:00
Yihui Xie
4a623b596b
ignore width/height in plotOutput() when inline=TRUE, and document required width/height values in renderPlot()
2014-06-19 00:24:10 -05:00
Yihui Xie
bcf098ea7d
merge doc of width and height in renderPlot() and plotOutput()
2014-06-19 00:24:10 -05:00
Yihui Xie
691615108b
preserve the formal arguments of plotOutput() in outputFunc()
...
otherwise outputFunc() loses the `inline` argument, and knit_print() won't be able to produce inline plots
2014-06-19 00:24:10 -05:00
Yihui Xie
858ab00e36
closes #501 : knit_print() for inline output uses the inline argument passed from knitr
2014-06-19 00:24:10 -05:00