Commit Graph
8809 Commits
Author SHA1 Message Date
Nate Butler d14e4d41ea Merge branch 'main' into nate/bring-ui-crate-up-to-date 2023-09-21 23:47:17 -04:00
Nate Butler f54634aeb2 Bring UI crate up to date 2023-09-21 23:46:06 -04:00
Marshall Bowers 5083ab7694 Add TrafficLights component (#3011)
This PR adds a `TrafficLights` component for GPUI2.

<img width="861" alt="Screenshot 2023-09-21 at 11 32 10 PM"
src="https://github.com/zed-industries/zed/assets/1486634/0fe0e847-49b3-44dc-bd4c-64f12f0051c1">

Release Notes:

- N/A
2023-09-21 23:42:18 -04:00
Marshall Bowers 66358f2900 Update storybook to support stories for individual components (#3010)
This PR updates the `storybook` with support for adding stories for
individual components.

### Motivation

Right now we just have one story in the storybook that renders an entire
`WorkspaceElement`.

While iterating on the various UI components, it will be helpful to be
able to create stories of those components just by themselves.

This is especially true for components that have a number of different
states, as we can render the components in all of the various states in
a single layout.

### Explanation

We achieve this by adding a simple CLI to the storybook.

The `storybook` binary now accepts an optional `[STORY]` parameter that
can be used to indicate which story should be loaded. If this parameter
is not provided, it will load the workspace story as it currently does.

Passing a story name will load the corresponding story, if it exists.

For example:

```
cargo run -- elements/avatar
```

<img width="723" alt="Screenshot 2023-09-21 at 10 29 52 PM"
src="https://github.com/zed-industries/zed/assets/1486634/5df489ed-8607-4024-9c19-c5f4541f97c9">

```
cargo run -- components/facepile
```

<img width="785" alt="Screenshot 2023-09-21 at 10 30 07 PM"
src="https://github.com/zed-industries/zed/assets/1486634/e04a4577-7403-405d-b23c-e765b7a06229">



Release Notes:

- N/A
2023-09-21 22:41:53 -04:00
Nate Butler 8440ac3a54 Fix fmt complaining about order 2023-09-21 20:25:25 -04:00
Nate Butler 1e6ac8caf2 theme::* -> crate::theme::*; 2023-09-21 20:21:56 -04:00
Marshall Bowers baa07e935e Extract UI elements from storybook into new ui crate (#3008)
This PR extracts the various UI elements from the `storybook` crate into
a new `ui` library crate.

Release Notes:

- N/A
2023-09-21 19:25:35 -04:00
Marshall Bowers c252eae32e 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
2023-09-21 17:46:37 -04:00
Kyle Caverly 3c2b05be90 add semantic index status, for non authenticated users (#3005)
Update project search semantic ui to accommodate for users who have not
set the OPENAI_API_KEY in their environment variables.

Release Notes:

- Expand Semantic Index status to include status for non authenticated
users
- Update Search UI to illustrate this status.
2023-09-21 14:18:58 -04:00
KCaverly 7b63369df2 move api authentication to embedding provider 2023-09-21 14:00:00 -04:00
KCaverly 997f362cc2 add semantic index status, for non authenticated users 2023-09-21 13:40:01 -04:00
Max Brunsfeld 19a9753663 Fix channel move cancel (#3004)
Release Notes:

- Fixes a bug where channels could no longer be rearranged with drag and
drop.
2023-09-21 09:11:09 -07:00
Mikayla 66dd0e9ec0 Switch drag end event to be fired after mouse up 2023-09-21 08:58:36 -07:00
Piotr Osiewicz dbfa1d7263 [WIP] Replace in project (#2984)
Targeting Preview of 09.27.
This is still pending several touchups/clearups:
- We should watch multibuffer for changes and rescan the excerpts. This
should also update match count.
- Closing editor while multibuffer with 100's of changed files is open
leads to us prompting for save once per each file in the multibuffer.
One could in theory save in multibuffer before closing it (thus avoiding
unnecessary prompts), but it'd be cool to be able to "Save all"/"Discard
All".

Release Notes:

- Added "Replace in project" functionality
2023-09-21 16:27:58 +02:00
Kirill Bulatov 1c53b0a1c0 Properly re-add Copilot LSP server 2023-09-21 11:02:03 +03:00
Kirill Bulatov a2ac5ae478 Fix RPC logs not being displayed for supplementary servers 2023-09-21 11:00:05 +03:00
Kirill BulatovandMax ead7155b0f Make LSP panel scrollable
co-authored-by: Max <max@zed.dev>
2023-09-21 10:59:19 +03:00
Max Brunsfeld d42093e069 collab 0.22.1 2023-09-20 17:39:21 -07:00
Mikayla fe10875285 Fix panic on select all when query is empty 2023-09-20 17:10:23 -07:00
Mikayla Maki e0fe97401d Fix bugs from channel moving (#3000)
This PR fixes several bugs related to channel moving and it's
unintuitive behavior when attempting to re-order channels

Release Notes:

- N/A
2023-09-20 17:01:14 -07:00
MikaylaandMax f2f507e619 Fix bug in channel rendering
Fix drag and drop stale state bug revealed by the channel panel

co-authored-by: Max <max@zed.dev>
2023-09-20 16:40:29 -07:00
Conrad Irwin f4d4a2f41b vim fixes for find&replace (#2995)
* allow replacing with the empty string to delete
* fix <enter> for ReplaceNext (in vim mode)

Release Notes:

- allow replacement to be empty
2023-09-20 16:42:39 -06:00
MikaylaandMax 4ff44dfa3b Fix bugs in moving channels that could cause channels to be stranded or moved unexpectedly
Made channel linking not query in a loop

co-authored-by: Max <max@zed.dev>
2023-09-20 15:32:06 -07:00
Max Brunsfeld 3633f091c5 Fix opening channel notes from context menu 2023-09-20 13:45:35 -07:00
Conrad Irwin 841b4d648c Fix vim panic when over-shooting with j (#2997)
Release Notes:

- vim: fix a panic when using `j` to go beyond end of file
2023-09-20 12:17:07 -06:00
Conrad Irwin 01b2db4845 Fix vim test recording 2023-09-20 12:01:04 -06:00
Joseph T. Lyons e7d73b833b collab 0.22.0 2023-09-20 13:59:36 -04:00
Nate Butler f7696114bb Add an initial set of GPUI2 components to the storybook (#2990)
This PR adds an initial set of components to `crates/storybook/src/ui`.

All changes still are contained to inside storybook. Merging to keep up
to date with main.
2023-09-20 13:52:47 -04:00
Conrad Irwin 8de67fd9d9 Fix vim panic when over-shooting with j 2023-09-20 11:20:35 -06:00
Nate Butler be6690bf0b Update tracker.md 2023-09-20 13:08:20 -04:00
Joseph T. Lyons a86dc942d6 v0.106.x dev 2023-09-20 13:02:13 -04:00
Nate Butler 6dcb0bafb0 WIP Project Tracker 2023-09-20 12:53:08 -04:00
Kyle Caverly 5fe8aa064f Keyboard navigation and setting persistence for project search (#2996)
Enable keyboard shortcuts for Project Search modes, and ensure project
search settings are persisted search to search.

Release Notes:

- Added alt-cmd-s to Toggle Semantic Search Mode
- Added alt-cmd-g to Toggle Regex Search Mode
- Added alt-cmd-x to Toggle Text Search Mode
- Defaulted new project searches to using last used search mode and
settings.
2023-09-20 12:44:30 -04:00
KCaverly 37a0c6615f remove conditional action registration for activate semantic search mode 2023-09-20 12:38:29 -04:00
Mikayla fdf5278bbf Only autoscroll on select_next operations 2023-09-20 09:31:12 -07:00
KCaverly 22d095bd35 enable project search states to persist between workspace project searches 2023-09-20 12:12:01 -04:00
Mikayla 8cc7a02390 Fix rebase 2023-09-20 08:34:18 -07:00
Mikayla 03d4191685 Fix infinite loop in select all matches 2023-09-20 08:25:21 -07:00
Mikayla c074bfd441 Add select all command to the editor, equivalent to hitting cmd-d as many times as possible 2023-09-20 08:25:20 -07:00
KCaverly 28ed406d54 add keymaps for activating text, regex and semantic modes 2023-09-20 10:04:43 -04:00
KCaverly 912e6e8091 create initial action for Semantic search mode 2023-09-20 09:48:27 -04:00
Kirill Bulatov a366ad02ce Add a way to display unrelated to language support language servers' logs (#2991)
Copilot is being used in every buffer, but we do not see its logs that
easily.
In the future, prettier wrapper will pretend to be an LSP server, it is
better to log its messages somewhere, so prepare an infrastructure for
that.

<img width="1727" alt="image"
src="https://github.com/zed-industries/zed/assets/2690773/d31a257c-9608-46fa-8be1-f0a2a2bdbdb7">

Copilot seem to have no rpc messages logged for some reason now,
prettier wrapper might be a better case to investigate this, so leaving
as is.

Release Notes:

- N/A
2023-09-20 12:14:31 +03:00
Kirill Bulatov 6ebe49ec59 Show Copilot logs right after its LSP server start 2023-09-20 12:08:32 +03:00
Kirill Bulatov 82010b68c1 Avoid extra LSP log events 2023-09-20 11:27:52 +03:00
Conrad Irwin 4331cb8058 Initialize workspace properly in tests (#2994)
For vim command I'd like to be able to test that e.g. workspace::Save
works.
2023-09-19 21:02:38 -06:00
Conrad IrwinandMax Brunsfeld 1295e5b41f vim: Use explicit global, not default (#2987)
This should have no user-visible impact, but tidies up one of the
awkwardnesses
of how vim uses global state at the moment.

Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2023-09-19 20:52:25 -06:00
Conrad Irwin 5bb8ba5028 Initialize workspace properly in tests
For vim command I'd like to be able to test that e.g. workspace::Save
works.
2023-09-19 20:49:29 -06:00
Conrad Irwin 2da664ed17 vim fixes for find&replace
* allow replacing with the empty string to delete
* fix <enter> for ReplaceNext
2023-09-19 20:48:01 -06:00
Mikayla Maki e37373a636 Add UI/UX for moving channels (#2976)
TODO:

- [x] Add drag and drop
- [x] Polish up in-flight decisions.
- [x] Fix chat panel panic
- [x] Add nice hover effect highlighting the matching ones
- [x] Fix and test keyboard

Release Notes:

- N/A
2023-09-19 17:56:22 -07:00
Mikayla ac65e7590c Add hover styles to channels matching the current selection
Fix chat desync from moving / linking channels
2023-09-19 17:50:02 -07:00