Nathan Sobo
b6110fed9e
WIP
2023-08-04 07:56:20 -06:00
Nathan Sobo
196946cbb6
Squelch warnings for now
2023-08-03 21:21:45 -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
Max Brunsfeld
a555fa1ada
Merge branch 'main' into collab-panel
2023-08-02 09:08:50 -07: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
6f6096238d
WIP
2023-07-28 16:44:15 -06:00
Nathan Sobo
6d10328796
WIP
2023-07-28 15:29:29 -06:00
Nathan Sobo
4d66c3237d
WIP
2023-07-28 15:01:45 -06:00
Max Brunsfeld
969ecfcfa2
Reinstate all of the contacts popovers' functionality in the new collaboration panel
2023-07-28 13:24:43 -07:00
Mikayla Maki
7f9df6dd24
Move channels panel into collab and rename to collab panel
...
remove contacts popover and add to collab panel
2023-07-28 13:24:42 -07:00
Mikayla Maki
fe5db3035f
move channels UI code to channels-rpc
2023-07-28 13:21:41 -07:00
Mikayla Maki
ac35dae66e
Add channels panel with stubbed out information
...
co-authored-by: nate <nate@zed.dev>
2023-07-28 13:21:39 -07:00
Nathan Sobo
dc8e7acca0
WIP
2023-07-27 23:52:41 -06:00
Nathan Sobo
239024acd6
WIP
2023-07-27 23:26:12 -06:00
Nathan Sobo
33e49b4962
WIP
2023-07-27 23:00:52 -06:00
Nathan Sobo
480401d65d
WIP
2023-07-27 18:23:23 -06:00
Nathan Sobo
2ef19e48bc
WIP
2023-07-27 13:00:28 -06:00
Nathan Sobo
70c9959ebc
WIP
2023-07-27 12:35:54 -06:00
Nathan Sobo
ab8906551d
WIP
2023-07-26 22:37:59 -06:00
Mikayla Maki
354c020612
Block extra drag events in original drag handlers
2023-07-26 14:57:46 -07:00
Nathan Sobo
c602d98680
WIP
2023-07-26 13:34:57 -06:00
Nathan Sobo
0374bc66ce
WIP
2023-07-26 12:54:23 -06:00
Mikayla Maki
a58c9ed7d3
fmt
2023-07-26 09:39:35 -07:00
Nathan Sobo
c48d8af204
Merge branch 'paint-context' into cells
2023-07-25 17:36:05 -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
Nathan Sobo
df9c17176e
WIP
2023-07-25 16:33:58 -06:00
Nathan Sobo
54a7419fa2
WIP
2023-07-24 23:27:14 -06:00
Mikayla Maki
429a2fc623
Add drag end events
...
Fix left dragging cascade
WIP: Implement right dragging, WIP: use drag end events to set and reset state around initial flex orientation
2023-07-23 13:28:30 -07:00
Julia
0b6155609d
In macOS platform layer map a ctrl-click to a right click ( #2755 )
...
Maps a ctrl left down event into a ctrl-less right down and then up pair
and filters out ctrl left up. Hopefully this ensures that mouse down/up
events remain balanced and somewhat matching.
Release Notes:
- Added the ability to ctrl-click in place of right click to summon
context menus
([#1150 ](https://github.com/zed-industries/community/issues/1150 )).
2023-07-20 14:54:55 -04:00
Kirill Bulatov
a5e63fbf77
Properly display keybindings in context menus
2023-07-20 12:18:04 +03:00
Julia
2e3aa703d9
In macOS platform layer map a ctrl-click to a right click
2023-07-19 15:43:45 -04:00
Nathan Sobo
19e4cad7a9
WIP
2023-07-18 13:32:07 -06:00
Nathan Sobo
18b0385d73
WIP
2023-07-17 16:48:31 -06:00
Nathan Sobo
f5682a3cb5
Paint basic children
...
Co-Authored-By: Derek Briggs <derek.briggs@me.com>
2023-07-17 16:39:58 -06:00
Kirill Bulatov
a4bf19c5bd
Simplify NoAction filtering logic
...
co-authored-by: Max Brunsfeld <max@zed.dev>
2023-07-17 20:42:35 +03:00
Kirill Bulatov
4cc06748c9
Ignore keybindings with NoAction in config overrides
2023-07-17 18:34:39 +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
Nathan Sobo
248f5dfd4b
Get a red box on screen
...
Co-Authored-By: Derek Briggs <derek.briggs@me.com>
2023-07-14 17:03:07 -06:00
Nathan Sobo
87bafb04e2
Get playground app launching
...
Not sure if it should be in the workspace, but it's easier for now.
Co-Authored-By: Derek Briggs <derek.briggs@me.com>
2023-07-14 15:34:31 -06:00
Nathan Sobo
4b2054215a
Get cell compiling
2023-07-14 15:20:53 -06:00
Nathan Sobo
0db8f681ba
WIP
2023-07-14 11:58:43 -06:00
Mikayla Maki
26b9be628e
Add the math for pane resizing
2023-07-12 22:35:51 -07:00
Antonio Scandurra
318deed25b
Skip key down event if preceded by its key equivalent version
...
Previously, we would only track whether the previous key down event
was a key equivalent. However, this could cause issues when pressing
certain keystrokes in rapid succession, e.g.:
- Pressing `shift-right` (to select a character)
- Pressing a character (with or without `shift` held down)
This would cause GPUI to ignore the second event because it was
preceded by a key equivalent event. With this commit, we track the
last key equivalent event, and skip the key down event only if it
matches the last key equivalent event.
2023-07-07 12:02:08 +02: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
Piotr Osiewicz
cc88bff1ff
Fix click-through behaviour of git panel
...
Co-authored-by: Antonio <antonio@zed.dev>
2023-07-05 15:25:33 +02:00
Antonio Scandurra
25564ea058
Introduce a WindowContext::focus
method that implies the window id
2023-07-05 09:39:04 +02:00
Kirill Bulatov
4c51ab8a25
Accept null
as a valid action, to disable a keystroke
...
co-authored-by: Mikayla Maki <mikayla@zed.dev>
2023-07-04 21:11:28 +03:00
Mikayla Maki
6ffa6afd20
fmt
2023-06-28 16:35:57 -07:00
Mikayla Maki
e0d618862c
Add click out handler
...
Make all context menus on button click toggles instead of re-shows
2023-06-28 16:23:07 -07:00
Mikayla Maki
18dd3102bf
WIP: Add click out event to fix context menus
2023-06-28 09:29:49 -07:00
Mikayla Maki
ce52d90a9d
Collab UI v2 ( #2618 )
...
This PR implements
https://www.figma.com/file/pLq7dvhx2mFeWFOedXpUQ5/Project-%E2%80%93-Collaboration-UI?type=design&node-id=666%3A8610&t=XFGk6KEtTCFXBvCQ-1
Release notes:
- [x] Redesigned collaboration UI
- [x] Added voice support
2023-06-28 09:14:39 -07: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
625814d30a
Merge branch 'main' into collab-titlebar-2
2023-06-27 15:40:43 +02:00
Antonio Scandurra
edc7f30660
Add assistant icons to the toolbar
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2023-06-26 16:49:33 +02:00
Antonio Scandurra
00e37bc2a2
Merge remote-tracking branch 'origin/main' into save-conversations
2023-06-26 15:59:19 +02:00
Nathan Sobo
bede668b14
Add a derive macro for Element
...
To turn any struct into a composite element, you can implement a render method
with the following signature:
fn render<V: View>(&mut self, view: &mut V, cx: &mut ViewContext<V>) -> AnyElement<V>;
Then add #[derive(Element)] to the struct definition.
This will make it easier to introduce higher-level components that are expressed in
terms of other elements.
2023-06-25 07:51:50 -06:00
Antonio Scandurra
ed88f52619
Remove double constrained call
2023-06-23 09:23:52 +02:00
Antonio Scandurra
6f0efec146
Merge remote-tracking branch 'origin/main' into save-conversations
2023-06-23 09:09:42 +02:00
Piotr Osiewicz
b430be5bc6
cargo fmt
2023-06-22 17:59:56 +02:00
Piotr Osiewicz
af252888c4
Merge branch 'main' into sergey/z-2308-create-a-proof-of-concept-of-exporting-a-type-from-rust-and
2023-06-22 17:58:56 +02:00
Piotr Osiewicz
76366422a6
Merge branch 'main' into collab-titlebar-2
2023-06-22 13:48:16 +02:00
Nathan Sobo
3a61fd503f
WIP: Trying to display the toolbar but tired. May be worth discarding this.
2023-06-20 20:11:37 -06:00
Mikayla Maki
cf4251fb55
Fix deafened -> enabled mistranslation
...
Fix mislocation of caller query in detach_and_log_error
Fix incorrect wording on livekit integration
Add share_mic action for manually enabling the microphone
Make mic sharing wait until the room has been fully established
2023-06-20 15:17:49 -07:00
Mikayla Maki
dbd95e35cf
fmt
2023-06-20 12:36:36 -07:00
Mikayla Maki
b828a74ad6
Add deafen controls
2023-06-20 12:34:32 -07:00
Nathan Sobo
03993ea719
Rename SumTree::push_tree to ::append ( #2626 )
...
This is something I've been meaning to rename in SumTree. Was looking at
the code and figure why not now.
2023-06-20 08:37:55 -06:00
Julia
dc07b60e40
Avoid assigning NSCursor style when it already is that style
...
This avoids a high cost which appears to be the system rasterizing the
cursor every time we call this, fixes a slowdown when scrolling rapidly
while mouse motion continually attempted to assign the style
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2023-06-20 09:31:30 -04:00
Nathan Sobo
8c298a9da5
Rename SumTree::push_tree to ::append
2023-06-19 19:49:33 -06:00
Mikayla Maki
6ad0b5d79f
Change color representation in json schema
2023-06-19 11:47:11 -07:00
Mikayla Maki
ea46947489
Tidy up font schema a little
2023-06-19 11:36:42 -07:00
Mikayla Maki
193ad64d18
Add JsonSchema to container style and fix compile errors
2023-06-19 11:31:17 -07: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
Sergey Onufrienko
ac42522987
chore: remove ts-rs
2023-06-16 21:45:37 +02:00
Sergey Onufrienko
b45f5f0489
feat: add JsonSchema to gpui
2023-06-16 21:36:42 +02:00
Sergey Onufrienko
cfc1856210
feat: add ts export
2023-06-12 22:13:19 +02:00
Sergey Onufrienko
b494b43496
chore: add ts-rs
2023-06-12 22:12:24 +02:00
Julia
6b89243902
Update rust-bindgen dev-dependencies ( #2563 )
...
I did \*something\* Friday afternoon which changed something about my
system SDK to break the `media` crate's bindings generation. Some of the
types and consts were not being generated despite being able to prove
that they exist in the source, such as when running the header through
the preprocessor myself and feeding that through the generator. Updating
my OS, XCode, command line tools, and reinstalling Rust as well as
working from fresh clones of the repo had no effect.
Updating rust-bindgen resolved the issue and downgrading the version
back to the original version caused the issue to reappear. I'm still not
sure what happened to change the SDK but at this point with being able
to build the project again I'm not going to look a gift horse in the
mouth.
Release Notes:
- N/A
2023-06-05 09:21:07 -04:00
Antonio Scandurra
c872f581d1
Query rect_for_text_range
on focused view instead of root element
...
This was causing IME input to be drawn in the wrong place when there
were splits or panels in the window.
2023-06-05 12:00:40 +02:00
Julia
5790d6993e
Update rust-bindgen dev-dependencies
2023-06-04 23:34:22 -04:00
Joseph Lyons
7c60f636d5
Fix typos
2023-06-02 22:02:19 -04:00
Max Brunsfeld
e67e6e6f70
Fix ambiguous glob export warnings in rust 1.70
2023-06-01 14:07:59 -07:00
Julia
31516b7863
TextStyle::default()
ask system for known existing font family
...
Rather than assuming a specific family exists, try a set of specific
names and if they fail, just grab any old font that the system reports
as existing
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2023-05-30 14:46:27 -04:00
Max Brunsfeld
2db57b5139
Adjust diagnostic transformation test to not wait for two buffer notifications
2023-05-26 15:47:37 -07:00
Nathan Sobo
0b7d095c0a
Introduce the ability to talk to GPT-4 within buffers on preview and dev ( #2524 )
...
This adds basic ability to interact with OpenAI inside a buffer.
Release Notes:
* If`OPENAI_API_KEY` is defined in your environment, you can now run the
`ai: assist` command to pass the text of your current buffer to GPT-4.
If you're editing a file with a `.zmd` extension, you can also invoke
the model with `cmd-enter.` (preview-only)
2023-05-24 12:00:43 -06:00
Nathan Sobo
747322a02d
Merge remote-tracking branch 'origin/main' into zmd
2023-05-24 11:04:07 -06:00
Max Brunsfeld
66b3be8687
Make toggle dock actions appear in the command palette
2023-05-24 09:58:41 -07:00
Nathan Sobo
7e6cccfa3d
WIP: Stream in completions
...
Drop dependency on tokio introduced by async-openai and do it ourselves.
The approach I'm taking of replacing instead of appending is causing issues. Need to just append.
2023-05-22 20:28:22 -06: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
5a8fb18c20
Show workspace only after initializing it
2023-05-19 19:35:00 +02:00
Kirill Bulatov
583b15badc
When the file is deleted via project panel, close it in editors
2023-05-19 18:52:30 +03:00
Mikayla Maki
89d8bb1425
WIP: Add persistence to new docks
2023-05-17 17:34:20 -07:00
Max Brunsfeld
1f0e79ee9d
Merge branch 'main' into setting-store
2023-05-17 14:56:35 -07:00
Julia
9e5983305b
Update font-kit to resolve panics when loading malformed fonts
2023-05-17 13:38:54 -04:00
Max Brunsfeld
89204e85c0
Merge branch 'main' into setting-store
2023-05-17 09:55:24 -07: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
Max Brunsfeld
39618ae32d
Define language settings in the language crate
2023-05-16 17:29:53 -07:00
Julia
d61b12a05b
Disable usvg's text feature flags to include less dependency code
2023-05-16 18:44:16 -04: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
Antonio Scandurra
adf361b374
Implement zooming for panes and docks
2023-05-16 11:49:48 +02:00
Kirill Bulatov
18e0ee44a6
Remove redundant scopes and actions to fix the focus toggle on ESC
...
co-authored-by: Antonio <antonio@zed.dev>
2023-05-15 13:10:15 +03:00
Nathan Sobo
ba50b35de6
wip
2023-05-13 14:34:09 -06:00
Mikayla Maki
41bef2e444
Refactor out git status into FileName component
...
Integrate file name component into the editor's tab content
2023-05-13 02:26:45 -07:00
Nathan Sobo
bd795d7607
Preserve panel size when re-docking between left and right
2023-05-12 15:15:11 -06:00
Nathan Sobo
214354b4da
Make panels independently resizable
2023-05-12 09:44:14 -06:00
Kirill Bulatov
89352a2bdc
Merge pull request #2463 from zed-industries/kb/reapply-modal-accessibility
...
Reintroduce more accesible modal keybindings
2023-05-12 06:11:04 +03:00
Mikayla Maki
defc9c8591
Merge pull request #2455 from zed-industries/git-status-viewer
...
Add Git Status to the project panel
2023-05-11 16:13:34 -07:00
Kirill Bulatov
f12dffa60c
Reintroduce more accesible modal keybindings
...
Brings commit 475fc40923
back
2023-05-11 20:59:10 +03:00
Joseph Lyons
0ab94551f4
Revert "More keybindings in macOs modals with buttons"
...
This reverts commit 1398a12062
.
2023-05-11 11:37:34 -04:00
Petros Amoiridis
21e1bdc8cd
Fix yellow to be yellow
2023-05-10 17:37:36 -07: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
Nathan Sobo
0d78266ddb
Replace todo with unimplemented to reduce distractions
2023-05-09 16:41:10 -06:00
Mikayla Maki
8d561d6408
Make dock not eagerly steal focus from sub items
2023-05-09 12:00:09 -07:00
Mikayla Maki
3570810516
Add API for accessing git branch
2023-05-08 14:33:58 -07:00
Mikayla Maki
2cf928c85a
Fixed clicks falling through the modal terminal
...
co-authored-by: Antonio <antonio@zed.dev>
2023-05-08 10:54:12 -07:00
Kirill Bulatov
706f6f495a
Add a test
2023-05-08 19:36:51 +03:00
Kirill Bulatov
714734d279
Add whitespaces rendering
2023-05-08 19:36:51 +03:00
Kirill Bulatov
2d8c88ad73
Draw tabs with svg icons in editor code only
2023-05-08 19:36:51 +03:00
Kirill Bulatov
f0a88b3337
Make invisibles display configurable
2023-05-08 19:36:51 +03:00
Kirill Bulatov
ad731ea6d2
Draft invisibles' tabs display
2023-05-08 19:36:51 +03: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
7b7a495be3
Remove stray dbg!
statement
2023-05-04 09:56:49 +02:00
Antonio Scandurra
f6f18be9c3
Remove WindowContext::is_child_focused
2023-05-04 09:53:35 +02:00
Antonio Scandurra
67a3891f15
Make dispatch_event related methods public to the crate only
2023-05-04 09:53:35 +02:00
Antonio Scandurra
92183e0d72
Ensure querying keystrokes or actions is safe
...
This is achieved by moving `available_actions` into `AsyncAppContext` (where
we know no view/window is on the stack) and `keystrokes_for_action` into `LayoutContext`
where we'll fetch the previous frame's ancestors and notify the current view if those
change after we perform a layout.
2023-05-04 09:53:31 +02:00
Antonio Scandurra
040cc4d4c3
Allow notifying views when the ancestry of another view is outdated
2023-05-03 19:25:00 +02:00
Antonio Scandurra
7250754f8e
Make dispatch_keystroke public to the crate only
2023-05-03 19:13:17 +02:00
Antonio Scandurra
9e8f852afb
Remove ViewContext::is_child
2023-05-03 19:09:07 +02:00
Antonio Scandurra
e9ed40da37
Remove the ability to retrieve the view's parent
2023-05-03 16:52:55 +02:00
Antonio Scandurra
7f137ed3dd
Compute view ancestry at layout time
2023-05-03 16:36:14 +02:00
Antonio Scandurra
7f345f8bf5
Separate Window::build_scene
into layout
and paint
2023-05-03 12:18:16 +02:00
Antonio Scandurra
c3cf9e3185
Merge pull request #2436 from zed-industries/close-window-end-call
...
Move methods querying window state into `AsyncAppContext`
2023-05-03 10:27:05 +02:00
Kirill Bulatov
1398a12062
More keybindings in macOs modals with buttons
...
Closes https://github.com/zed-industries/community/issues/1095
by forcing the non-Cancel button to get a focus.
Due to the way macOs handles buttons on modals, the focus gain had to be
achieved via certain button addition order, rather than conventional
"setFocus"-ish API, see the related comment for details.
Co-authored-by: Antonio Scandurra <antonio@zed.dev>
2023-05-02 21:10:20 +03:00
Antonio Scandurra
70f8cf4cf6
Move methods querying window state into AsyncAppContext
2023-05-02 19:38:48 +02:00
Antonio Scandurra
794446bf8b
Move debug_elements
to AsyncAppContext
...
Previously, `debug_elements` was available on `WindowContext`. If that
method was called while having a borrow out to a view, it would panic because
the view would already have been borrowed.
By moving it to an `AsyncAppContext` we ensure the method can't be called while
a view is being used.
2023-05-02 11:09:40 +02:00
Antonio Scandurra
4c1cba6def
Remove unnecessary Element
impl for RootElement
2023-05-02 10:09:57 +02:00
Antonio Scandurra
6c931ab9da
Inline test-only AppContext
methods
2023-05-01 16:49:17 +02:00
Antonio Scandurra
eb2cce98a7
Move dispatch_action_any_action_at
to AsyncAppContext
2023-05-01 16:40:57 +02:00
Antonio Scandurra
c4472b0786
Remove ViewContext::dispatch_action
2023-05-01 16:27:36 +02:00
Antonio Scandurra
d815fc88ae
Remove ViewContext::dispatch_any_action
2023-05-01 14:24:00 +02:00
Antonio Scandurra
029538fe21
Make dispatch_global_action
private
2023-05-01 11:45:35 +02:00
Antonio Scandurra
106ebeb386
Remove obsolete presenter modules
2023-04-28 17:37:25 +02:00
Antonio Scandurra
489b1f6a63
Merge remote-tracking branch 'origin/main' into simplify-action-dispatch
2023-04-28 17:31:12 +02:00
Antonio Scandurra
1c5376a560
Remove impl_internal_actions
macro
2023-04-28 17:29:57 +02:00
Max Brunsfeld
7258db7a4e
Merge pull request #2417 from zed-industries/hover-markdown
...
Render markdown more correctly in the editor hover popover
2023-04-27 14:15:04 -07:00
Max Brunsfeld
8eb9c6563a
Generalize Text element to let you add arbitrary scene primitives for runs of text
2023-04-27 13:58:06 -07:00
Max Brunsfeld
7960067cf9
Fix bug where Text element would wrap at the right glyph in the wrong run
2023-04-26 15:33:10 -07:00
Max Brunsfeld
1bbcff543b
Add API for adding mouse regions within Text
2023-04-26 12:00:26 -07:00
Antonio Scandurra
6317e885c7
Don't allow strong view handles to be read/updated with an AsyncAppContext
...
This avoids an invitation to hold strong view handles across async await
points, which is a common source of leaks.
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2023-04-26 13:36:13 +02:00
Antonio Scandurra
689e878bd8
Use a WeakViewHandle
in Client
for view message handlers
2023-04-26 12:21:02 +02:00
Antonio Scandurra
57beec6071
Allow direct read/update of WeakViewHandle
only in AsyncAppContext
2023-04-26 12:20:57 +02:00
Antonio Scandurra
2b6830c798
Remove unnecessary calls to WeakViewHandle::upgrade
2023-04-26 11:13:46 +02:00
Antonio Scandurra
94c2eaad23
Replace ViewContext::spawn
with ViewContext::spawn_weak
2023-04-26 10:23:27 +02:00
Antonio Scandurra
7ca412ade3
Merge remote-tracking branch 'origin/main' into fewer-context-traits
2023-04-26 09:54:58 +02:00
Max Brunsfeld
a7145021b6
Extract a named struct from text_layout::Line's style runs
2023-04-25 14:05:23 -07:00
Max Brunsfeld
ebbe52e6b0
🎨 Specify more dependencies at the workspace level
2023-04-24 17:41:55 -07:00
Max Brunsfeld
abdccf7393
Use a workspace dependency for the futures crate
2023-04-24 09:43:31 -07:00
Antonio Scandurra
c165fb9be5
Remove ReadView
and UpdateView
traits
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2023-04-24 17:36:14 +02:00
Antonio Scandurra
a6115d9330
Remove UpdateModel
trait
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2023-04-24 16:52:09 +02:00
Antonio Scandurra
a9417f3d2e
Remove ReadModelWith
trait
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2023-04-24 16:44:54 +02:00
Antonio Scandurra
5f500d34b2
Remove UpgradeModelHandle
trait
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2023-04-24 16:40:30 +02:00
Antonio Scandurra
b8fab6fde9
Remove UpgradeViewHandle
trait
...
Co-authored-by: Nathan Sobo <nathan@zed.dev>
2023-04-24 16:33:27 +02:00
Nathan Sobo
e6604d1641
Fix missing actions in the command palette
...
Previously, the workspace view was on the stack when we were computing the
available actions, which excluded it. This is a stopgap. We should find a
better solution ASAP.
2023-04-21 15:59:29 -06:00
Nathan Sobo
83bf3d071d
WIP
2023-04-21 15:36:52 -06:00
Nathan Sobo
55db28e074
Eliminate ReadModel trait
2023-04-21 15:05:19 -06:00
Nathan Sobo
5dac95c47c
Eliminate ReadView trait
2023-04-21 15:03:57 -06:00
Nathan Sobo
993dbf86cb
Merge remote-tracking branch 'origin/main' into into-element
2023-04-21 14:27:25 -06:00
Nathan Sobo
c1810e8ec9
Fix formatting
2023-04-21 13:09:36 -06:00
Nathan Sobo
fe492eacbf
Refine naming of element-related types and traits
...
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2023-04-21 13:06:37 -06:00
Antonio Scandurra
03619dfa55
Rename Drawable::boxed to into_element and make containers generic
...
Multi-element are now generic over any drawable child, which can be converted
into an element.
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2023-04-21 12:43:19 -06:00
Antonio Scandurra
4ac894ffbe
Remove unnecessary lifetime parameter from WindowContext
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2023-04-21 18:06:53 +02:00
Antonio Scandurra
a860a6cd62
Make App::notify_view
private
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2023-04-21 16:50:57 +02:00
Antonio Scandurra
8c7f821d14
Introduce a new WindowContext::remove_window
API
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2023-04-21 16:39:53 +02:00
Antonio Scandurra
31e906d068
Avoid double borrow of views on up
and up_out
in DragAndDrop
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2023-04-21 16:19:51 +02:00
Antonio Scandurra
c76b9794e4
Merge branch 'main' into window_context_2
2023-04-21 10:58:08 +02:00
Max Brunsfeld
32c57bcd22
Store buffer's diagnostic sets in a smallvec
2023-04-20 08:58:41 -07:00
Antonio Scandurra
0d5eea8169
Track active window id in test platform
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2023-04-20 17:22:11 +02:00
Antonio Scandurra
d9bb37c649
Add WindowContext::update_default_global
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2023-04-20 17:13:13 +02:00
Antonio Scandurra
c52b6328b7
Merge branch 'main' into window_context_2
2023-04-20 16:01:47 +02:00
Nathan Sobo
5514349b6b
Add Component elements
2023-04-18 22:49:06 -06:00
Joseph T. Lyons
614a9c8977
Merge pull request #2377 from zed-industries/add-tab-tooltips
...
Add tab tooltips
2023-04-18 14:37:38 -04:00