# Reorganize \`ui\` module exports \(\#3007\) · gitcafe/zed

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

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

Visibility: public

Requested revision: c252eae32e395e668a6585cf2dc35643ba970614

Requested commit: c252eae32e395e668a6585cf2dc35643ba970614

Commit: c252eae32e395e668a6585cf2dc35643ba970614

Tree: 9c7f95ba48a12d04fab11465453db744151ac372

Author: Marshall Bowers

Committer: GitHub

## Message

```
Reorganize `ui` module exports (#3007)

This PR reorganizes the exports for the `ui` module in the `storybook`
crate.

### Motivation

Currently we expose each of the various elements/components/modules in
two places:

- Through the module itself (e.g., `ui::element::Avatar`)
- Through the `ui` module's re-exports (e.g., `ui::Avatar`)

This means it's possible to import any given item from two spots, which
can lead to inconsistencies in the consumers. Additionally, it also
means we're shipping the exact module structure underneath `ui` as part
of the public API.

### Explanation

To avoid this, we can avoid exposing each of the individual modules
underneath `ui::{element, component, module}` and instead export just
the module contents themselves.

This makes the `ui` module namespace flat.

Release Notes:

- N/A
```

## Parents

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

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