Marshall Bowers
d14dc35efe
Merge branch 'gpui2' into marshall/gpui2-playground
2023-10-02 18:36:22 -04:00
Mikayla
1d5b665f13
Implement channel changes for messages
2023-10-01 22:32:11 -07:00
Piotr Osiewicz
0598a8243d
chore: Hoist non-generic part out of add_action_internal. ( #2981 )
...
add_action_internal shows up often in downstream crates (as it should
be, since it's a generic function it's codegened in each crate that uses
it); it adds non-trivial amounts of LLVM IR to the build as a whole
which we can cut down a bit by doing the inner fn trick.
Release Notes:
- N/A
2023-09-18 11:55:44 +02:00
Nathan Sobo
dc2733998e
WIP
2023-09-12 12:43:08 -06:00
Nathan Sobo
e0fdc7d0aa
Eliminate PaintContext
2023-09-11 09:00:59 -06:00
Nathan Sobo
a24d94cfda
Eliminate LayoutContext
2023-09-11 08:47:00 -06:00
Nathan Sobo
ebf8b32811
Checkpoint
2023-09-08 16:25:10 -06:00
Nathan Sobo
362b1a44be
Merge branch 'main' into storybook
2023-09-08 14:18:44 -06:00
Nathan Sobo
14fc386dc8
Checkpoint
2023-09-08 13:54:15 -06:00
Nathan Sobo
53a50b8df4
Move refreshing to window
2023-09-08 13:27:29 -06:00
Antonio Scandurra
ddc8a126da
Find keystrokes defined on a child but handled by a parent
...
This fixes a bug that was preventing keystrokes from being shown on tooltips
for the "Buffer Search" and "Inline Assist" buttons in the toolbar.
This commit makes the behavior of `keystrokes_for_action` more consistent with
the behavior of `available_actions`. It seems reasonable that, if a child view
defines a keystroke for an action and that action is handled on a parent, we
should show the child's keystroke.
2023-09-08 12:50:59 +02:00
Nathan Sobo
6d4dd0e7a4
Checkpoint
2023-09-06 15:22:35 -06:00
Nathan Sobo
9ec7569e09
Checkpoint
2023-09-05 12:16:21 -06:00
Nathan Sobo
3b5ee59273
Split playground into gpui2 and storybook
2023-08-30 16:12:14 -06:00
Nathan Sobo
48d3e2d9b9
Move views_to_notify_if_ancestors_change to Window
2023-08-29 21:58:44 -06:00
Nathan Sobo
2e7356a53e
Store new_parents on Window instead of layout context
2023-08-29 21:43:48 -06:00
Nathan Sobo
42cd257287
Remove text style stack from LayoutContext
2023-08-29 21:33:08 -06:00
Nathan Sobo
81957c49d5
Merge remote-tracking branch 'origin' into divs
2023-08-29 21:14:14 -06:00
Nathan Sobo
9371754942
Provide themes to subtrees via context
...
Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
2023-08-28 16:07:26 -06:00
Nathan Sobo
147aa0f695
WIP
2023-08-25 21:41:21 -06:00
Mikayla
4eff8ad186
Add channel notes view
...
co-authored-by: Max <max@zed.dev>
2023-08-23 18:37:00 -07:00
Mikayla
4d2f5a8e04
Fix cursor and hover styles changing when dragging the mouse
2023-08-23 18:08:33 -07:00
Nathan Sobo
684db11afd
Use platform API to request mouse position
...
Co-Authored-By: Conrad Irwin <conrad@zed.dev>
2023-08-23 13:10:41 -06:00
Nathan Sobo
5996b6b46b
Use RefinementCascade to compose pressability and hoverability
...
Co-Authored-By: Conrad Irwin <conrad@zed.dev>
2023-08-23 12:18:12 -06:00
Nathan Sobo
569d99a5a1
Add hover styling support
2023-08-23 09:08:05 -06:00
Nathan Sobo
d375f7992d
Merge branch 'main' into divs
2023-08-22 16:35:56 -06:00
Nathan Sobo
733df38f9b
Checkpoint
...
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-08-22 11:34:06 -06:00
Nathan Sobo
0747131bd4
Compiling checkpoint
2023-08-19 19:51:22 -06:00
Nathan Sobo
b910c85f7f
Still need to wire up MouseMove with the new regions
2023-08-18 02:23:06 -06:00
Nathan Sobo
3709eff34b
Compiling
2023-08-18 01:59:21 -06:00
Nathan Sobo
9b74dc196e
Introduce Refinement trait and derive macro
2023-08-18 01:03:46 -06:00
Mikayla
8630557ece
Add action button component for rendering the search options
2023-08-17 15:30:40 -07:00
Nathan Sobo
812d3f6af6
Get basic mouse_down and mouse_up working
2023-08-16 22:21:27 -06:00
Mikayla
2f16147055
Fix dock resizing
2023-08-16 19:47:54 -07:00
Nathan Sobo
187d78011c
WIP
2023-08-16 13:52:42 -06:00
Nathan Sobo
f1aafab61d
Get text rendering
...
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-08-16 12:50:35 -06:00
Mikayla
e5eed29c72
Add components example
...
Re-arrange generics on mouse event handler
Add TypeTag struct for dynamically tagged components
2023-08-15 03:06:43 -07:00
Nathan Sobo
d6eaa3c6b8
Ditch the hot reloading approach
2023-08-11 00:26:58 -06:00
Nathan Sobo
0bf607cd2d
WIP
2023-08-10 10:26:48 -06:00
Nathan Sobo
3b1e5e966a
What if we base themes on Rose Pine
2023-08-09 20:54:30 -06:00
Nathan Sobo
c95aecdd53
Merge branch 'main' into cells
2023-08-08 21:23:57 -06:00
Nathan Sobo
db96fb1307
Merge remote-tracking branch 'origin/main' into paint-context
2023-08-08 18:27:16 -06:00
Nathan Sobo
fc96676662
Use AppContext::update when updating windows so we handle effects
2023-08-08 17:20:46 -06:00
Nathan Sobo
8e49d1419a
Minimize window id usage
2023-08-08 16:38:46 -06:00
Nathan Sobo
afd89b256a
Store AnyWindowHandles instead of usizes
2023-08-08 16:06:53 -06:00
Nathan Sobo
b2d9ccc0a2
Move more window methods off AsyncAppContext
2023-08-08 11:38:07 -06:00
Nathan Sobo
95cd96e4be
Move debug_elements to AnyWindowHandle
2023-08-08 11:27:19 -06:00
Nathan Sobo
4f10f0ee86
Remove window methods from AsyncAppContext
2023-08-08 11:23:49 -06:00
Nathan Sobo
1fd80ba8bd
Remove AsyncAppContext::remove_window
2023-08-08 11:22:43 -06:00
Nathan Sobo
0a4633f88f
Remove more window id usage
2023-08-08 11:20:09 -06:00
Nathan Sobo
d896d89842
Store an AnyWindowHandle in WindowContext
2023-08-08 11:08:37 -06:00
Nathan Sobo
d687c3d81f
Merge remote-tracking branch 'origin/main' into window-handles
2023-08-07 22:07:20 -06:00
Nathan Sobo
0197d49230
Move activation simulation to AnyWindowHandle
2023-08-07 19:45:43 -06:00
Nathan Sobo
486f5bc6ca
Get compiling
2023-08-07 19:08:58 -06:00
Nathan Sobo
3e0d0e5c01
WIP
2023-08-07 13:54:47 -06:00
Nathan Sobo
d4d32611fe
WIP
2023-08-06 18:57:02 -06:00
Nathan Sobo
adc50469ff
WIP
2023-08-06 12:45:31 -06:00
Nathan Sobo
dcf8b00656
WIP
2023-08-05 18:00:44 -06:00
Nathan Sobo
379652f074
Merge branch 'main' into cells
2023-08-03 19:33:04 -06:00
Nathan Sobo
2d96388be3
Use WindowHandles in a couple places
2023-08-03 17:46:34 -06:00
Nathan Sobo
485c0a482e
Don't refcount window handles
2023-08-03 17:11:47 -06:00
Nathan Sobo
afcc0d621b
WIP
2023-08-03 17:03:39 -06:00
Nathan Sobo
3c938a7377
WIP
2023-08-03 08:10:16 -06:00
Nathan Sobo
8e36da1382
Get tests passing
2023-08-02 15:02:55 -06:00
Nathan Sobo
884cee6dfd
Get tests compiling returning WindowHandle<V: View> from add_window
2023-08-02 14:05:03 -06:00
Nathan Sobo
60e190e500
WIP
2023-08-02 12:08:56 -06:00
Nathan Sobo
300ce61bd0
WIP
2023-08-02 08:25:40 -06:00
Nathan Sobo
b695c42e11
WIP: Return WindowHandle<V: View> from AppContext::add_window
2023-08-01 22:28:04 -06:00
Nathan Sobo
1dfde8eab5
WIP
2023-08-01 20:53:15 -06:00
Kirill Bulatov
646dabe113
Add buffer search history
2023-08-01 01:31:28 +03:00
Nathan Sobo
480401d65d
WIP
2023-07-27 18:23:23 -06:00
Nathan Sobo
ab8906551d
WIP
2023-07-26 22:37:59 -06:00
Nathan Sobo
0374bc66ce
WIP
2023-07-26 12:54:23 -06:00
Nathan Sobo
1b03c5d69c
Pass PaintContext to Element::paint
...
I want to use this on another branch, but it's a sweeping change,
so this prepares the ground for it. This can always be reverted if
it doesn't work out.
2023-07-25 17:32:31 -06:00
Kirill Bulatov
a5e63fbf77
Properly display keybindings in context menus
2023-07-20 12:18:04 +03:00
Kirill Bulatov
eaa8224076
Use id instead of type_id for actions
...
Currently, both are the same thing, so the logic is not changed.
2023-07-17 12:24:56 +03:00
Nate Butler
76873c508a
Z-2276/Z-2275: Project & Branch switchers ( #2662 )
...
This PR adds project and branch switchers in top left corner.
Release Notes:
- Added a project & branch switcher under project name.
2023-07-05 13:09:40 -04:00
Piotr Osiewicz
85add260f6
Track regions instead of clicks.
...
Get rid of superfluous params in RenderParams related to hover & click state.
Co-authored-by: Antonio <antonio@zed.dev>
2023-07-05 16:48:52 +02:00
Antonio Scandurra
25564ea058
Introduce a WindowContext::focus
method that implies the window id
2023-07-05 09:39:04 +02:00
Nathan Sobo
8f8a99d788
Bind cmd-? to assistant::toggle_focus
...
Bypass system help menu shortcut at the app delegate level to achieve this.
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-06-28 11:43:24 +02:00
Piotr Osiewicz
2a3c660d1f
settings: accept trailing commas ( #2606 )
...
Z-2357
I've found a crate that handles both comments and trailing commas in
JSON. It is a fork of `serde_json`, but it is maintained & up-to-date.
Sadly RawValue seems to not play nicely with it; I've ran into
deserialisation issues around use of RawValue. For this PR I've migrated
to `Value` API.
Obviously this is just a point of discussion, not something I'd merge
straight away. There may be better solutions to this particular problem.
I've also noticed that `serde_json_lenient` does not handle trailing
commas after bindings array. I'm not sure how big of an issue that is.
Release Notes:
- Improved handling of trailing commas in settings files.
[#1322 ](https://github.com/zed-industries/community/issues/1322 )
2023-06-19 18:29:03 +02:00
Joseph Lyons
7c60f636d5
Fix typos
2023-06-02 22:02:19 -04:00
Max Brunsfeld
66b3be8687
Make toggle dock actions appear in the command palette
2023-05-24 09:58:41 -07:00
Antonio Scandurra
4aa2858b2b
Transfer focus to root view only if previously-focused view was dropped
2023-05-22 18:05:08 +02:00
Antonio Scandurra
146809eef0
Merge branch 'main' into panels
2023-05-22 14:10:17 +02:00
Antonio Scandurra
747fbfadeb
Notify old/new ancestors of the focused view when they change
2023-05-17 17:12:12 +02:00
Antonio Scandurra
981129ef8e
Show a panel/pane as zoomed only if it's the active item in workspace
2023-05-17 15:06:58 +02:00
Antonio Scandurra
f87ae6032e
Don't rely on action propagation for zooming in and out
...
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-05-16 10:34:50 -06:00
Nathan Sobo
ba50b35de6
wip
2023-05-13 14:34:09 -06:00
Max Brunsfeld
cee7edabf9
Ensure the SettingsStore global is added in tests
2023-05-10 16:39:59 -07:00
Antonio Scandurra
9b9d53fcf8
Focus the root view if the previously-focused view isn't rendered
2023-05-10 15:40:46 +02:00
Mikayla Maki
8d561d6408
Make dock not eagerly steal focus from sub items
2023-05-09 12:00:09 -07:00
Antonio Scandurra
080a1f00a3
Delay focus_in
event for window activation till after layout
2023-05-05 10:47:42 +02:00
Antonio Scandurra
b9ed327b94
Replace usages of is_parent_view_focused
with is_self_focused
...
Previously, this was used because we didn't have access to the current
view and `EventContext` was an element-only abstraction. Now that the
`EventContext` wraps the current view's `ViewContext` we can simply check
for the view's focus and avoid querying ancestors.
2023-05-05 10:08:22 +02:00
Antonio Scandurra
80ad59a620
Make focusing the parent an effect to avoid querying ancestors
2023-05-05 10:04:54 +02:00
Antonio Scandurra
da19edc3e3
Merge branch 'main' into implicit-ancestry
2023-05-04 14:39:58 +02:00
Antonio Scandurra
5cc6304fa6
Verify keystrokes can be queried while views are on the stack
2023-05-04 12:09:32 +02:00
Antonio Scandurra
3d679ddb26
Avoid re-allocating KeymapContext
after every view notification
2023-05-04 12:04:30 +02:00
Antonio Scandurra
18e39ef2fa
Cache view's type id and keymap context into a separate map
...
During `layout`, we now pass a mutable reference to the element's
parent view. This is a recursive process that causes the view to
be removed from `AppContext` and then re-inserted back into it once
the layout is complete.
As such, querying parent views during `layout` does not work as such
views will have been removed from `AppContext` and not yet re-inserted
into it. This caused a bug in `KeystrokeLabel`, which used the `keystrokes_for_action`
method to query its ancestors to determine their type id and keymap context.
Now, any time a view notifies, we will cache its keymap context so that
we don't need to query the parent view during `layout`.
2023-05-04 10:47:56 +02:00
Antonio Scandurra
f6f18be9c3
Remove WindowContext::is_child_focused
2023-05-04 09:53:35 +02:00