zed/crates/semantic_index
Marshall Bowers 2c8ead4423
Simplify constructing tab content that is purely textual (#14695)
This PR adds a streamlined way to consistently construct tab content for
items that only have textual content in the tabs.

The `Item` trait now has a new `tab_content_text` method that can be
used to return the textual content for the tab.

The `tab_content` method now has a default implementation that—unless
overridden—will construct a `Label` out of the text. This default
implementation also takes care of setting the label color based on the
active state of the tab, something that previously had to be repeated in
each `tab_content` implementation.

The majority of our tabs are now using `tab_content_text`.

Release Notes:

- N/A
2024-07-17 20:11:05 -04:00
..
examples Add basic proxy settings (#11852) 2024-05-16 19:43:26 +03:00
fixture Semantic Index (#10329) 2024-04-12 11:40:59 -06:00
src Simplify constructing tab content that is purely textual (#14695) 2024-07-17 20:11:05 -04:00
Cargo.toml Extract http from util (#11680) 2024-05-10 15:50:20 -06:00
LICENSE-GPL Semantic Index (#10329) 2024-04-12 11:40:59 -06:00