From 51e9fadf33af96162b6fe4d04b6e770d44bd6e7c Mon Sep 17 00:00:00 2001 From: Simon Couch Date: Thu, 27 Aug 2026 16:13:48 -0700 Subject: [PATCH 1/4] Restyle run_r details disclosure --- pkg-r/inst/www/commons-chat/commons-chat.css | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/pkg-r/inst/www/commons-chat/commons-chat.css b/pkg-r/inst/www/commons-chat/commons-chat.css index 74243021..3c9dfcf3 100644 --- a/pkg-r/inst/www/commons-chat/commons-chat.css +++ b/pkg-r/inst/www/commons-chat/commons-chat.css @@ -367,10 +367,19 @@ shiny-chat-container .commons-run-r-details > summary { color: var(--bs-secondary-color, #6c757d); cursor: pointer; - font-size: 0.72rem; - font-weight: 600; - letter-spacing: 0.07em; - text-transform: uppercase; + font-size: 0.85rem; + font-weight: 400; + width: fit-content; +} + +.commons-run-r-details > summary:hover { + color: var(--bs-body-color, #212529); +} + +.commons-run-r-details > summary:focus-visible { + border-radius: var(--bs-border-radius-sm, 0.25rem); + outline: 2px solid var(--bs-primary, #007bc2); + outline-offset: 2px; } .commons-run-r-display .commons-run-r-code { From 08d1b0d603598e529d95b23716bbd21e5e1cc06e Mon Sep 17 00:00:00 2001 From: Simon Couch Date: Thu, 27 Aug 2026 16:20:30 -0700 Subject: [PATCH 2/4] Inherit run_r disclosure typography --- pkg-r/inst/www/commons-chat/commons-chat.css | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/pkg-r/inst/www/commons-chat/commons-chat.css b/pkg-r/inst/www/commons-chat/commons-chat.css index 3c9dfcf3..f07ce224 100644 --- a/pkg-r/inst/www/commons-chat/commons-chat.css +++ b/pkg-r/inst/www/commons-chat/commons-chat.css @@ -365,17 +365,12 @@ shiny-chat-container } .commons-run-r-details > summary { - color: var(--bs-secondary-color, #6c757d); + color: inherit; cursor: pointer; - font-size: 0.85rem; - font-weight: 400; + font: inherit; width: fit-content; } -.commons-run-r-details > summary:hover { - color: var(--bs-body-color, #212529); -} - .commons-run-r-details > summary:focus-visible { border-radius: var(--bs-border-radius-sm, 0.25rem); outline: 2px solid var(--bs-primary, #007bc2); From d00367f97a782f4fe17ea92cd77ad2c7afcc3b8e Mon Sep 17 00:00:00 2001 From: Simon Couch Date: Thu, 27 Aug 2026 16:31:20 -0700 Subject: [PATCH 3/4] Use outlined run_r details chevron --- pkg-r/inst/www/commons-chat/commons-chat.css | 23 ++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/pkg-r/inst/www/commons-chat/commons-chat.css b/pkg-r/inst/www/commons-chat/commons-chat.css index f07ce224..dc0570c8 100644 --- a/pkg-r/inst/www/commons-chat/commons-chat.css +++ b/pkg-r/inst/www/commons-chat/commons-chat.css @@ -365,12 +365,35 @@ shiny-chat-container } .commons-run-r-details > summary { + align-items: center; color: inherit; cursor: pointer; + display: flex; font: inherit; + gap: 0.45em; + list-style: none; width: fit-content; } +.commons-run-r-details > summary::-webkit-details-marker { + display: none; +} + +.commons-run-r-details > summary::before { + border-bottom: 1px solid currentColor; + border-right: 1px solid currentColor; + content: ""; + flex: 0 0 auto; + height: 0.45em; + transform: rotate(-45deg); + transform-origin: center; + width: 0.45em; +} + +.commons-run-r-details[open] > summary::before { + transform: rotate(45deg); +} + .commons-run-r-details > summary:focus-visible { border-radius: var(--bs-border-radius-sm, 0.25rem); outline: 2px solid var(--bs-primary, #007bc2); From e109bfc3bdaed9cc5010ddb2c31300f83e6365f3 Mon Sep 17 00:00:00 2001 From: Simon Couch Date: Thu, 27 Aug 2026 16:33:21 -0700 Subject: [PATCH 4/4] Smooth run_r details disclosure --- pkg-r/inst/www/commons-chat/commons-chat.css | 21 ++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/pkg-r/inst/www/commons-chat/commons-chat.css b/pkg-r/inst/www/commons-chat/commons-chat.css index dc0570c8..c09d1620 100644 --- a/pkg-r/inst/www/commons-chat/commons-chat.css +++ b/pkg-r/inst/www/commons-chat/commons-chat.css @@ -387,6 +387,7 @@ shiny-chat-container height: 0.45em; transform: rotate(-45deg); transform-origin: center; + transition: transform 0.3s ease-in-out; width: 0.45em; } @@ -400,6 +401,26 @@ shiny-chat-container outline-offset: 2px; } +.commons-run-r-details[open] > .commons-run-r-code { + animation: commons-run-r-details-reveal 0.2s ease-out; +} + +@keyframes commons-run-r-details-reveal { + from { + opacity: 0; + } +} + +@media (prefers-reduced-motion: reduce) { + .commons-run-r-details > summary::before { + transition: none; + } + + .commons-run-r-details[open] > .commons-run-r-code { + animation: none; + } +} + .commons-run-r-display .commons-run-r-code { margin: 0; overflow-x: auto;