Commit Graph

10964 Commits

Author SHA1 Message Date
Mikayla Maki
df64a3c701
Not working yet file-finder2 (#3321)
Porting file_finder

Release Notes:

- N/A
2023-11-14 15:22:59 -08:00
Conrad Irwin
1109cd11c8 Abandon ship 2023-11-14 16:17:24 -07:00
Nathan Sobo
bef4df5df9 Return an id from Element::element_id instead of calling cx.with_element_id
Co-Authored-By: Julia <julia@zed.dev>
2023-11-14 16:05:28 -07:00
Max Brunsfeld
ca63a99736
Enable tests in project panel 2 (#3325) 2023-11-14 15:02:51 -08:00
Max Brunsfeld
860959fe13 Implement simulated prompts in TestPlatform 2023-11-14 14:56:50 -08:00
Mikayla
6b25841e2a
WIP 2023-11-14 14:48:34 -08:00
Max Brunsfeld
606ab74b9f Project panel: detect filename editor blur via an editor event 2023-11-14 14:02:28 -08:00
Nate Butler
008655b879 Set Pane Size 2023-11-14 16:47:52 -05:00
Conrad Irwin
3b01a032ba In the middle of stuff 2023-11-14 14:38:23 -07:00
Max Brunsfeld
123faed5b0 Re-enable all project panel tests
Some are still failing.
2023-11-14 12:45:46 -08:00
Marshall Bowers
22f024bd5f Use IconElement in project panel 2023-11-14 15:44:26 -05:00
Conrad Irwin
80b7f75d24 Merge branch 'main' into file_finder 2023-11-14 13:34:25 -07:00
Conrad Irwin
3a4c5aa440 Implement FileFinder 2023-11-14 13:34:14 -07:00
Mikayla Maki
dcdbf43af0
Fix some small quit and recursion bugs (#3323)
Release Notes:

- N/A
2023-11-14 12:32:41 -08:00
Mikayla
62fc0b2100
Remove unnescessary unimplemented 2023-11-14 12:12:02 -08:00
Julia
59ec9e508b Avoid user NPM config/cache & put NodeRuntime installation behind a lock 2023-11-14 14:49:31 -05:00
Mikayla
3419aaf17e
Fix several shutdown related bugs 2023-11-14 11:42:58 -08:00
Conrad Irwin
37d0b8424c Merge branch 'main' into element-types 2023-11-14 12:10:26 -07:00
Marshall Bowers
5c8db996ee
Extend Label & Tooltip (#3322)
This PR extends the `Label` component with additional functionality,
partially for use in the `TextTooltip` component.

- [x] `Label` should take a `size` (`Default` & `Small` for now)
  - These should use `text_ui` and `text_ui_sm`
- [x] Fold `LabelColor` and `IconColor` into one enum
  - `TextColor`
- [x] `TextTooltip`'s keybinding field should take whatever we use for
keybindings instead of a string, and render the keybinding component
- [x] `TextTooltip` should use small `Label`s

Release Notes:

- N/A
2023-11-14 13:56:05 -05:00
Marshall Bowers
76c15229c1 Combine LabelColor and IconColor into TextColor 2023-11-14 13:48:01 -05:00
Conrad Irwin
5dda105182 Merge branch 'main' into element-types 2023-11-14 11:45:19 -07:00
Marshall Bowers
dc56a7b12b Add LabelSize 2023-11-14 13:43:37 -05:00
Antonio Scandurra
48b3a90fbf WIP 2023-11-14 19:42:07 +01:00
Marshall Bowers
9d31523cf3 Rename keybinding method on PaletteItem to key_binding 2023-11-14 13:37:21 -05:00
Marshall Bowers
90d7033fd0 Pass KeyBindings to TextTooltips 2023-11-14 13:36:03 -05:00
Mikayla
27574524b8
Restore quit action 2023-11-14 10:31:55 -08:00
Conrad Irwin
b69b5742ed Fix panicking unwrap() 2023-11-14 11:27:52 -07:00
Marshall Bowers
aa1471948f Merge branch 'main' into extend-label-and-tooltip 2023-11-14 13:14:10 -05:00
Mikayla
caa0bae04f
Merge branch 'main' into core-actions 2023-11-14 10:11:39 -08:00
Conrad Irwin
f4ccff7b72 TEMP 2023-11-14 11:03:55 -07:00
Nathan Sobo
bb584cc7c4 WIP 2023-11-14 11:00:52 -07:00
Nate Butler
251b4640c6 Extend tooltip to take meta + kb 2023-11-14 12:59:53 -05:00
Max Brunsfeld
c7d80c7aac
Start work on creating gpui2 version of project panel (#3299)
I'm gonna land what I have, even though some features aren't ported yet,
since we're working on all of this code so actively.

* [x] get the basic structure compiling
* [x] get the panel laying out correctly
* [ ] rename / new file editor
* [ ] enable the tests
* [ ] drag and drop
* [ ] context menu
2023-11-14 09:56:46 -08:00
Antonio Scandurra
428be43710 Wire up rename editor 2023-11-14 18:50:02 +01:00
Max Brunsfeld
2c3c238c9d Fix warnings 2023-11-14 09:47:48 -08:00
Max Brunsfeld
b893ac2a02 Merge branch 'main' into project-panel2 2023-11-14 09:33:48 -08:00
Nathan Sobo
e08f1690b3 Remove commented field 2023-11-14 09:33:28 -07:00
Conrad Irwin
7d94d8940c Not working yet file-finder2 2023-11-14 09:28:18 -07:00
Antonio Scandurra
40c634e056 Merge remote-tracking branch 'origin/main' into editor2-blocks 2023-11-14 17:16:58 +01:00
Antonio Scandurra
7f5014b34a Add red background to blocks that need styling 2023-11-14 17:15:33 +01:00
Antonio Scandurra
0b8ec5372b Return the line length when x is past the last glyph
Co-Authored-By: Julia <julia@zed.dev>
2023-11-14 17:06:18 +01:00
Antonio Scandurra
d855e91e43 Honor cmd-w to close active item
Co-Authored-By: Julia <julia@zed.dev>
2023-11-14 16:38:20 +01:00
Nate Butler
6b366c102e
Allow a button to take a color (#3315)
[[PR Description]]
- Allows a button to take a color and resolve it into `IconColor` and
`LabelColor`
- Extend `IconColor` and `LabelColor` to allow them to take a
`Player(i)`
- `impl From<LabelColor> for IconColor`

Release Notes:

- N/A
2023-11-14 10:36:52 -05:00
Antonio Scandurra
b6914bf0fd Re-enable find all references
Co-Authored-By: Julia <julia@zed.dev>
2023-11-14 16:09:29 +01:00
Antonio Scandurra
f9b9b7549f Render block elements
Co-Authored-By: Julia <julia@zed.dev>
2023-11-14 16:03:06 +01:00
Antonio Scandurra
fc5ec47cc8 WIP 2023-11-14 14:48:59 +01:00
Joseph T. Lyons
516a8790b9 Add gpt-4-1106-preview model 2023-11-14 08:28:57 -05:00
Nathan Sobo
6abaacc457 Fix formatting 2023-11-14 01:58:10 -07:00
Nathan Sobo
364e3e7de5 Merge remote-tracking branch 'origin/main' into element-types 2023-11-14 01:55:58 -07:00
Nathan Sobo
c6e8a097a3 Rename back to div 2023-11-14 01:41:55 -07:00
Nathan Sobo
be18c47912 Remove unnecessary with_element_id calls 2023-11-14 01:38:13 -07:00
Nathan Sobo
a5306c2312 Remove div module 2023-11-14 01:25:10 -07:00
Nathan Sobo
80014a28ea No compile errors or warnings 2023-11-14 01:23:09 -07:00
Nathan Sobo
27fb381cca Checkpoint 2023-11-14 01:15:48 -07:00
Mikayla
8aa076692e
Add missing global 2023-11-14 00:09:42 -08:00
Mikayla
ee4957dd47
Implement most core actions 2023-11-14 00:06:33 -08:00
Nathan Sobo
ce30a689a0 Checkpoint 2023-11-13 23:15:45 -07:00
Mikayla
ec16e70336
Sketch in core zed actions code 2023-11-13 22:13:07 -08:00
Nathan Sobo
9382a304c4 Checkpoint 2023-11-13 23:03:14 -07:00
Nathan Sobo
1668330764 Checkpoint 2023-11-13 22:51:44 -07:00
Nathan Sobo
4a3a1ad0c3 Checkpoint 2023-11-13 22:42:19 -07:00
Nathan Sobo
54a817a5ab Checkpoint 2023-11-13 22:28:33 -07:00
Nathan Sobo
f71afdb0f2 Checkpoint 2023-11-13 22:22:09 -07:00
Nathan Sobo
83a5f74493 Checkpoint 2023-11-13 22:02:05 -07:00
Conrad Irwin
ad017a5df5 Allow clicking on commands in the command palette 2023-11-13 21:42:27 -07:00
Conrad Irwin
4ef95f05e8 Fix elevation on go_to_line2 2023-11-13 21:42:04 -07:00
Conrad Irwin
e0416e9d2a Fix SingleLine editor font size 2023-11-13 21:41:41 -07:00
Nathan Sobo
044d9679ab Checkpoint 2023-11-13 21:40:02 -07:00
Conrad Irwin
c5878cbd5f Add Text::styled() and use it in command palette
Prevents jumping while typing
2023-11-13 19:53:55 -07:00
Nathan Sobo
872b5186e2 Checkpoint 2023-11-13 19:23:07 -07:00
Nathan Sobo
922bb3195b WIP 2023-11-13 18:58:42 -07:00
Conrad Irwin
06f3c60be8 Fix action dispatching... 2023-11-13 18:56:59 -07:00
Conrad Irwin
abdaa3105b Update command matches faster 2023-11-13 18:21:08 -07:00
Nathan Sobo
76754c559c WIP 2023-11-13 18:18:25 -07:00
Mikayla Maki
ca3341f066
Improve actions macros (#3292)
- `actions!` now uses `#[action]` on each struct to reduce duplication.
- The `#[action]` macro now works on unit structs.
- Renamed `menu::unused` to `menu::init` and added more explanation in
comments.

Release Notes:

- N/A
2023-11-13 17:14:56 -08:00
Mikayla
8bbced50c2
Add test tag 2023-11-13 16:51:59 -08:00
Nate Butler
38888696db Allow a button to take a color 2023-11-13 19:46:15 -05:00
Mikayla
d197660d3b
Fix broken tests and comment out remaining tests 2023-11-13 16:46:06 -08:00
Mikayla
7d1593b90c
Merge branch 'main' into editor-tests 2023-11-13 15:53:22 -08:00
Mikayla
a4e9fea133
WIP
co-authored-by: conrad <conrad.irwin@zed.dev>
2023-11-13 15:53:04 -08:00
Marshall Bowers
0430e8fbf2 Use "One Dark" as default theme 2023-11-13 18:44:17 -05:00
Nathan Sobo
aec7955ccf Checkpoint 2023-11-13 16:40:29 -07:00
Marshall Bowers
92f2e8eb34 Combine related conditions 2023-11-13 18:22:04 -05:00
Marshall Bowers
53117eb5e5 Merge branch 'main' into one-themes 2023-11-13 18:16:45 -05:00
Nate Butler
fea5436ba9 Remove unused imports 2023-11-13 17:54:22 -05:00
Nate Butler
1c74662dc4
Reorganize theme2 crate (#3312)
[[PR Description]]

- Colocates defaults with their defs
- Organizes each style module into the `styles` subfolder
(`src/styles/players`, etc)
- Standardizes the use of `dark()` and `light()` throughout (ex:
`StatusColors::dark()`)
- Documents and extents StatusColors

Release Notes:

- N/A
2023-11-13 17:53:29 -05:00
Nate Butler
701f954448 Start refining tab 2023-11-13 17:51:58 -05:00
Conrad Irwin
25bc898807 Add KeyBindings to CommandPalette 2023-11-13 15:40:49 -07:00
Nate Butler
dd434588ee WIP 2023-11-13 17:38:44 -05:00
Nate Butler
97d6e7f2f5 Add one syntax theme 2023-11-13 17:09:55 -05:00
Max Brunsfeld
2eedd2ad03 Merge branch 'main' into project-panel2 2023-11-13 13:39:13 -08:00
Conrad Irwin
f8bc9be284 Fix test 2023-11-13 13:53:08 -07:00
Nate Butler
c1887747b7 Add one_dark theme 2023-11-13 15:48:05 -05:00
Nate Butler
e0547d9acd Allow arrays of colors to be passed in 2023-11-13 15:47:57 -05:00
Nate Butler
916df3c614 Add color converter util 2023-11-13 15:28:20 -05:00
Conrad Irwin
f464d69ff8 Merge branch 'main' into dispatch-tree 2023-11-13 13:21:57 -07:00
Mikayla
0e3fd92bd0
Get editor tests compiling 2023-11-13 12:10:14 -08:00
Marshall Bowers
04ad19d01b Choose appropriate player colors based on theme appearance 2023-11-13 15:07:13 -05:00
Conrad Irwin
7e7b065535 Fix on_action on focusable
We were accidentally dropping the key context
2023-11-13 12:48:36 -07:00
Max Brunsfeld
c0f34e3302 Add delete, open file, and rename actions to the project panel
Co-authored-by: Julia <julia@zed.dev>
Co-authored-by: Marshall <marshall@zed.dev>
2023-11-13 11:38:47 -08:00
Max Brunsfeld
1968becf94 Merge branch 'main' into project-panel2 2023-11-13 11:26:51 -08:00
Max Brunsfeld
91b634fc59 Get some project panel actions working
Add styling for hovered and selected items

Co-authored-by: Marshall <marshall@zed.dev>
Co-authored-by: Julia <julia@zed.dev>
2023-11-13 11:08:51 -08:00
Nate Butler
889d20d046 Reorganize theme2 crate 2023-11-13 13:58:23 -05:00
Max Brunsfeld
13dd912817 Get left, right, and bottom docks rendering in the right places in the workspace
Co-authored-by: Julia <julia@zed.dev>
Co-authored-by: Marshall <marshall@zed.dev>
2023-11-13 10:47:15 -08:00
Conrad Irwin
2625051f75 Better fix for multiple focuses in one frame 2023-11-13 11:32:05 -07:00
Nate Butler
8432b713cc Resolve errors
Co-Authored-By: Marshall Bowers <1486634+maxdeviant@users.noreply.github.com>
2023-11-13 13:16:05 -05:00
Nate Butler
f6c54b8043 Redine command palette style
Co-Authored-By: Marshall Bowers <1486634+maxdeviant@users.noreply.github.com>
Co-Authored-By: Conrad Irwin <conrad.irwin@gmail.com>
2023-11-13 13:13:40 -05:00
Mikayla
4c5d5105f3
Merge branch 'main' into editor-tests 2023-11-13 09:54:02 -08:00
Nate Butler
7be12cb7b1 Checkpoint Broken 2023-11-13 12:44:50 -05:00
Antonio Scandurra
348760556a 💄 2023-11-13 18:33:08 +01:00
Antonio Scandurra
a6c95ad331 Fix panic when querying available actions 2023-11-13 18:29:18 +01:00
Nate Butler
5361a499ae Checkpoint 2023-11-13 12:09:31 -05:00
Nate Butler
521972ed9e Update Status Colors 2023-11-13 11:56:42 -05:00
Kirill Bulatov
031d841305
Make inlay hint cache tests pass (#3310)
Release Notes:

- N/A
2023-11-13 18:42:16 +02:00
Kirill Bulatov
dbd26ac651 Make inlay hint cache tests pass
Co-Authored-By: Conrad  <conrad.irwin@gmail.com>
2023-11-13 18:25:21 +02:00
Marshall Bowers
3654dd8da0 Remove unnecessary map 2023-11-13 11:10:08 -05:00
Marshall Bowers
5b254b03df Move Sized bound to StyledExt trait 2023-11-13 11:10:00 -05:00
Antonio Scandurra
45fef27aa1 Clear all the state when clearing KeyDispatcher 2023-11-13 15:31:35 +01:00
Antonio Scandurra
44534b926d Register actions on the right div 2023-11-13 15:21:47 +01:00
Antonio Scandurra
c8fb8e2859 💄 2023-11-13 15:20:43 +01:00
Antonio Scandurra
d0b5c654aa Clear pending keystrokes when finding action 2023-11-13 14:48:08 +01:00
Antonio Scandurra
827b16bf5c Capture node in dispatch tree even if it's not focusable 2023-11-13 14:42:16 +01:00
Antonio Scandurra
26d26fadb3 Fix focus story 2023-11-13 14:35:49 +01:00
Kirill Bulatov
e257f7d0b1 Ignore tests for now 2023-11-13 15:02:24 +02:00
Kirill Bulatov
a9c17e7407 Uncomment all inlay hint cache code and tests 2023-11-13 14:07:48 +02:00
Kirill Bulatov
f0f0b47058 pane: When opening a buffer, actually scroll to the selected tab. Previously it might've reused a shared state.
Deals with https://github.com/zed-industries/community/issues/2262 also fixes influencer's feedback.

Co-Authored-By: Piotr <piotr@zed.dev>
2023-11-13 13:09:02 +02:00
Antonio Scandurra
9c18253863 Register key and action listeners using Interactive::initialize
Co-Authored-By: Thorsten <mrnugget@gmail.com>
2023-11-13 11:37:57 +01:00
Antonio Scandurra
318cb784b2 Fix panic when calling with_key_dispatch recursively
Co-Authored-By: Thorsten <mrnugget@gmail.com>
2023-11-13 10:17:52 +01:00
Mikayla
13255ef133
Poke at getting the project panel showing up 2023-11-12 23:22:02 -08:00
Nate Butler
800ad1d3dc Update command palette style 2023-11-12 22:13:54 -05:00
Nathan Sobo
7eaba8fabc WIP 2023-11-10 14:47:45 -07:00
Nate Butler
6bdb6e486e Refactor command palette, picker and code action styles.
Co-Authored-By: Marshall Bowers <1486634+maxdeviant@users.noreply.github.com>
2023-11-10 16:13:25 -05:00
Nate Butler
3d66ba35a3 Add ui::Divider component
Co-Authored-By: Marshall Bowers <1486634+maxdeviant@users.noreply.github.com>
2023-11-10 16:12:32 -05:00
Nate Butler
5dca5caf9f Add elevation to StyledExt
Co-Authored-By: Marshall Bowers <1486634+maxdeviant@users.noreply.github.com>
2023-11-10 16:12:14 -05:00
Nathan Sobo
74a0d9316a Add a DispatchTree which will replace the existing key dispatch strategy
Instead of freezing a stack, we will record the entire dispatch tree so we can
change focus.

Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2023-11-10 11:56:14 -07:00
Antonio Scandurra
1c02690199
Wire up code actions in editor2 (#3302)
Release Notes:

- N/A
2023-11-10 16:47:09 +01:00
Antonio Scandurra
c2c6921734 🔥 2023-11-10 16:41:21 +01:00
Antonio Scandurra
198a854370 Fix bad import 2023-11-10 16:41:21 +01:00
Antonio Scandurra
468a014bfc Allow measuring arbitrary items in UniformList 2023-11-10 16:41:21 +01:00
Antonio Scandurra
c44db3b7ec Confirm code action on mouse down 2023-11-10 16:41:21 +01:00
Antonio Scandurra
fb450e35f7 Wire up keyboard interaction in code actions menu 2023-11-10 16:41:21 +01:00
Antonio Scandurra
bf576d47b1 Make code actions menu prettier 2023-11-10 16:41:21 +01:00
Antonio Scandurra
c76fd93015 Use padded bounds to draw uniform list items 2023-11-10 16:41:21 +01:00
Antonio Scandurra
1d37191320 Ensure UniformList style is painted beneath its items 2023-11-10 16:41:21 +01:00
Antonio Scandurra
6929a71827 Ceil measured width for Text element 2023-11-10 16:41:13 +01:00
Kirill Bulatov
d38a2b793e Do not add diagnostics for any selection in the diagnostics panel 2023-11-10 13:35:58 +02:00
Antonio Scandurra
a30b47aa5f Show a very basic code actions menu 2023-11-10 12:26:35 +01:00
Antonio Scandurra
23fd1e19dc Ignore element offset when manually drawing AnyElement 2023-11-10 11:35:57 +01:00
Antonio Scandurra
a0987f1121 Merge remote-tracking branch 'origin/main' into code-actions-2 2023-11-10 11:01:23 +01:00
Conrad Irwin
cc9fb9dea0 Fix panic caused by focusing the same thing twice 2023-11-09 22:25:46 -07:00