Skip to content
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

Fix: st.page_link URL preview shows file path #8086

Merged
merged 5 commits into from Feb 8, 2024
Merged

Conversation

mayagbarnes
Copy link
Collaborator

Describe your changes

Fix href setting for page links

GitHub Issue Link (if applicable)

Closes #8080

@@ -682,7 +682,7 @@ def _page_link(
if label is None:
page_link_proto.label = page_name
page_link_proto.page_script_hash = page_data["page_script_hash"]
page_link_proto.page = full_path
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

page is fed to the href attribute in PageLink.tsx - this is what shows in the browser preview in the bottom left corner.

@mayagbarnes mayagbarnes marked this pull request as draft February 6, 2024 19:09
@mayagbarnes mayagbarnes marked this pull request as ready for review February 7, 2024 04:11
Copy link
Collaborator

@vdonato vdonato left a comment

Choose a reason for hiding this comment

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

LGTM, although I think we'll also want to verify the fields are all set correctly in a unit test if it's not too difficult to add one

@mayagbarnes mayagbarnes merged commit fdf54e3 into develop Feb 8, 2024
38 checks passed
@mayagbarnes mayagbarnes deleted the fix-8080 branch February 8, 2024 22:39
kmcgrady pushed a commit that referenced this pull request Feb 8, 2024
Fix href setting for page links and update error message on invalid pages
zyxue pushed a commit to zyxue/streamlit that referenced this pull request Apr 16, 2024
Fix href setting for page links and update error message on invalid pages
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

page_link URL preview shows file path instead of URL path
2 participants