Skip to content

Conversation

@tconkling
Copy link
Contributor

@tconkling tconkling commented Apr 14, 2023

Splits the frontend into two parts:

  • lib (everything necessary for rendering Blocks and Elements). This code can be used by third parties rendering Streamlit content without a connection to the Streamlit backend.
  • app (everything else: MainMenu and the rest of the chrome around the app view; everything related to Streamlit backend communication)

Other stuff:

  • there's a new script, validate_frontend_lib_imports.py, that errors if a lib source file imports anything from app. (The script runs as part of make jslint, so import issues will cause CI to fail).
  • Our frontend protobuf files are no longer compiled to an "autogen" directory; they just live directly in src/lib

* develop:
  Create tag with constraints files for new releases (streamlit#6495)
  Autoformat yaml in .github dir and enforce formatting (streamlit#6497)
  Update metadata description (streamlit#6503)
  Update CODEOWNERS (streamlit#6496)
@tconkling tconkling added the security-assessment-completed Security assessment has been completed for PR label Apr 18, 2023
* develop:
  Fix issue with deprecated asyncio test variable (streamlit#6517)
  No longer send unnecessary identify calls from frontend (streamlit#6464)
* develop:
  Add Bokeh as a side effect import to modify globals instead of having it in index.html(streamlit#6512)
* develop:
  Dont use constraints file in scheduled builds (streamlit#6470)
  Reorganize tests from streamlit_test.py (streamlit#6481)
  Date and Time test classes (streamlit#6501)
* develop:
  Removing viz-1.8.0.min.js (streamlit#6520)
  st.experimental_connection: The big merge (streamlit#6487)
  Add additional attributions (streamlit#6536)
  Fix code block font change (streamlit#6535)
  Fully remove email from new session message (streamlit#6516)
  Clarify what telemetry data our backend stores (streamlit#6463)
  Update emojis to latest state (streamlit#6532)
  Add support for pandas 2.0 (streamlit#6507)
  Fix regression in visibility of `st.code`'s copy-to-clipboard button (streamlit#6498)
  Fix E2E image (streamlit#6524)
  Add tenacity as dependency (streamlit#6529)
@tconkling tconkling changed the base branch from develop to feature/StreamlitLib April 24, 2023 18:04
@tconkling tconkling requested a review from willhuang1997 April 24, 2023 18:04
@tconkling tconkling marked this pull request as ready for review April 24, 2023 18:04
@willhuang1997
Copy link
Contributor

This LGTM. I think one thing that I don't really love is the dataframe folder with Quiver.ts and dataframeProto.ts, especially since dataframeProto.ts is used by VegaLite and then the legacyDataframe things so it's slightly misleading. Maybe this should be the something like arrow. I think arrow is not perfect either however and can't think of a better solution right now.

@willhuang1997
Copy link
Contributor

This LGTM. I think one thing that I don't really love is the dataframe folder with Quiver.ts and dataframeProto.ts, especially since dataframeProto.ts is used by VegaLite and then the legacyDataframe things so it's slightly misleading. Maybe this should be the something like arrow. I think arrow is not perfect either however and can't think of a better solution right now.

cc: @lukasmasuch for thoughts too.

@tconkling
Copy link
Contributor Author

Re: the dataframe folder name - dataframeProto.ts is unrelated to Arrow (it's our legacy dataframe serialization format), so arrow wouldn't make sense as the name here.

We can also just move these files up to the root lib directory and get rid of the folder altogether - I don't feel strongly about it.

(I don't follow the "dataframeProto.ts is used by VegaLite and then the legacyDataframe things so it's slightly misleading" concern.)

@willhuang1997
Copy link
Contributor

Re: the dataframe folder name - dataframeProto.ts is unrelated to Arrow (it's our legacy dataframe serialization format), so arrow wouldn't make sense as the name here.

We can also just move these files up to the root lib directory and get rid of the folder altogether - I don't feel strongly about it.

I like no folder and just having the files by itself! However, I would be curious as to what Lukas says and I think we can just wait to see what Lukas says? However, if Lukas is too busy to view this then we can just merge this and I think it looks good.

(I don't follow the "dataframeProto.ts is used by VegaLite and then the legacyDataframe things so it's slightly misleading" concern.)
I was just thinking that dataframeProto.ts within the dataframe directory would be misleading as all of this code seems to be dataframe related but it's also VegaliteChart related. Maybe it's something that we don't need to care about though.

@tconkling
Copy link
Contributor Author

VegaLiteChart uses dataFrameProto functions to manipulate the dataframe data it receives. (Those functions aren't VegaLiteChart-specific.)

* 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)
@tconkling tconkling merged commit 18751d2 into streamlit:feature/StreamlitLib Apr 25, 2023
@lukasmasuch
Copy link
Collaborator

btw. I think I missed the conversation in my Github inbox :( I think the folder structure is fine for now, but might benefit from some small restructuring once we remove legacy serialization

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