-
-
Notifications
You must be signed in to change notification settings - Fork 49
Update R package metadata YAML file for 1.0.2 #147
Conversation
@Marc-Andre-Rivet Could we merge this if there are no objections? |
dash-info.yaml
Outdated
app$layout( | ||
htmlDiv(list( | ||
htmlAcronym(children='Mouse over these words to see the acronym for \'as soon as possible\'.', | ||
title='ASAP') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
htmlAcronym (and htmlAbbr above) should have their props reversed - children is the short text that's always shown, title is the longer explanation of it. https://www.w3docs.com/learn-html/html-acronym-tag.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, will fix this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed in b4e683f
dash-info.yaml
Outdated
|
||
app$layout( | ||
htmlDiv(list( | ||
htmlCaption("This is an example of htmlCaption.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
intended to go in a <table>
https://www.w3docs.com/learn-html/html-caption-tag.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed in f462bce
htmlDetails( | ||
children ="Hello" | ||
) | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use the htmlSummary
example here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed in 03fabd8
) | ||
) | ||
) | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use the htmlDt
example here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed in 344fbfa
) | ||
) | ||
) | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use the htmlDt
example here too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed in db36bfd
dash-info.yaml
Outdated
|
||
app$layout(htmlDiv(list( | ||
htmlFrameset(children = | ||
htmlIframe(width = "600px", height = "600px", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
really? I'd think htmlFrameset
should just show a deprecation comment like htmlFrame
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good, will fix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed in 19551a7
dash-info.yaml
Outdated
|
||
app$layout( | ||
htmlDiv(list( | ||
htmlHeader(htmlH1("This is a header")), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a little confusing this is a heading (<h1>
) inside a header (<header>
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Literally taken straight from the MDN example 😆:
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/header
Will remove the heading tag.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's common to put headings in headers, just the way it's shown it makes it look like you're saying the <h1>
is the header. Anyway yeah, cleaner for an example to just do htmlHeader("This is a header")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed in 64a6b68
Co-Authored-By: alexcjohnson <[email protected]>
Co-Authored-By: alexcjohnson <[email protected]>
dash-info.yaml
Outdated
app$layout( | ||
htmlDiv(list( | ||
htmlIsindex(prompt = 'Search Document..') | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should have a deprecation comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed in 3ed2ec5
Co-Authored-By: alexcjohnson <[email protected]>
htmlDiv(list( | ||
htmlImg(src = "https://upload.wikimedia.org/wikipedia/commons/0/0c/PIA17351-ApparentSizes-MarsDeimosPhobos-EarthMoon.jpg", | ||
useMap = "#image-map"), | ||
htmlMapEl(list( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this the only one that has a different name from its HTML counterpart (<map>
)? we should add a comment about this (and to any others if there are any) so users can find regular HTML documentation about it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed in 5caaeda
dash-info.yaml
Outdated
- name: htmlNextid | ||
dontrun: TRUE | ||
code: | | ||
# Warning: The <nextid> tag is obsolete, as of HTML Version 3.2. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
then take out the code below, which doesn't use htmlNextid
at all?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed in 5555dff
dash-info.yaml
Outdated
htmlH2("Warning: A browser without support for JavaScript | ||
will show the text inside the noscript element. | ||
Since Dash uses JavaScript internally, | ||
using this option might cause incompatibility issues."), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I doubt it... probably just wouldn't show up at all. Anyway since it would need js in order to create it, the only reasonable option is to put <noscript>
in the index template.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't write this example, so I'm not sure. But that makes sense to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed in 46a624c
) | ||
|
||
app$run_server() | ||
- name: htmlObjectEl |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah this one also has a mutated name...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed in 989ac96
|
||
app$run_server() | ||
- name: htmlTfoot | ||
do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we not wrap the strings in htmlP
, just "longstring", htmlWbr(), "secondpart"
? I don't think it does anything as is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This alternative:
app$layout(
htmlDiv(list(
"In a long string, it might be a good idea to add an htmlWbr to specify word breaks",
"Thisverylongstringwithnowhitespaceswon'tlookverygood",
htmlWbr(),
"butatleastyoucanspecifya'natural'placeforthestringtobebrokenup"
)
)
)
yields
In a long string, it might be a good idea to add an htmlWbr to specify word breaksThisverylongstringwithnowhitespaceswon'tlookverygoodbutatleastyoucanspecifya'natural'placeforthestringtobebrokenup
while the original snippet appears to produce
In a long string, it might be a good idea to add an htmlWbr to specify word breaks
Thisverylongstringwithnowhitespaceswon'tlookverygood
butatleastyoucanspecifya'natural'placeforthestringtobebrokenup
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm not worth spending a lot of time on, but if you're already breaking the words into different <p>
then what does it matter if you <wbr>
? Seems like then it just acts as a <br>
. But if I try it in Python using just strings or strings in <span>
s:
html.Div([
"a" * 100,
"b" * 100,
html.Wbr(),
"c" * 100,
html.Wbr(),
html.Span("d" * 100),
html.Span("e" * 100)
])
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting, will merge this now but revisit this example later.
app$layout(htmlDiv(list( | ||
htmlForm(children=list( | ||
htmlP(children=list('Username: ', dccInput(type='text', id='username', placeholder='username'))), | ||
htmlP(children=list('Password: ', dccInput(type='password', id='password', placeholder='password'))), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you need library(dashCoreComponents)
for this example
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed in 209a10d
code: | | ||
library(dash) | ||
library(dashHtmlComponents) | ||
library(dashCoreComponents) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ideally though I suppose we don't want library(dashCoreComponents)
where it's not used... that happens a lot.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, and I'm guilty of the same. It was sloppy to not purge those entries from the examples. We can't always live in the ideal world, but it's better to lead by (good) example.
fixed in 137542f
As discussed on slack, I gave this a more thorough review largely so we can at some point use these code snippets automatically in the dashr.plot.ly docs for the html components. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💃 thanks for the tweaks!
The YAML data used for populating title/description/examples should be up to date in the dev branch. This PR will backcommit the updates.