Skip to content

Compose functions during Element creation#2

Open
ian-hon wants to merge 40 commits intomainfrom
ian/compose-functions
Open

Compose functions during Element creation#2
ian-hon wants to merge 40 commits intomainfrom
ian/compose-functions

Conversation

@ian-hon
Copy link
Copy Markdown
Contributor

@ian-hon ian-hon commented Apr 3, 2026

No description provided.

nixonyh and others added 24 commits March 26, 2026 20:45
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Removes fynix's hand-rolled layout.rs and moves Size, Vec2,
Constraint, and the Layouter trait into rectree, replacing
rectree's Option<f64>-based Constraint and kurbo::Size/Vec2.
Fynix re-exports rectree at its crate root; fynix_elements
imports layout types through fynix::rectree.

Removes the kurbo dependency from the rectree crate (spatree
retains its own kurbo dep). Also cleans up dead code in Elements
and wires up get_dyn via ElementTypeMeta.
The work is mostly done now
Comment thread crates/fynix/src/ctx.rs Outdated
@nixonyh nixonyh self-requested a review April 3, 2026 01:25
ian-hon and others added 4 commits April 3, 2026 09:42
- `Resources::scope` temporarily removes a resource, passes it mutably
  alongside the remaining `Resources` into a closure, then reinserts it
- `Resources::insert` and `init` now return `&mut Self` for builder chaining
- Expose `Fynix::elements`, `styles`, `resources`, `resources_mut`
- Make `Elements::elements`, `metas`, `type_metas` pub
- Add `fynix_elements::init_resources` to initialize `TextContext`
- Add `hello_world` example verifying `Label` allocates non-zero size
nixonyh and others added 4 commits April 3, 2026 16:24
- Remove `ctx.scope()` from status table (superseded by
  `Resources::scope` and `add_with` style scoping)
- Fix duplicate `compose_hierarchy` examples - rename to
  `compose_hierarchy_bevy` and `compose_hierarchy_custom`
  with distinct bodies and update the expansion static name
- Move orphaned Bevy consumer system snippet into the
  `Events queue` subsection where it belongs
- Extract `fn main()` startup snippet from inside the
  `TypeSlotEntry` code block into its own fenced block
- Fix double blank line before `## Signals`

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@ian-hon ian-hon changed the base branch from main to nixon/layout April 3, 2026 11:07
@nixonyh nixonyh added the enhancement New feature or request label Apr 3, 2026
Copy link
Copy Markdown
Member

@nixonyh nixonyh left a comment

Choose a reason for hiding this comment

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

Great job! I'd like to see some of the comments addressed, otherwise, it's good to go 🐱.

Comment thread crates/fynix/src/element/composer.rs Outdated
Comment thread crates/fynix_macros/src/lib.rs
Comment thread crates/fynix/src/ctx.rs Outdated
Comment thread crates/fynix_macros/src/lib.rs
Comment thread crates/fynix_macros/src/lib.rs Outdated
Comment thread crates/fynix_macros/src/lib.rs Outdated
Comment thread crates/fynix_macros/src/lib.rs Outdated
Comment thread crates/fynix_macros/src/lib.rs Outdated
Comment thread crates/fynix/src/lib.rs
Comment thread crates/fynix/examples/composer_multiworld_example.rs
Comment thread crates/fynix/src/element.rs Outdated
Base automatically changed from nixon/layout to main April 3, 2026 14:19
@@ -0,0 +1,34 @@
use fynix::ctx::FynixCtx;
use fynix::element::Element;
use fynix::{Fynix, fynix};
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We may need a use fynix::prelude::*; soon xd.

@nixonyh
Copy link
Copy Markdown
Member

nixonyh commented Apr 11, 2026

I'd approve this once we migrate from linkme to inventory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants