Skip to content

Conversation

wch
Copy link
Collaborator

@wch wch commented Jan 30, 2024

This addresses one of the issues described in #1083.

@wch wch marked this pull request as ready for review February 1, 2024 17:49
@wch wch merged commit 9ba361b into main Feb 1, 2024
@wch wch deleted the hold-list branch February 1, 2024 22:24
@wch
Copy link
Collaborator Author

wch commented Feb 1, 2024

For future reference: The result of ui.hold() is a list. If a RecallContextManager wants to consume the result of a ui.hold(), it could simply use a for loop to iterate over the list:

with ui.hold() as held:
    "a"
    "b"

with ui.card():
    for x in held:
        x

It could also be done in a function like this:

@expressify
def spread(lst: list[object]) -> None:
    for x in lst:
        x

with ui.hold() as held:
    "a"
    " b "

with ui.card():
    spread(held)

schloerke added a commit that referenced this pull request Feb 13, 2024
* main:
  Bump version to 0.7.1.9000
  Fix input_task_button for modules (#1108)
  Bump version to 0.7.1
  Test input task button and extended task decorator (#1099)
  Add remaining examples for express API reference (#1093)
  test: Add `make playwright-debug` to help debug playwright tests (#1097)
  Make input_selectize work correctly within a module (#1091)
  Update types to allow `navset_*` functions to accept `MetadataNode` args (#1094)
  Update changelog
  Update express.ui.hold() to accept any type of object (#1089)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants