streamlit / docs

Source code for the Streamlit Python library documentation
https://docs.streamlit.io
Apache License 2.0
111 stars 461 forks source link

Customize Autofunction handling of AttributeDict #1077

Closed sfc-gh-dmatthews closed 3 months ago

sfc-gh-dmatthews commented 3 months ago

📚 Context

Release 1.35.0 introduces selections for dataframes and charts. The event state is returned as a customized dictionary-like object, AttributeDict. There are additional classes within the library which define the specific key-value pairs (attributes) that each element will return. Although they are "classes" officially, they are more like schemas and aren't ever returned directly to the user; they become AttributeDict objects at runtime.

This PR introduces special handling within Autofunction for these classes which are flagged as AttributeDict schemas. The title for the class is reduced in size (from H2 for stand classes and methods, to H3 for these schemas). Also, "Class description" is hidden and only the "Attributes" section is shown.

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