Skip to content

Conversation

@lukasmasuch
Copy link
Collaborator

@lukasmasuch lukasmasuch commented Apr 24, 2023

📚 Context

This PR adds and updates some internal column properties (BaseColumnProps) as a preparation for the column config feature:

  • add name: this is the column name from the original data. We need this in addition to the title since the title is something that can be changed by the user.

  • rename columnTypeMetadata to columnTypeOptions

  • add defaultValue and use it in useDataEditor when a user adds a new row.

  • add isRequired and use it in useDataEditor to prevent cell deletions and in BooleanColumn to not show the empty option.

  • Introduce small, medium, large options for column width instead of a numerical value.

  • Update the user-provided ColumnConfigProps to reflect the changes.

  • Update the ColumnConfig in backend to reflect the changes.

  • 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 changed the title Update column properties on frontend Update dataframe column properties on frontend Apr 24, 2023
@lukasmasuch lukasmasuch added the security-assessment-completed Security assessment has been completed for PR label Apr 24, 2023
@lukasmasuch lukasmasuch marked this pull request as ready for review April 24, 2023 19:50
Copy link
Contributor

@willhuang1997 willhuang1997 left a comment

Choose a reason for hiding this comment

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

LGTM

@lukasmasuch lukasmasuch merged commit 466c04d into develop Apr 25, 2023
tconkling added a commit to tconkling/streamlit that referenced this pull request Apr 25, 2023
* develop:
  Decouple MetricsManager from AppNode (streamlit#6557)
  Fix top padding on sidebar when embed is true (streamlit#6565)
  Add support for cell and column header tooltips in the dataframe component (streamlit#6561)
  Update dataframe column properties on frontend (streamlit#6554)
  Show warning for unsafe integer cells in `st.dataframe` (streamlit#6549)
  Add icon for editable columns in `st.data_editor` (streamlit#6550)
  Unify missing values to None in the returned datastructure by `st.data_editor`.  (streamlit#6544)
  Clean up and reorganize element tree module (streamlit#6522)
  ESLint: use `--cache` flag (30x speedup!) (streamlit#6555)
  Replace `st.connection` with `st.experimental_connection` in docstring examples (streamlit#6553)
  Improve editing on touch devices for `st.data_editor` (streamlit#6548)
  Move pandas styler logic to dedicated module (streamlit#6543)
@sfc-gh-kmcgrady sfc-gh-kmcgrady deleted the feature/add-new-column-props branch October 5, 2023 19:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

security-assessment-completed Security assessment has been completed for PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants