I have noticed that gpui-kit is undergoing rapid iteration, leading to API changes between versions that are not always reflected in the documentation examples in a timely manner—such as the event listener examples for the Input component in gpui-component. Therefore, I propose introducing a pre-release check tool for gpui-kit to ensure that all examples are updated to align with the new APIs. This will be implemented using GitHub Actions.
Implementation method:
Compile each small example (just like this picture) using the code below and ensure it compiles successfully; gpui-kit will use the latest version from GitHub.
pub struct TestBox {}
impl Render for TestBox {
fn render(&mut self, window: &mut Window, cx: &mut Context<Self>) -> impl IntoElement {
//example_here
}
}This is just a preliminary idea. It may be adjusted after reviewing all the examples. If you think this change would benefit the gpui-kit documentation, I would be happy to submit a PR to implement it. Please also let me know if you have any better suggestions.
Activity
3I noticed that the website distinguishes between versions, but the example code in the documentation has not been updated to match these versions.
For instance, the custom input event for the input component.
I am not sure if there are other instances of this. To ensure that examples remain up-to-date and compatible with the API, I suggest implementing a pre-release action to check the code.
There is now a checked recipe path: #3109 added source-backed consumer recipes and #3118 moved them into the workspace. CI runs python3 script/check-ai docs, and the Rust test job includes gpui-kit-recipes.
Current coverage is 9 published fragments from 4 recipe sources, not every Rust fence in the documentation. I ran the docs check on current main: all 9 fragments and 6 inventory tests pass. Extending that inventory and making publication wait for the relevant checks are still separate work.
I have split the website docs to have versions, and default to latest release yesterday.
https://gpui-kit.com
Does this solve your question?