Skip to content

Fix issue with hidden balloons (approach 2)#4204

Merged
kmcgrady merged 16 commits intostreamlit:developfrom
lukasmasuch:fix/hidden-balloons-2
Dec 27, 2021
Merged

Fix issue with hidden balloons (approach 2)#4204
kmcgrady merged 16 commits intostreamlit:developfrom
lukasmasuch:fix/hidden-balloons-2

Conversation

@lukasmasuch
Copy link
Copy Markdown
Collaborator

📚 Context

The Block.tsx refactoring applies a display: none to the element containers of empty and balloons elements. The reason is to prevent the gap of the parent flexbox. However, the balloon element is never shown on the frontend due to display: none. This PR applies negative bottom margin to balloons in the same size of the gap to prevent the gap. With this workaround, we can render the balloons element.

This PR also removes the isHidden flag, since it is not anymore needed as abstraction since empty and balloons are now treated differently.

  • What kind of change does this PR introduce?

    • Bugfix
    • Feature
    • Refactoring
    • Other, please describe:

🧪 Testing Done

  • Screenshots included
  • Added/Updated unit tests
  • Added/Updated e2e tests

Contribution License Agreement

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

@lukasmasuch lukasmasuch mentioned this pull request Dec 21, 2021
9 tasks
@lukasmasuch lukasmasuch changed the title Fix issue with hidden balloons Fix issue with hidden balloons (approach 2) Dec 21, 2021
lib/Pipfile Outdated
botocore = ">=1.13.44"
hypothesis = ">=6.17.4"
mypy = ">=0.910"
mypy = ">=0.910, <0.930"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't think we should do this (in fact, if anything, we should pin mypy = ">=0.930")

Copy link
Copy Markdown
Collaborator Author

@lukasmasuch lukasmasuch Dec 22, 2021

Choose a reason for hiding this comment

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

That's was just a test if my build or mypy is broken. And as it turns out, mypy 0.930 (which was released a few hours ago) breaks our build pipelines :(

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think it may just be necessary to pull in the latest changes from develop, since I believe #4191 fixed this

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I will try that. However, the builds went fine yesterday and those issues only appeared after mypy 0.930 got released. So, I'm assuming there are additional issues 😬

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Actually, the fixes from #4191 are already included in this branch.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Ah, #4191 fixed the issues that appeared with mypy 0.920

I didn't realize this was a new set of issues that appeared with the release of 0.930 😬

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Annoying!

It looks like all these issues are in the legacy_caching/hashing.py file - as a stopgap, we could add # type: ignore to the top of that file, along with a TODO to investigate after the break. (#core-platform can be in charge of fixing this issue.)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

We got a solution with #4218 that fixes with the latest mypy. I've merged it in this one.

@kmcgrady kmcgrady merged commit bb0d5b4 into streamlit:develop Dec 27, 2021
kmcgrady pushed a commit that referenced this pull request Dec 28, 2021
tconkling added a commit to tconkling/streamlit that referenced this pull request Jan 3, 2022
* develop:
  Fix hello demo type annotation (streamlit#4228)
  Release 1.3.1 (streamlit#4220)
  Improve beta_ deprecation message (streamlit#4219)
  Changing Image Algorithm to Bilinear (streamlit#4159)
  Allow columns to be rendered to create spacing (streamlit#4217)
  Fix issue with hidden balloons (approach 2) (streamlit#4204)
  Fix mypy errors from 0.930 release (streamlit#4218)
  Fix/selectbox typings (streamlit#4194)
  Support running tests locally on Apple Silicon (streamlit#4185)
  Stop screencast recorder when user removes permission / stops using browser button. (streamlit#4180)
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.

st.balloons() is not working in streamlit 1.3.0

4 participants