-
Notifications
You must be signed in to change notification settings - Fork 0
Expand enumerate_panels(), add support for with #50
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
Expand enumerate_panels(), add support for with #50
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was only expecting EnumeratePanels, PanelInformation change and with. All the new methods on the public API is something we should discuss more in detail before adding.
| if TYPE_CHECKING: | ||
| if sys.version_info >= (3, 11): | ||
| from typing import Self | ||
| else: | ||
| from typing_extensions import Self |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're not doing this anymore. Use typing_extensions directly.
What does this Pull Request accomplish?
EnumeratePanelsin the .proto file, including the state of the panel (open or not) and the list of available value_ids.__enter__()and__exit__()to StreamlitPanel, so thatwithcan be used on panels.Why should this Pull Request be merged?
Implements AB#3140758
What testing has been done?
tests for PanelClient:
test___enumerate_panels_is_emptytest___open_panels___both_panels_open_and_in_memorytest___open_panels___close_panel_1_with_reset___panel_1_not_in_memorytest___open_panels___close_panel_1_without_reset___both_panels_in_memorytest___set_value___enumerate_panels_shows_valuetests for StreamlitPanel:
test___open_panel___panel_is_open_and_in_memorytest___with_panel___set_value___gets_same_valuetest___with_panel___opens_and_closes_panel