Skip to content

CCV2 Conceptual docs#1432

Merged
sfc-gh-dmatthews merged 43 commits intomainfrom
ccv2-concepts
Mar 12, 2026
Merged

CCV2 Conceptual docs#1432
sfc-gh-dmatthews merged 43 commits intomainfrom
ccv2-concepts

Conversation

@sfc-gh-dmatthews
Copy link
Contributor

@sfc-gh-dmatthews sfc-gh-dmatthews commented Mar 7, 2026

📚 Context

The parent branch (apps/custom-components-concepts) added example apps and the quickstart page for Custom Components v2. This branch adds the full conceptual documentation for CCV2, restructures the existing custom components section to accommodate both v1 and v2, and updates navigation accordingly.

🧠 Description of Changes

  • Restructured the Custom Components section into a versioned hierarchy: added a new landing page (_index.md), an Overview page comparing v1 vs v2, a dedicated Components v1 subsection, and a new Components v2 subsection.
  • Moved existing v1 docs (components-api.md, create-component.md, limitations.md) into a components-v1/ directory with updated slugs, and created a v1 index page preserving the original content.
  • Renamed publish-component.md to publish.md (shared across v1/v2).
  • Added 16 new CCV2 concept pages under components-v2/:
    • _index.md — v2 landing page with tile navigation
    • register.md — component registration (HTML/CSS/JS definition)
    • mount.md — component mounting and output handling
    • communicate.md — bidirectional communication
    • state-and-triggers.md — state values vs trigger values
    • theming.md — theme integration and CSS custom properties
    • package-based.md — building distributable TS-based components
    • examples/ — 8 quickstart example pages (hello world, rich data, simple button, simple checkbox, interactive counter, text input, danger button, radial menu)
  • Added overview.md — a new top-level overview comparing v1 and v2 with a feature comparison table.
  • Added component-communication-cycle.svg diagram illustrating bidirectional data flow.
  • Updated content/menu.md to reflect the new section hierarchy with all new pages in the sidebar nav.
  • Updated public/_redirects to point legacy v1 URLs to their new components-v1/ paths.

Current:

The Custom Components section has a flat structure with only v1 docs (Intro, Create, Publish, Limitations).

Revised:

The Custom Components section is now versioned with an Overview, a full Components v2 subsection (7 concept pages + 8 example pages), a Components v1 subsection, and a shared Publish page.

💥 Impact

Size:

  • Small
  • Not small

🌐 References

Contribution License Agreement

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

Copy link
Contributor Author

sfc-gh-dmatthews commented Mar 7, 2026

@sfc-gh-dmatthews sfc-gh-dmatthews changed the title First draft of ccv2 concepts CCV2 Conceptual docs Mar 7, 2026
@sfc-gh-dmatthews sfc-gh-dmatthews force-pushed the apps/custom-components-concepts branch from 301fdeb to c63a5b7 Compare March 8, 2026 20:06
@sfc-gh-dmatthews sfc-gh-dmatthews force-pushed the ccv2-concepts branch 2 times, most recently from a20c95a to 97f084e Compare March 11, 2026 18:35
@sfc-gh-dmatthews sfc-gh-dmatthews marked this pull request as ready for review March 11, 2026 18:58
@sfc-gh-dmatthews sfc-gh-dmatthews requested review from sfc-gh-bnisco and removed request for a team and sfc-gh-kmcgrady March 11, 2026 19:13
name="isolated",
html="<div class='my-style'>Isolated content</div>",
css=".my-style { color: red; }", # Won't affect other elements
isolate_styles=True # Default
Copy link
Contributor

Choose a reason for hiding this comment

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

issue: We moved isolate_styles to be a mount-time argument as of Streamlit 1.53.

Copy link
Contributor

Choose a reason for hiding this comment

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

Omg wait, I had this backwards 😓 isolate_styles moved to a registration-time argument in 1.53. It was a mount-time argument before that. I'm sorry for the unnecessary back and forth on this one @sfc-gh-dmatthews !

Copy link
Contributor

@sfc-gh-bnisco sfc-gh-bnisco left a comment

Choose a reason for hiding this comment

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

LGTM after fixing the last few things!

name="isolated",
html="<div class='my-style'>Isolated content</div>",
css=".my-style { color: red; }", # Won't affect other elements
isolate_styles=True # Default
Copy link
Contributor

Choose a reason for hiding this comment

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

Omg wait, I had this backwards 😓 isolate_styles moved to a registration-time argument in 1.53. It was a mount-time argument before that. I'm sorry for the unnecessary back and forth on this one @sfc-gh-dmatthews !

@sfc-gh-dmatthews sfc-gh-dmatthews changed the base branch from apps/custom-components-concepts to graphite-base/1432 March 12, 2026 20:09
@graphite-app graphite-app bot changed the base branch from graphite-base/1432 to main March 12, 2026 20:10
Copy link
Contributor Author

sfc-gh-dmatthews commented Mar 12, 2026

Merge activity

  • Mar 12, 8:57 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Mar 12, 8:57 PM UTC: @sfc-gh-dmatthews merged this pull request with Graphite.

@sfc-gh-dmatthews sfc-gh-dmatthews merged commit 992789c into main Mar 12, 2026
5 checks passed
@sfc-gh-dmatthews sfc-gh-dmatthews deleted the ccv2-concepts branch March 12, 2026 20:57
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.

2 participants