Skip to content

Conversation

@mayagbarnes
Copy link
Collaborator

@mayagbarnes mayagbarnes commented Oct 16, 2025

Describe your changes

Part 4 of StreamlitContextProvider updates
Adds new SidebarConfigContext with the following:

  • initialSidebarState
  • appLogo
  • sidebarChevronDownshift
  • expandSidebarNav
  • hideSidebarNav

Testing Plan

  • JS Unit Tests: ✅ Updated

@snyk-io
Copy link
Contributor

snyk-io bot commented Oct 16, 2025

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 16, 2025

✅ PR preview is ready!

Name Link
📦 Wheel file https://core-previews.s3-us-west-2.amazonaws.com/pr-12791/streamlit-1.51.0-py3-none-any.whl
📦 @streamlit/component-v2-lib Download from artifacts
🕹️ Preview app pr-12791.streamlit.app (☁️ Deploy here if not accessible)

Copy link
Collaborator Author

mayagbarnes commented Oct 16, 2025

@mayagbarnes mayagbarnes changed the title Add SidebarConfigContext Add SidebarConfigContext Oct 16, 2025
@mayagbarnes mayagbarnes added security-assessment-completed Security assessment has been completed for PR impact:users PR changes affect end users change:refactor PR contains code refactoring without behavior change labels Oct 16, 2025 — with Graphite App
@sfc-gh-mbarnes sfc-gh-mbarnes force-pushed the navigation-sidebar-contexts branch from fab04ec to 65881e8 Compare October 16, 2025 17:42
@sfc-gh-mbarnes sfc-gh-mbarnes force-pushed the sidebar-config-context branch 2 times, most recently from 0c4918e to f9d7623 Compare October 16, 2025 21:32
@sfc-gh-mbarnes sfc-gh-mbarnes force-pushed the navigation-sidebar-contexts branch from 65881e8 to 49a5c47 Compare October 16, 2025 21:32
@sfc-gh-mbarnes sfc-gh-mbarnes force-pushed the sidebar-config-context branch 2 times, most recently from e43a48f to a0bba88 Compare October 21, 2025 21:25
@sfc-gh-mbarnes sfc-gh-mbarnes force-pushed the navigation-sidebar-contexts branch from 84d2d68 to 3d70b6e Compare October 21, 2025 21:25
@mayagbarnes mayagbarnes changed the base branch from navigation-sidebar-contexts to graphite-base/12791 October 27, 2025 17:57
@mayagbarnes mayagbarnes changed the base branch from graphite-base/12791 to navigation-sidebar-contexts October 28, 2025 07:39
@github-actions
Copy link
Contributor

github-actions bot commented Oct 28, 2025

📈 Frontend coverage change detected

The frontend unit test (vitest) coverage has increased by 0.0100%

  • Current PR: 86.0600% (49859 lines, 6946 missed)
  • Latest develop: 86.0500% (49816 lines, 6946 missed)

✅ Coverage change is within normal range.

📊 View detailed coverage comparison

@mayagbarnes mayagbarnes marked this pull request as ready for review October 28, 2025 18:20
@mayagbarnes mayagbarnes requested a review from Copilot October 28, 2025 18:20
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a new SidebarConfigContext to improve context separation and organization in the Streamlit frontend architecture. The change moves sidebar-related configuration properties (initialSidebarState, appLogo, sidebarChevronDownshift, expandSidebarNav, hideSidebarNav) from AppContext to a dedicated SidebarConfigContext.

Key changes:

  • Created new SidebarConfigContext with comprehensive documentation
  • Updated all components to consume sidebar config from the new context
  • Refactored test utilities to support the new context provider
  • Removed appLogo prop drilling through component trees

Reviewed Changes

Copilot reviewed 21 out of 21 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
frontend/lib/src/components/core/SidebarConfigContext.tsx New context file defining sidebar configuration properties
frontend/lib/src/index.ts Exports new SidebarConfigContext and types
frontend/app/src/components/StreamlitContextProvider.tsx Integrates SidebarConfigContext into provider hierarchy
frontend/app/src/components/AppContext.tsx Removes sidebar-related properties
frontend/app/src/components/AppView/AppView.tsx Consumes sidebar config from new context instead of props/AppContext
frontend/app/src/components/Sidebar/Sidebar.tsx Uses SidebarConfigContext instead of AppContext for sidebar properties
frontend/app/src/components/Navigation/SidebarNav.tsx Switches from AppContext to SidebarConfigContext
frontend/lib/src/test_util.tsx Adds SidebarConfigContext support to test rendering utilities
frontend/app/src/components/AppView/AppView.test.tsx Updates tests to use new context structure
frontend/app/src/components/Sidebar/Sidebar.test.tsx Refactors tests to provide SidebarConfigContext
frontend/app/src/components/Navigation/SidebarNav.test.tsx Updates test helpers to use SidebarConfigContext
frontend/app/src/App.tsx Removes appLogo prop from AppView
Multiple test files Adds empty SidebarConfigContext overrides to maintain test compatibility

@sfc-gh-mbarnes sfc-gh-mbarnes force-pushed the navigation-sidebar-contexts branch from 4ba6af1 to 352b359 Compare October 29, 2025 23:10
@sfc-gh-mbarnes sfc-gh-mbarnes force-pushed the navigation-sidebar-contexts branch from 352b359 to 1985977 Compare October 30, 2025 02:06
Base automatically changed from navigation-sidebar-contexts to develop October 30, 2025 02:29
@mayagbarnes mayagbarnes merged commit 2cd9886 into develop Oct 30, 2025
37 checks passed
@mayagbarnes mayagbarnes deleted the sidebar-config-context branch October 30, 2025 02:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

change:refactor PR contains code refactoring without behavior change impact:users PR changes affect end users security-assessment-completed Security assessment has been completed for PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants