Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Tag classes should be normalized on creation #205

Copy link
Copy link

Description

@wch
Issue body actions

Tag classes are way too freeform and this makes it difficult to work with them. For example:

x <- div(class = "a", class = "b c", class = c("d", "e f"))
str(x)
#> List of 3
#>  $ name    : chr "div"
#>  $ attribs :List of 3
#>   ..$ class: chr "a"
#>   ..$ class: chr "b c"
#>   ..$ class: chr [1:2] "d" "e f"
#>  $ children: list()
#>  - attr(*, "class")= chr "shiny.tag"

It would be better if this were translated to a data structure like c("a", "b", "c", "d", "e", "f") or "a b c d e f" when the tag is created.

Edit: I've realized that class isn't special; it makes sense to do this with all HTML attributes. We'll have to be careful about types, though (attributes can be atomic vectors, but they can also be lists or tag objects).

We should also make tagAppendAttribute and friends do the same thing.

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.