-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Reporting of output styles (colors and fonts) #2740
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9b6aa6c
to
3018fa1
Compare
This comment has been minimized.
This comment has been minimized.
jcheng5
reviewed
Jan 19, 2020
cpsievert
added a commit
to cpsievert/htmlwidgets
that referenced
this pull request
Feb 7, 2020
cpsievert
added a commit
to cpsievert/htmlwidgets
that referenced
this pull request
Feb 9, 2020
4d7451f
to
3124420
Compare
jcheng5
reviewed
Feb 19, 2020
jcheng5
reviewed
Feb 19, 2020
jcheng5
reviewed
Feb 19, 2020
cpsievert
commented
Feb 20, 2020
1 task
203707b
to
9720270
Compare
9367e84
to
f2c85b1
Compare
This was referenced Mar 4, 2020
22bb139
to
0b45628
Compare
15f87b9
to
2e5c63a
Compare
cpsievert
commented
Apr 14, 2020
hadley
reviewed
Apr 14, 2020
cpsievert
commented
May 1, 2020
wch
reviewed
May 5, 2020
wch
reviewed
May 5, 2020
wch
reviewed
May 5, 2020
cpsievert
commented
May 5, 2020
…n't always invalidate
cpsievert
added a commit
to rstudio/shinycoreci-apps
that referenced
this pull request
May 6, 2020
wch
reviewed
May 6, 2020
8215912
to
c7f0484
Compare
wch
reviewed
May 6, 2020
wch
reviewed
May 6, 2020
wch
reviewed
May 6, 2020
wch
reviewed
May 6, 2020
wch
approved these changes
May 6, 2020
cpsievert
added a commit
to cpsievert/htmlwidgets
that referenced
this pull request
May 6, 2020
jcheng5
pushed a commit
to ramnathv/htmlwidgets
that referenced
this pull request
May 6, 2020
* Add reportTheme arg to shinyWidgetOutput(), in anticipation of rstudio/shiny#2740 * Throw message if reportTheme is TRUE and there is an outdated shiny version * news typo
schloerke
added a commit
to rstudio/shinycoreci-apps
that referenced
this pull request
May 7, 2020
* master: turn it into a full automated test text can still appear even if the font is not rendered correctly Add a test for png(type='cairo'), ensure Cairo+ragg are installed, re-organize flag as manual app Add a testing app for rstudio/shiny#2740
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds the ability to obtain computed CSS styles of output containers via
getCurrentOutputInfo()
within anyrenderPlot()
,renderImage()
, or any output binding with a.shiny-report-theme
class. Currently the computed styles includebg
(background-color),fg
(color),accent
(link-color),font
(font-family), andrenderedFamily
(the actual font-family chosen by the browser....this information is only available ifFontFaceSet.check()
is available). For example:Note that after this change,
htmlwidgets::shinyWidgetOutput()
will gain areportTheme
argument to make it easier for htmlwidgets developers to include the.shiny-report-theme
class (and, thus, access styles withgetCurrentOutputInfo()
).In addition, a new
shiny.useragg
option was added to useragg::agg_png()
overCairo::CairoPNG
and non-quartzpng()
(if ragg is installed). For now, this option will default toFALSE
, but will likely default toTRUE
in a future release.Testing notes
Install
remotes::install_github("rstudio/shiny")
, then run the example app above and confirm that you see the same information as the screenshot. That's ok if you see differences in thefont
information, but everything else (i.e.,bg
,fg
,accent
) should be the same.There's also a fully automated testing app here https://github.com/rstudio/shinycoreci-apps/blob/master/apps/181-report-theme/app.R