Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@sfc-gh-nbellante
Copy link
Contributor

@sfc-gh-nbellante sfc-gh-nbellante commented Apr 9, 2025

Describe your changes

  • Added a reference for the resizable element to improve width handling.
  • Updated the onResizeStop callback to use the actual width of the sidebar instead of a delta value, ensuring accurate width adjustments.
  • Modified the resetSidebarWidth function to reset the sidebar width on double-clicking the resize handle.

This fixes:

  1. only doubleclick will reset width
  2. no weird sizing when clicking or trying to resize sidebar

GitHub Issue Link (if applicable)

fixes #11062

Testing Plan

E2E tests have been added to lock in this functionality.


Contribution License Agreement

By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.

@snyk-io
Copy link
Contributor

snyk-io bot commented Apr 9, 2025

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

security/snyk check is complete. No issues have been found. (View Details)

license/snyk check is complete. No issues have been found. (View Details)

@github-actions
Copy link
Contributor

github-actions bot commented Apr 9, 2025

✅ PR preview is ready!

Name Link
📦 Wheel file https://core-previews.s3-us-west-2.amazonaws.com/pr-11063/streamlit-1.44.1-py3-none-any.whl
🕹️ Preview app pr-11063.streamlit.app (☁️ Deploy here if not accessible)

@sfc-gh-nbellante sfc-gh-nbellante added security-assessment-completed Security assessment has been completed for PR change:bugfix PR contains bug fix implementation impact:users PR changes affect end users labels Apr 9, 2025
@sfc-gh-nbellante sfc-gh-nbellante marked this pull request as draft April 9, 2025 18:43
@sfc-gh-nbellante sfc-gh-nbellante changed the title Enhance Sidebar component with resizable functionality Bugfix#11062 Apr 9, 2025
@sfc-gh-nbellante sfc-gh-nbellante changed the title Bugfix#11062 Bugfix 11062: Sidebar resizing Apr 10, 2025
@sfc-gh-nbellante sfc-gh-nbellante marked this pull request as ready for review April 14, 2025 16:46
Copy link
Collaborator

@sfc-gh-bnisco sfc-gh-bnisco left a comment

Choose a reason for hiding this comment

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

Thanks for fixing! I have some suggestions/questions inline

@sfc-gh-nbellante sfc-gh-nbellante changed the title Bugfix 11062: Sidebar resizing BugFix 11062: Sidebar resizing Apr 14, 2025
- Added a reference for the resizable element to improve width handling.
- Updated the onResizeStop callback to use the actual width of the sidebar instead of a delta value, ensuring accurate width adjustments.
- Modified the resetSidebarWidth function to reset the sidebar width on double-clicking the resize handle.

These changes improve the user experience by providing a more reliable resizing mechanism for the sidebar.
Copy link
Collaborator

@sfc-gh-bnisco sfc-gh-bnisco left a comment

Choose a reason for hiding this comment

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

Nice, thanks for the revisions! Please update the PR description now that tests have been added.

@sfc-gh-nbellante sfc-gh-nbellante merged commit 0d92c16 into develop Apr 16, 2025
34 checks passed
@sfc-gh-nbellante sfc-gh-nbellante deleted the nico/bugfix-11062 branch April 16, 2025 21:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

change:bugfix PR contains bug fix implementation 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.

st.logo with sidebar resize interactions issues

3 participants