-
Notifications
You must be signed in to change notification settings - Fork 4k
Remove set_page_config restrictions
#11286
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
Conversation
✅ PR preview is ready!
|
🎉 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) |
| "🔥™🎉🚀🌌💣✨🌙🎆🎇💥🤩🤙🌛🤘⬆💡🤪🥂⚡💨🌠🎊🍿😛🔮🤟🌃🍃🍾💫▪🌴🎈🎬🌀🎄😝☔⛽🍂💃😎🍸🎨🥳☀😍🅱🌞😻🌟😜💦💅🦄😋😉👻🍁🤤👯🌻‼🌈👌🎃💛😚🔫🙌👽🍬🌅☁🍷👭☕🌚💁👅🥰🍜😌🎥🕺❕🧡☄💕🍻✅🌸🚬🤓🍹®☺💪😙☘🤠✊🤗🍵🤞😂💯😏📻🎂💗💜🌊❣🌝😘💆🤑🌿🦋😈⛄🚿😊🌹🥴😽💋😭🖤🙆👐⚪💟☃🙈🍭💻🥀🚗🤧🍝💎💓🤝💄💖🔞⁉⏰🕊🎧☠♥🌳🏾🙉⭐💊🍳🌎🙊💸❤🔪😆🌾✈📚💀🏠✌🏃🌵🚨💂🤫🤭😗😄🍒👏🙃🖖💞😅🎅🍄🆓👉💩🔊🤷⌚👸😇🚮💏👳🏽💘💿💉👠🎼🎶🎤👗❄🔐🎵🤒🍰👓🏄🌲🎮🙂📈🚙📍😵🗣❗🌺🙄👄🚘🥺🌍🏡♦💍🌱👑👙☑👾🍩🥶📣🏼🤣☯👵🍫➡🎀😃✋🍞🙇😹🙏👼🐝⚫🎁🍪🔨🌼👆👀😳🌏📖👃🎸👧💇🔒💙😞⛅🏻🍴😼🗿🍗♠🦁✔🤖☮🐢🐎💤😀🍺😁😴📺☹😲👍🎭💚🍆🍋🔵🏁🔴🔔🧐👰☎🏆🤡🐠📲🙋📌🐬✍🔑📱💰🐱💧🎓🍕👟🐣👫🍑😸🍦👁🆗🎯📢🚶🦅🐧💢🏀🚫💑🐟🌽🏊🍟💝💲🐍🍥🐸☝♣👊⚓❌🐯🏈📰🌧👿🐳💷🐺📞🆒🍀🤐🚲🍔👹🙍🌷🙎🐥💵🔝📸⚠❓🎩✂🍼😑⬇⚾🍎💔🐔⚽💭🏌🐷🍍✖🍇📝🍊🐙👋🤔🥊🗽🐑🐘🐰💐🐴♀🐦🍓✏👂🏴👇🆘😡🏉👩💌😺✝🐼🐒🐶👺🖕👬🍉🐻🐾⬅⏬▶👮🍌♂🔸👶🐮👪⛳🐐🎾🐕👴🐨🐊🔹©🎣👦👣👨👈💬⭕📹📷" | ||
| ) | ||
|
|
||
| # Also pick out some vanity emojis. |
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.
Confirmed with Johannes to remove these
| if ABOUT_KEY in lowercase_menu_items: | ||
| if lowercase_menu_items[ABOUT_KEY] is not None: | ||
| menu_items_proto.about_section_md = dedent(lowercase_menu_items[ABOUT_KEY]) | ||
| else: |
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.
Needed to handle case where "About" markdown intially set and then updated to None, for consistent behavior with other menu_items fields.
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.
nit: it would be good to add that as a comment in the code as well
set_page_config restrictionsset_page_config restrictions
📉 Frontend coverage change detectedThe frontend unit test (vitest) coverage has decreased by 0.0200%
✅ Coverage change is within normal range. |
lukasmasuch
left a comment
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.
LGTM 👍
| string report_a_bug_url = 3; | ||
| bool hide_report_a_bug = 4; | ||
| string about_section_md = 5; | ||
| bool clear_about_md = 6; |
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.
nit: maybe add a small comment in the proto what this flag does.
| if ABOUT_KEY in lowercase_menu_items: | ||
| if lowercase_menu_items[ABOUT_KEY] is not None: | ||
| menu_items_proto.about_section_md = dedent(lowercase_menu_items[ABOUT_KEY]) | ||
| else: |
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.
nit: it would be good to add that as a comment in the code as well
To better enable additive calls to `st.set_page_config` now that restrictions have been removed (#11286), make params `layout` & `initial_sidebar_state` default to `None` if not set so they inherit the behavior of the previous call. If there is no previous call (1st `st.set_page_config` call), these will be set by the FE to the defaults - values `"centered"` & `"auto"` respectively.
To better enable additive calls to `st.set_page_config` now that restrictions have been removed (#11286), make params `layout` & `initial_sidebar_state` default to `None` if not set so they inherit the behavior of the previous call. If there is no previous call (1st `st.set_page_config` call), these will be set by the FE to the defaults - values `"centered"` & `"auto"` respectively.
Describe your changes
This PR remove the two
st.set_page_configrestrictions:stcommand (with some exceptions)The properties are additive (if the first call sets a
page_titleand the second call sets apage_icon, the page now has both the provided title & icon).This also applies for
menu_items.GitHub Issue Link (if applicable)
Closes #4483
Closes #2216
Closes #9797
Closes #9038
Testing Plan