Commit Graph
220 Commits
Author SHA1 Message Date
Nathan Sobo c3b2fadcec Correctly compute placeholder text for buffer search query editor (#3749)
Rather than relying on the focused element, instead explicitly pass the
focus handle for the query editor when determining the prev/next
bindings. Only compute these values once.

Release Notes:

- N/A
2023-12-20 20:48:31 -07:00
Nathan Sobo 3f994735ff Only compute placeholder text once 2023-12-20 14:47:56 -07:00
Nathan Sobo 0421bfe734 Compute the query editor placeholder text with a focus handle
So we're not beholden to the current focus.
2023-12-20 13:00:52 -07:00
Kirill Bulatov da8c4e8ae3 Apply more fixes to the visual part 2023-12-20 18:23:08 +02:00
Max Brunsfeld e7d7c4b055 Fix layout of diagnostic blocks 2023-12-19 15:41:00 -08:00
Nate Butler dd03f4aaa0 Editor UI Cleanup (#3676)
[[PR Description]]

TODO: 
- [x] Style fold marker
- [x] Editor - Code action icon too large, should use muted color,
should have tooltip
- [ ] Style inline assistant
    - Prompt text gets cut off veritcally
- [x] Line height on inline assist editor isn't tall enough
- Nate: This is my fault due to the line height (relative: 1) we are
setting on non-buffer editors. I'll look into this.
- [ ] Style diagnostic hover (right now it's an opaque box on some
themes)
    - Nate: This needs status tints, we are working on it
- [ ] Hovering over a symbol shows a dialogue that appears underneath
the scroll-bar

Release Notes:

- N/A
2023-12-15 15:49:55 -05:00
Mikayla 118894f502 Fix editor mouse event dispatch 2023-12-15 10:26:41 -08:00
Nate Butler 103bddafd6 Update size of code action indicator and show when active 2023-12-15 12:29:33 -05:00
Nate Butler 6a78cd7bc6 Revert change to single line editor height 2023-12-15 12:22:33 -05:00
Nate Butler 5407216c11 Update fold_indicator render 2023-12-15 12:09:06 -05:00
Kirill Bulatov 26292d4df2 Adjust copy/paste buffer only on the copy error action trigger 2023-12-15 11:34:00 +02:00
Marshall Bowers 3fbef5ff2c Use editor_foreground color in editor 2023-12-14 17:34:07 -05:00
Marshall Bowers 45a30238e9 Implement VisibleOnHover for IconButton (#3642)
This PR implements the `VisibleOnHover` trait for `IconButton`s.

I noticed that in a lot of places we were wrapping an `IconButton` in an
extra `div` just so we could call `visible_on_hover` on it. By
implementing the trait on `IconButton` directly it allows us to avoid
the interstitial `div` entirely.

Release Notes:

- N/A
2023-12-13 20:42:27 -05:00
Marshall Bowers 9d2708c71e Add .visible_on_hover helper method (#3639)
This PR adds a `.visible_on_hover` helper method that can be used to
make an element only visible on hover.

I noticed we were repeating this similar stanza in a bunch of different
spots:

```rs
some_element
    .invisible()
    .group_hover("", |style| style.visible())
``` 

so it seemed like a nice thing to factor out into a reusable utility.

Release Notes:

- N/A
2023-12-13 19:12:20 -05:00
Marshall Bowers 1a2584222c Don't show empty documentation labels in completions menu (#3632)
This PR fixes an issue where we would sometimes have extra blank lines
in the completions menu.

This was due to some items including documentation labels that were
empty strings.

Release Notes:

- N/A
2023-12-13 14:15:03 -05:00
Conrad Irwin 0f92e4ec83 Fix vim2 search tests 2023-12-12 18:39:42 -07:00
Max BrunsfeldandNathan a51f3fe894 Avoid notifying editor when wrap width changes
Wrap width is already assigned from within draw. It can be called multiple
times as taffy iteratively computes the layout.

Co-authored-by: Nathan <nathan@zed.dev>
2023-12-12 12:06:38 -08:00
Conrad Irwin 3ae69b7596 Remove warnigns 2023-12-11 10:45:27 -07:00
Conrad Irwin 0d96e964ef Merge branch 'main' into vim2 2023-12-11 09:38:23 -07:00
Piotr Osiewicz ba57516632 Merge branch 'main' into project_search2 2023-12-11 16:47:48 +01:00
Kirill Bulatov 42acd6431f Finalize the command 2023-12-11 12:28:22 +02:00
Kirill Bulatov 50e2f5c886 Draft an expand macro recusively command 2023-12-11 12:28:22 +02:00
Conrad Irwin aed17f4763 Restore impl_actions! and remove derive(Action) 2023-12-10 19:33:38 -07:00
Conrad Irwin 9befa3f9ca Restore namespace parameter to actions!
This does not yet fix `derive(Action)`, but will conflict with a lot so
wanted to merge quickly.
2023-12-09 15:18:31 -07:00
Conrad Irwin e356a7df09 vim2 compiling (but mostly commented out) 2023-12-08 18:47:14 +00:00
Piotr Osiewicz 95814ab53b Barebones project search (no UI, but the crate compiles) 2023-12-07 14:36:45 +01:00
Antonio Scandurra 67a00e0920 Fix confirming rename not working on editor2 2023-12-07 12:54:28 +01:00
Joseph T. Lyons df84b9d94e Remove remnants from conflict resolution (#3528)
Fixes a couple of things that slipped through when going through the
last merge conflict

Release Notes:

- N/A
2023-12-06 23:44:49 -05:00
Joseph T. Lyons 263b79c047 Merge branch 'main' into feedback-2 2023-12-06 23:16:54 -05:00
Joseph T. Lyons a364c9ed70 WIP 2023-12-06 17:27:10 -05:00
Max BrunsfeldandNathan 5392e6ca24 Enable buffer font size adjustment in zed2
Co-authored-by: Nathan <nathan@zed.dev>
2023-12-06 13:52:33 -08:00
Kirill Bulatov 15bdf7622d Use a better name for zed2 inlay style field 2023-12-06 22:06:30 +02:00
Kirill Bulatov c5bcd65546 Pass proper theme colors for inlays and suggestions 2023-12-06 21:48:39 +02:00
Joseph T. Lyons c6e2d20500 WIP 2023-12-06 14:13:44 -05:00
Antonio Scandurra c62305edea Merge remote-tracking branch 'origin/main' into assistant-2
# Conflicts:
#	crates/ui2/src/components/icon.rs
2023-12-06 18:18:58 +01:00
Antonio Scandurra c9300e2384 Merge remote-tracking branch 'origin/main' into assistant-2 2023-12-06 12:53:02 +01:00
Marshall Bowers 69dd4f50b8 Add missing semicolon 2023-12-05 20:24:43 -05:00
Marshall Bowers 9ecb4b59ae Wire up NewWindow action 2023-12-05 20:24:01 -05:00
Marshall Bowers c7a789e1e2 Wire up NewFile action 2023-12-05 20:21:35 -05:00
Max Brunsfeld d03a77bbf4 Get following working
Restore a single event type on Item trait, so that the workspace can
subscribe to it and handle following events.
2023-12-05 12:57:23 -08:00
Antonio Scandurra 50ff26b06d WIP 2023-12-05 19:27:15 +01:00
Marshall Bowers 886f309729 Merge branch 'main' into editor2_tests 2023-12-04 14:09:23 -05:00
Marshall Bowers 38c7241da1 Add support for copying diagnostic messages to the clipboard (#3489)
This PR adds support for copying diagnostics messages to the clipboard.

This was already working, but we were missing implementations
clipboard-related methods in the `TestPlatform` that were causing the
tests to fail when the copying functionality was added.

Release Notes:

- N/A
2023-12-04 14:08:05 -05:00
Marshall Bowers 1172e4c84b Format code 2023-12-04 11:57:10 -05:00
Marshall Bowers 9d6a58fdd1 Merge branch 'main' into diagnostics-style-2 2023-12-04 11:56:55 -05:00
Nate ButlerandMarshall Bowers 5cd08b060b Mark copy button as incomplete
Co-Authored-By: Marshall Bowers <1486634+maxdeviant@users.noreply.github.com>
2023-12-04 11:53:46 -05:00
Nate ButlerandMarshall Bowers 0677eb806f Update diagnostic style
Co-Authored-By: Marshall Bowers <1486634+maxdeviant@users.noreply.github.com>
2023-12-04 11:50:26 -05:00
Nate ButlerandMarshall Bowers 199c84fe43 Fix ci error – Copy to clipboard isn't implemented in tests
Co-Authored-By: Marshall Bowers <1486634+maxdeviant@users.noreply.github.com>
2023-12-04 11:41:31 -05:00
Piotr OsiewiczandAntonio 23167550d9 Add simulate_window_resize.
Fixes up tests for movement in editor/scrolling.

Co-authored-by: Antonio <antonio@zed.dev>
2023-12-04 17:27:48 +01:00
Piotr OsiewiczandAntonio cee41d0c23 Fix disparity between editor2 and edito1 wrt copilot completions.
Fixes test test_copilot.

Co-authored-by: Antonio <antonio@zed.dev>
2023-12-04 16:39:40 +01:00