How to pass information into the ellipsis argument of the widget's custom HTML function?
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
- Issue type
- Documentation
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- r
- Domain
- documentation
Research direction
Start with the custom widget HTML documentation and the createWidget call shown in the issue. Trace how the big argument could reach WIDGETNAME_html before JavaScript, and confirm the supported behavior or document the limitation and intended usage.
Written by the indexing model from the issue text.
Description
The documentation shows that it's possible to create a custom HTML container for a widget:
WIDGETNAME_html <- function(id, style, class, ...){
tags$span(id = id, class = class)
}
How can I, as the widget developer, pass information into the ellipsis argument?
More specifically, suppose I have the following widget definition:
MYWIDGET <- function(data, big = TRUE) {
javascript_data = list()
htmlwidgets::createWidget(name = 'MYWIDGET', x = javascript_data, width = 400, height = 400, big = big)
}
I would want the big argument to be passed to the custom HTML constructor so that I can add an HTML class to the tag. I know I can pass the information into the x parameter, and then deal with it from javascript, but I want to know how to access a variable in the widget's html construction before it gets into the javascript layer.
- Dominant language
- R
- Stars
- 801
- Forks
- 203
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ramnathv/htmlwidgets
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
ramnathv/htmlwidgets#307 · 2 reactions ·
-
Difficulty 3/5 1-2 days Newbie friendliness 52/100
ramnathv/htmlwidgets#495 · 1 reaction ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
ramnathv/htmlwidgets#492 · 2 comments ·
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
ramnathv/htmlwidgets#489 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
ramnathv/htmlwidgets#488 · 1 comment ·
All issues in ramnathv/htmlwidgets
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Bioconductor/BiocCheck#264 ·
-
Length 1 columns are written as scalarsPossibly taken A pull request linked to this issue is open or already merged. Openbug triage
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
easystats/parameters#1290 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
corybrunson/ordr#91 ·