This PR extracts a new `Tab` component from the tabs implementation in
the workspace.
This will allow us to reuse this component anywhere that we need to use
tabs.
Like our other newer components, the `Tab` component has a relatively
open API.
It accepts `children` (or `child`) as well as a `start_slot` and
`end_slot` to position content in the slots on either end of the
content. These slots also respect the `TabCloseSide` and will switch
positions based on this value.
<img width="763" alt="Screenshot 2023-12-07 at 12 19 42 PM"
src="https://github.com/zed-industries/zed/assets/1486634/78e4db6a-f807-431e-8777-f52f2631e6ed">
Release Notes:
- N/A
This PR fixes an issue where an element with a cursor style set would
not update the cursor when hovering over it.
Previously the cursor style would only appear by interacting with the
element in some way, for instance, by clicking on the element or by
having a `.hover` with some other style being applied.
Release Notes:
- N/A
This PR reworks the `ListHeader` component to be more open.
The `meta` method can now be used to append meta items of any element to
the `ListHeader`, and they will be rendered with the appropriate spacing
between them.
Release Notes:
- N/A
This PR fixes tooltips not showing on `IconButton`s.
The "fix" here is the same hack that we used to fix `on_click` handlers
for `ListItem`s, where we introduce another layer of wrapping with an
element with an ID set.
This PR also adds a story for the `IconButton` so this issue can be
tested/observed in isolation.
Release Notes:
- N/A
This PR adds an inset variant to the `ListItem` component.
We're now using this inset variant for the `ListItem`s we render in
pickers.
Release Notes:
- N/A
This PR extracts the `Story` component into a separate `story` crate so
that it can be shared among various crates that define stories.
Release Notes:
- N/A
---------
Co-authored-by: Nate Butler <iamnbutler@gmail.com>
This PR adds a parameter to the `theme2::init` method to indicate what
the theme-loading behavior should be.
This allows us to indicate when we want to load all of the additional
built-in user themes (like in the Zed binary and in the storybook), and
when we don't want to load the user themes (like in tests).
We're using an enum over just a `bool` here for clarity at the call
site.
Release Notes:
- N/A
This adds a `UniformList` element and partially implements `Picker` as a
component, using `UniformList`. Because editor2 isn't fully implemented
yet, the picker doesn't have filtering logic yet. We want to merge this
for now though, to make the UniformList element available for other
crates.
Release Notes:
- N/A