Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename accordion methods #730

Closed
schloerke opened this issue Sep 11, 2023 · 2 comments · Fixed by #788
Closed

Rename accordion methods #730

schloerke opened this issue Sep 11, 2023 · 2 comments · Fixed by #788
Assignees

Comments

@schloerke
Copy link
Collaborator

None of the other methods have verbs at the end. To make the names consistent, I propose:

Accordion methods:

  • accordion()
  • accordion_panel()
  • accordion_panel_close()
  • accordion_panel_open()
  • accordion_panel_insert()
  • accordion_panel_remove()
  • accordion_panel_set()
  • update_accordion_panel()
From To Comment
accordion_panel_close() update_accordion_panel(open = False)
accordion_panel_open() update_accordion_panel(open = True)
accordion_panel_set() update_accordion(open=)
update_accordion_panel() update_accordion() (Drop _panel() as it's really updating the accordion, not a single accordion panel
NA toggle_accordion(values = Union[list[str], None]) If values=None, toggles all accordion panels. Otherwise, toggle the specified panels

No adjustments to accordion_panel_insert() or accordion_panel_remove()


cc @cpsievert @gadenbuie

@schloerke schloerke self-assigned this Sep 11, 2023
@gadenbuie
Copy link
Collaborator

gadenbuie commented Sep 12, 2023

I wrote up some thoughts in this area in rstudio/bslib#706.

@cpsievert
Copy link
Collaborator

I would be open to trying to fit everything as verb first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants