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

Experiment with different API for bucketable_list #20

Open
andrie opened this issue Jun 25, 2019 · 0 comments · May be fixed by #26
Open

Experiment with different API for bucketable_list #20

andrie opened this issue Jun 25, 2019 · 0 comments · May be fixed by #26
Assignees
Projects
Milestone

Comments

@andrie
Copy link
Member

andrie commented Jun 25, 2019

Continued from #17 .

The current API is:

bucketable_list(
  text = "This is a bucketable list. You can drag items between the lists.",
  group_name = "bucketable",
  add_sortable_list(
    text = "Drag from here",
    labels = c("a", "bb", "ccc")
  ),
  add_sortable_list(
    text = "to here",
    labels = NULL
  )
)

It would be useful to be able to insert any object into the bucketable_list, so the API becomes:

bucketable_list(
  text = "",
  ...
)

Where the ... can be replaced by one or more sortable_list() calls.

This would require either:

  1. intercept the call and modify the call, or
  2. modify the (deeply nested) list constructed by sortable_list().

I experimented with both approaches and came to the conclusion:

  1. is dangerous, because the user may have constructed the call in any of a number of ways
  2. is very difficult, since the underlying structure of the sortable_list can easily change in future versions, so knowing exactly where to modify the list is hard.

@schloerke is going to look at this.

@schloerke schloerke added this to the v1.1.0 milestone Jul 8, 2019
@schloerke schloerke linked a pull request Jul 8, 2019 that will close this issue
@andrie andrie added this to New in sortable Oct 13, 2020
@andrie andrie moved this from New to Ice box in sortable Oct 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
sortable
Ice box
Development

Successfully merging a pull request may close this issue.

2 participants