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

Replace st.beta.*/st.experimental.* with st.beta_*/st.experimental_* #1403

Merged
merged 7 commits into from
May 6, 2020

Conversation

tvst
Copy link
Contributor

@tvst tvst commented May 1, 2020

Problem: st.beta is confusing when you consider returned DGs and sidebar:

x = st.beta.color_picker()

x.beta.color_picker()  # ← Does not exist!
x.color_picker()  # ← Weirdly, exists!

st.beta.sidebar.color_picker()  # ← Does not exist!
st.sidebar.beta.color_picker()  # ← Does not exist!
st.sidebar.color_picker()  # ← Weirdly, exists!

This PR removes the st.beta and st.experimental namespaces and replaces them with simple beta_ and experimental_ prefixes. So you get this instead:

x = st.beta_color_picker()

x.beta_color_picker()  # ← Exists! YAY
st.sidebar.beta_color_picker()  # ← Exists! YAY

Cons: this is a little uglier than namespaces.
Pros: solves the problem above, and is much simpler code.

…ntal_* to address problem of beta issues in sidebar and in returned DGs.
@tvst tvst requested a review from a team as a code owner May 1, 2020 09:27
@tvst
Copy link
Contributor Author

tvst commented May 1, 2020

NOTE: I haven't decided that we actually want to do this. I made this PR so I have something to point to when discussing the issue.
Ok, let's do this! See Adrien's comment below.

@treuille
Copy link
Contributor

treuille commented May 1, 2020

Makes sense. This is a good idea!

@tvst tvst requested a review from kantuni May 2, 2020 06:28
@tvst tvst changed the title Replace st.beta.*/st.experimetal.* with st.beta_*/st.experimental_* Replace st.beta.*/st.experimental.* with st.beta_*/st.experimental_* May 5, 2020
@tvst tvst merged commit 21fa925 into streamlit:develop May 6, 2020
@tvst tvst deleted the sidebar-beta branch May 6, 2020 19:34
tconkling added a commit that referenced this pull request May 11, 2020
* develop:
  Add "make mini-devel" to install minimal dev dependencies (i.e. doesn't install all the test dependencies) (#1407)
  Fixing date_input | min and max selectable date issues (#1426)
  Torch Tensorbase hash func (#1394)
  Change list() cast (#1401)
  Add geo layers to DeckGlJsonChart (#1306)
  Clean up use of LoDash (#1404)
  Replace st.beta.*/st.experimental.* with st.beta_*/st.experimental_* (#1403)
  Release 0.59.0 (#1405)
  Setting textarea height and unit tests (#1411)
tconkling added a commit to tconkling/streamlit that referenced this pull request May 11, 2020
* feature/plugins:
  black reformatting
  Add "make mini-devel" to install minimal dev dependencies (i.e. doesn't install all the test dependencies) (streamlit#1407)
  Fixing date_input | min and max selectable date issues (streamlit#1426)
  Torch Tensorbase hash func (streamlit#1394)
  Change list() cast (streamlit#1401)
  Component template tweaks
  Components: alpha 2 cleanup (streamlit#1425)
  Fix dataframe support
  Add geo layers to DeckGlJsonChart (streamlit#1306)
  Clean up use of LoDash (streamlit#1404)
  Replace st.beta.*/st.experimental.* with st.beta_*/st.experimental_* (streamlit#1403)
  Release 0.59.0 (streamlit#1405)
  Setting textarea height and unit tests (streamlit#1411)
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.

None yet

3 participants