Skip to content

Commit

Permalink
docs: use details
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnCoene committed Dec 14, 2023
1 parent a3bb098 commit e920a8f
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

</div>

## Rationale

<details>
<summary>Rationale</summary>
As much as we love the shiny web framework, one great limitation
is how inputs are handled. Inputs are set given an `inputId`
which directly translates to an `id` in the generated HTML.
Expand All @@ -20,17 +20,18 @@ Whilst manageable UI-side with a simple loop it makes a mess server-side as one
to dynamically create and destroy observers.

This project takes inspiration from vanilla JavaScript where one can
"observe" on any valid selector such as a `.class`
(as opposed to shiny which can only observe on `#id`), this means
one can have a single `observe` for multiple inputs.
"observe" on any valid selector such as a <code>.class</code>
(as opposed to shiny which can only observe on <code>#id</code>), this means
one can have a single <code>observe</code> for multiple inputs.

This project implements something similar for shiny by allowing
users to create inputs that, instead of `inputId`, take
a `name` argument which __can be shared by multiple inputs__.
users to create inputs that, instead of <code>inputId</code>, take
a <code>name</code> argument which <strong>can be shared by multiple inputs</strong>.
This makes it is possible to sensibly dynamically generate
inputs in R.

You can see a small explanation/example with `gallery()`.
You can see a small explanation/example with <code>gallery()</code>.
</details>

## Inputs

Expand Down

0 comments on commit e920a8f

Please sign in to comment.