Skip to content

Conversation

@zhiyanzhaijie
Copy link
Contributor

@zhiyanzhaijie zhiyanzhaijie commented Dec 1, 2025

⚠️ [WIP] (some changes need to consult)
feature:
Add new component sheet (#158)

content:

  1. component(doc, preview_demo, playwright_test)
  2. component registry
  3. Readme updated

dangerous update might need revalidate:

  1. update DialogCtx for public used
  2. add mew module - utils for dynamic component. Inspired by:
    - hngngn/shadcn-solid,
    - corvudev/corvu
    , who implement a dynamic infra to make an asChild-like feature. (I don't know whethere it's a good choice or not)

@github-actions
Copy link

github-actions bot commented Dec 1, 2025

@zhiyanzhaijie zhiyanzhaijie marked this pull request as draft December 1, 2025 15:23
@ealmloff
Copy link
Member

ealmloff commented Dec 2, 2025

I think this is roughly as good as we can make this interface with dioxus today. Eventually I would like something like this to be possible with props which would make it easier to extend an arbitrary component instead of just attributes: https://docs.rs/frunk/latest/frunk/labelled/trait.Transmogrifier.html

I think solidjs requires dynamic because of its rendering model. Since dioxus does diffing, you should just be able to call the as closure directly

@zhiyanzhaijie zhiyanzhaijie marked this pull request as ready for review December 3, 2025 07:48
@zhiyanzhaijie
Copy link
Contributor Author

zhiyanzhaijie commented Dec 3, 2025

What I updated:

  1. Directly use r#as callback to render component instead of utils/dynamic
  2. update and shrink the style.css
  3. add Doc comments for pub DialogCtx

Copy link
Member

@ealmloff ealmloff left a comment

Choose a reason for hiding this comment

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

Thanks, this is fantastic! I'm glad to see this only required very minimal changes to dioxus-primitive itself

@ealmloff ealmloff enabled auto-merge (squash) December 3, 2025 22:07
@ealmloff ealmloff added enhancement New feature or request styling labels Dec 3, 2025
@ealmloff ealmloff linked an issue Dec 3, 2025 that may be closed by this pull request
@ealmloff ealmloff merged commit 9341f65 into DioxusLabs:main Dec 3, 2025
12 checks passed
@zhiyanzhaijie zhiyanzhaijie deleted the zyzj/feat-sheet branch December 5, 2025 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request styling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sheet component

2 participants