# component: Component crate cleanup \(\#29967\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/c5d8407df47c2d1844637e98c1cebab5fb833fee)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: c5d8407df47c2d1844637e98c1cebab5fb833fee

Requested commit: c5d8407df47c2d1844637e98c1cebab5fb833fee

Commit: c5d8407df47c2d1844637e98c1cebab5fb833fee

Tree: 52a5b4d2bfdf17491caa721f6fa5362dedf14ed8

Author: Nate Butler

Committer: GitHub

## Message

```
component: Component crate cleanup (#29967)

This PR further organizes and documents the component crate. It:

- Simplifies the component registry
- Gives access to `ComponentMetadata` sooner
- Enables lookup by id in preview extension implementations
(`ComponentId` -> `ComponentMetadata`)
- Should slightly improve the performance of ComponentPreview

It also brings component statuses to the Component trait:

![CleanShot 2025-05-05 at 23 27
11@2x](https://github.com/user-attachments/assets/dd95ede6-bc90-4de4-90c6-3e5e064fd676)

![CleanShot 2025-05-05 at 23 27
40@2x](https://github.com/user-attachments/assets/9520aece-04c2-418b-95e1-c11aa60a66ca)

![CleanShot 2025-05-05 at 23 27
57@2x](https://github.com/user-attachments/assets/db1713d5-9831-4d00-9b29-1fd51c25fcba)

Release Notes:

- N/A
```

## Parents

- [377909a64603b44fdbc681a41b2e0ede9ee9e359](https://git.cafe/gitcafe/zed/commit/377909a64603b44fdbc681a41b2e0ede9ee9e359?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/c5d8407df47c2d1844637e98c1cebab5fb833fee?format=markdown)
