Skip to content

Conversation

@mikeprosserni
Copy link
Collaborator

@mikeprosserni mikeprosserni commented May 29, 2025

What does this Pull Request accomplish?

  • Adds more information to EnumeratePanels in the .proto file, including the state of the panel (open or not) and the list of available value_ids.
  • Adds __enter__() and __exit__() to StreamlitPanel, so that with can 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_empty
test___open_panels___both_panels_open_and_in_memory
test___open_panels___close_panel_1_with_reset___panel_1_not_in_memory
test___open_panels___close_panel_1_without_reset___both_panels_in_memory
test___set_value___enumerate_panels_shows_value

tests for StreamlitPanel:
test___open_panel___panel_is_open_and_in_memory
test___with_panel___set_value___gets_same_value
test___with_panel___opens_and_closes_panel

@github-actions
Copy link
Contributor

github-actions bot commented May 29, 2025

Test Results

 10 files  ± 0   10 suites  ±0   8s ⏱️ -1s
 41 tests + 4   41 ✅ + 4  0 💤 ±0  0 ❌ ±0 
380 runs  +40  380 ✅ +40  0 💤 ±0  0 ❌ ±0 

Results for commit 0fd6f37. ± Comparison against base commit 34e2f07.

♻️ This comment has been updated with latest results.

@mikeprosserni mikeprosserni marked this pull request as ready for review May 29, 2025 18:33
@mikeprosserni mikeprosserni requested a review from csjall as a code owner May 29, 2025 18:33
Copy link
Collaborator

@csjall csjall left a 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.

@mikeprosserni mikeprosserni requested a review from csjall May 29, 2025 21:01
@mikeprosserni mikeprosserni enabled auto-merge (squash) May 29, 2025 21:01
@csjall csjall changed the title Expand enumerate_panels(), add support for with, and add clear_value() Expand enumerate_panels(), add support for with May 29, 2025
@mikeprosserni mikeprosserni merged commit 75c1d63 into main May 29, 2025
14 checks passed
@mikeprosserni mikeprosserni deleted the users/mprosser/task-3140758-expand-enumerate branch May 30, 2025 14:12
Comment on lines +14 to +18
if TYPE_CHECKING:
if sys.version_info >= (3, 11):
from typing import Self
else:
from typing_extensions import Self
Copy link
Collaborator

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.

#57

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.

4 participants