Skip to content

Component Process API Remix#118

Merged
davepeck merged 13 commits into
t-strings:mainfrom
ianjosephwilson:ian/component_processor_api_remix
May 3, 2026
Merged

Component Process API Remix#118
davepeck merged 13 commits into
t-strings:mainfrom
ianjosephwilson:ian/component_processor_api_remix

Conversation

@ianjosephwilson
Copy link
Copy Markdown
Contributor

@ianjosephwilson ianjosephwilson commented Apr 28, 2026

  • Add ComponentProcessor extension point with example test
  • Drop middleware api, "component object capturing", for now.
  • Alter prep_component_kwargs
    • take in additional args via provided_attrs
    • add conditional flags to raise on positional only arguments and/or missing arguments
  • Factor out embedded template extraction to "clear up" component processing

This was referenced Apr 28, 2026
@ianjosephwilson
Copy link
Copy Markdown
Contributor Author

This is closer but we should consider the middleware "concept" in #119.

@ianjosephwilson ianjosephwilson marked this pull request as ready for review April 30, 2026 17:47
@davepeck
Copy link
Copy Markdown
Contributor

davepeck commented May 3, 2026

@ianjosephwilson Thanks for teasing this out. I think I'd settle on merging this PR, and considering #119 for the future. The middleware object in #119 feels pretty abstract to me, absent specific user needs. LMK what you're thinking now that you've had a few days to mull it over.

(To be clear, I suspect we'll want to revisit context, middleware, etc. many times as more people use this library; I'm okay with future breaking changes here. In fact, I expect them.)

@ianjosephwilson
Copy link
Copy Markdown
Contributor Author

@ianjosephwilson Thanks for teasing this out. I think I'd settle on merging this PR, and considering #119 for the future. The middleware object in #119 feels pretty abstract to me, absent specific user needs. LMK what you're thinking now that you've had a few days to mull it over.

Yeah I wish I was always right the first time but after multiple subtle refactors I think this division of functionality is pretty good. I wanted to make sure we had a "spot" for the middleware idea and it looks like that should work out if/when we need it. The only change would be that IComponentProcessor would need to be changed to handle components that return the "tuple[Template, object]" form of Components that supply middleware. That seems fine though.

I think we should merge it.

@davepeck davepeck merged commit b2287f1 into t-strings:main May 3, 2026
1 check passed
@pauleveritt
Copy link
Copy Markdown
Contributor

I'm happy to report that Claude was happy to port my previous context integration thing over to the new API. I'm now back on tdom main.

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.

3 participants