posit-dev / posit-dev/py-shiny
Action button as accordion panel icon ruins accordion
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.8k
- Forks
- 135
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 21
Description
When adding an action button as the icon for an accordion panel, the accordion fails to render correctly. The first title is shown below the panel, and the rest of the panel do not appear at all.
Example app:
from shiny import App, Inputs, Outputs, Session, reactive, render, ui
def make_items():
return [
ui.accordion_panel(
f'Section {letter}',
f"Some narrative for section {letter}",
icon=ui.input_action_button(id=letter, label='#'))
for letter in "ABCDE"
]
app_ui = ui.page_fluid(
ui.accordion(*make_items(), id="acc")
)
app = App(app_ui, None)
Thanks for producing this package, I'm really enjoying using it.
Contributor guide
No contributing guide indexed for this repository
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.
Research direction
Start by running the provided Python example app and inspect how ui.accordion_panel renders an ui.input_action_button used as its icon. Trace the accordion and action-button rendering paths to find why the first title is misplaced and later panels disappear; done means all five panels render correctly with the action-button icons.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100