Skip to content

Add code checks before document publication #3166

Description

@Flinglin

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.

Image
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. @huacnlee

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions