Commit Graph

49 Commits

Author SHA1 Message Date
Nathan Sobo
db1cf8f6e1 Rename build_view to new_view and build_model to new_model
The word "new" is shorter and blends in with `new` constructors that are common
in Rust. Been meaning to do this for a while.
2024-01-01 17:42:01 -07:00
Nathan Sobo
51d1d92d66 Attempt to return impl Element from render. 3 errors. 2024-01-01 14:23:02 +01:00
Max Brunsfeld
5e7c74c7b6 Ensure that on_release callbacks are called even if view outlives its window 2023-12-20 16:01:52 -08:00
Conrad Irwin
a2f0accb74 Fix opening GoToLine from Command
This was broken because of the async hop introduced by should_dismiss.

Change that API to instead be syncronous, and require that implementors
(of which there is only one) to call dismiss again if they want to.
2023-12-12 20:46:27 -07:00
Conrad Irwin
4290c67b6a 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
Joseph T. Lyons
113c7287df Allow modals to override their dismissal
Co-Authored-By: Mikayla Maki <mikayla.c.maki@gmail.com>
2023-12-08 15:29:44 -05:00
Marshall Bowers
8f1c74b8bc
Factor out LabelLike to share common label styles (#3510)
This PR factors out a new `LabelLike` component to share common styles
between the `Label` and `HighlightedLabel` components.

Release Notes:

- N/A
2023-12-06 11:17:12 -05:00
Max Brunsfeld
233aac5573 Make DismissEvent a unit struct
Co-authored-by: Conrad <conrad@zed.dev>
2023-11-29 09:42:54 -08:00
Conrad Irwin
107c3d7f67 Fix esc in command palette
Also: add editor.register_action
2023-11-27 14:32:22 -07:00
Conrad Irwin
039c933d8e gpui2: Notifications 2023-11-26 22:28:53 -07:00
Nate Butler
453aa5ffd7 TextColor -> Color 2023-11-21 01:05:29 -05:00
Mikayla
2c4d83c9af
WIP
co-authored-by: conrad <conrad@zed.dev>
co-authored-by: Nathan <nathan@zed.dev>
2023-11-20 14:46:01 -08:00
Conrad Irwin
f86480ba5d Merge followup mess 2023-11-20 09:58:05 -07:00
Conrad Irwin
0798cfd58c Merge branch 'main' into derive-element-redux 2023-11-20 09:15:38 -07:00
Nathan Sobo
33cd6f520a Clean compile with redesigned element traits 2023-11-18 21:51:47 -07:00
Nathan Sobo
adc355a1e6 Element refinement passing on ui2 2023-11-18 20:05:47 -07:00
Julia
189ddf9380 Merge branch 'main' into unborked-git-zed2-diagnostics-view 2023-11-17 16:43:29 -05:00
Julia
3655a96e54 Merge branch 'main' into unborked-git-zed2-diagnostics-view 2023-11-17 16:32:35 -05:00
Julia
f4eb219c75 Get diagnostics view almost building in the zed2 world
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2023-11-17 16:32:35 -05:00
Mikayla
149b9d1aa6
Merge branch 'main' into managed-view-adjustment 2023-11-17 12:40:44 -08:00
Mikayla
17d53d0e38
Rename again, add fun cx APIs using new traits 2023-11-17 10:06:41 -08:00
Mikayla
01d9d53f4a
Adjust the type arrangement on ManagedViews 2023-11-17 09:51:11 -08:00
Conrad Irwin
2d1d75f482 +ManagedView
And some games with rust traits
2023-11-16 23:02:10 -07:00
Conrad Irwin
37d0b8424c Merge branch 'main' into element-types 2023-11-14 12:10:26 -07:00
Marshall Bowers
76c15229c1 Combine LabelColor and IconColor into TextColor 2023-11-14 13:48:01 -05: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
27fb381cca Checkpoint 2023-11-14 01:15:48 -07:00
Conrad Irwin
4ef95f05e8 Fix elevation on go_to_line2 2023-11-13 21:42:04 -07:00
Conrad Irwin
7e7b065535 Fix on_action on focusable
We were accidentally dropping the key context
2023-11-13 12:48:36 -07:00
Conrad Irwin
d4b1d1b528 Move from register_modals to register_workspace_action 2023-11-09 21:51:48 -07:00
Conrad Irwin
e6d6806693 Tidy up some more modal behaviour 2023-11-09 21:11:44 -07:00
Conrad Irwin
a73265ace4 Merge branch 'main' into command_palette2 2023-11-09 20:58:54 -07:00
Conrad Irwin
77d92ff65a Tidy up 2023-11-09 20:58:35 -07:00
Conrad Irwin
3c689ba33e Fix escape in GoToLine with new event emitter 2023-11-09 10:52:17 -07:00
Mikayla
2c67cc80ba
Merge branch 'main' into event-emitter 2023-11-08 20:10:38 -08:00
Conrad Irwin
cef8fa5570 tidy tidy 2023-11-08 17:09:38 -07:00
Conrad Irwin
1b9f76c01d Refactor GoToLine to use cx.observe_new_views() 2023-11-08 16:23:05 -07:00
Conrad Irwin
6a802e2fda Make Modals dismissable in theory 2023-11-08 14:45:54 -07:00
Mikayla
097efdebc5
WIP 2023-11-08 12:49:09 -08:00
Mikayla
409e17ad30
Merge branch 'main' into go-to-line2 2023-11-08 11:32:36 -08:00
Max Brunsfeld
4c31a0c989 Preserve stateless interactivity when assigning elements an id
Co-authored-by: Nathan <nathan@zed.dev>
Co-authored-by: Piotr <piotr@zed.dev>
2023-11-08 10:45:10 -08:00
Nathan Sobo
408edaae39 Remove call to removed method 2023-11-07 21:58:46 -07:00
Conrad Irwin
7cdece4857 Beautiful go to line modal
Co-authored-by: Julia <julia@zed.dev>
Co-authored-by: Marshall <marshall@zed.dev>
2023-11-07 15:32:34 -07:00
Conrad Irwin
5751303ea4 MOAR CODE 2023-11-07 14:44:36 -07:00
Nate Butler
3a85beeaa5 center a div 2023-11-07 16:23:41 -05:00
Conrad Irwin
acab2f9003 MODAL 2023-11-07 13:23:27 -07:00
Conrad Irwin
1e6a0f1c7b Wire up GoToLine modal 2023-11-07 12:12:05 -07:00
Conrad Irwin
a2a28af052 Add Modals
P.S. this is all completely different now

Co-Authored-By: Marshall <marshall@zed.dev>
Co-Authored-By: Julia <julia@zed.dev>
2023-11-07 09:18:34 -07:00