Commit Graph

1370 Commits

Author SHA1 Message Date
Max Brunsfeld
7e810d7e0d
Restore the ability to disable key bindings by setting them to null in your keymap (#3921)
* Fix an incorrect use of `Any::type_id` that prevented the disabling of
key bindings
* Restructured the representation of disabled key bindings so that they
handle context predicates correctly. Previously, to disable key binding,
you needed to supply the exact same context predicate (e.g. `Editor &&
mode == "full"`) as the binding that you are trying to disable. Now, the
context predicates of disabled key bindings are evaluated just like any
other context predicate (with the current context) to see if they apply.

Release Notes:

- Fixed an issue where disabling key bindings didn't work. To disable a
key binding, set it to `null` in your keymap.
2024-01-05 13:51:47 -08:00
Max Brunsfeld
8a96562adf Handle contexts correctly for disabled key bindings 2024-01-05 13:06:59 -08:00
Piotr Osiewicz
254a52d0a1
gpui: Remove dependency on sqlez (#3871)
This removes one of the path dependencies in gpui that's only really
needed by `workspace` (which can work around lack of these
implementations by itself). In theory it should also improve build
scheduling (as gpui doesn't have to wait for main dependency of sqlez -
libsqlite3 - to finish it's 25 seconds-long build in release), though in
practice I didn't notice a substantial improvement.
Moreover `sqlez` was unused by `settings` too, so that's removed
as well.

Release Notes:

- N/A
2024-01-05 19:36:55 +01:00
Conrad Irwin
3c0052850c Merge branch 'main' into channel-guests 2024-01-05 10:05:59 -07:00
Conrad Irwin
df0076a4eb
Better TestWindow support (#3876)
Adding guest roles led us down a rabbit hole where we'd have liked to
rely on a
side-effect of activating a window in tests; but the test window didn't
implement that.

Looking into that, I realized our TestWindow wasn't doing a great job of
emulating the MacWindow, so this makes the two more similar.
2024-01-05 09:59:48 -07:00
Conrad Irwin
06ab986599 fmt 2024-01-05 09:52:39 -07:00
Kirill Bulatov
92d6a8c253
Return back git status colors for tab labels (#3906) 2024-01-05 13:52:51 +02:00
Piotr Osiewicz
a984a158fc gpui: Use async-task 4.7 2024-01-05 11:42:28 +01:00
Kirill Bulatov
3070a6ef26 Return back git status colors for tab labels 2024-01-05 12:38:42 +02:00
Conrad Irwin
fff415e3e9 Improve deactivate simulation 2024-01-04 22:06:52 -07:00
Conrad Irwin
5037cca7ec Add LeakDetector for gpui2
Co-Authored-By: Julia <julia@zed.dev>
2024-01-04 20:29:44 -07:00
Julia
a86f401a7c
Moar terminal bugs de2ified (#3894)
Release Notes:

- N/A
2024-01-04 18:40:55 -05:00
Max Brunsfeld
5e3d4885bf
Fix some bugs in keymap handling (#3895)
- `base_keymap` setting was not respected, now it is
- without a `~/.config/zed/keymap.json` file, we would fail to load the
*default* keymap

Co-authored-by: Marshall <marshall@zed.dev>
2024-01-04 16:04:17 -05:00
Julia
bf8f3e3d68 Unbork test relying on old keystroke behavior
Previously it would both send the keydown *and then* the action, now
it send the action, and then because there was an action, does not send
the keydown

Co-Authored-By: Conrad Irwin <conrad@zed.dev>
2024-01-04 15:07:46 -05:00
Marshall Bowers
2da314fb79
Fix font resolution for UI text so we render with the fallback font (#3893)
This PR updates the font resolution for shaped text to use the new
`resolve_font` method on the text system.

This makes it so we use the fallback font if the desired font cannot be
found rather than rendering nothing.

Release Notes:

- Fixed an issue where nothing would render when the font set in
`ui_font_family` was not found.
2024-01-04 14:26:08 -05:00
Marshall Bowers
e4aa7ba4f2
Try to load fallback fonts instead of panicking when a font is not found (#3891)
This PR adjusts our font resolution code to attempt to use a fallback
font if the specified font cannot be found.

Right now our fallback font stack is `Zed Mono`, followed by `Helvetica`
(in practice we should always be able to resolve `Zed Mono` since we
bundle it with the app).

In the future we'll want to surface the ability to set the fallback font
stack from GPUI consumers, and potentially even support specifying font
stacks in the user settings (as opposed to a single font family).

Release Notes:

- Fixed a panic when trying to load a font that could not be found.
2024-01-04 14:10:46 -05:00
Julia
09b32e6a0e Attempt to run keystroke actions before attempting key listeners 2024-01-04 14:01:01 -05:00
Antonio Scandurra
3ab2062614 Fix border rendering
After implementing it a while ago, our previous interpolation scheme
didn't really make sense to me and was causing borders to be rendered
incorrectly. We don't really draw backgrounds and borders as part of
the same draw call anymore, but it seemed reasonable to have a correct
implementation in the shader anyway.

This commit uses Porter-Duff compositing (i.e., `over`) to produce
a color that is the result of superimposing the border on top of the
background. Then, we linearly interpolate towards the background color
as we slide out of the border and into the background.
2024-01-04 16:27:20 +01:00
Conrad Irwin
5c32dd5688 Better TestWindow support 2024-01-04 08:00:40 -07:00
Antonio Scandurra
b78497bf54 Clip List items that partially overflow 2024-01-04 15:12:25 +01:00
Conrad Irwin
6877bd4969 Make read only buffers feel more read only 2024-01-03 19:31:43 -07:00
Max Brunsfeld
28c39aae17 Start work on read-only project access for channel guests
Co-authored-by: Conrad <conrad@zed.dev>
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-01-03 19:30:32 -07:00
Max Brunsfeld
83f4c61657 Remove 2 suffix from gpui_macros, fix compile errors in tests
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-01-03 13:12:21 -08:00
Max Brunsfeld
f5ba22659b Remove 2 suffix from gpui
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-01-03 12:59:39 -08:00
Piotr Osiewicz
576d8806f5 Fix up gpui1 2024-01-02 13:18:56 +01:00
Piotr Osiewicz
e932f4cf47
Bump Rust to 1.75 (#3815)
**This PR also bumps wasmtime version from 0.38 to 2.0 as 0.38 does not
build with Rust 1.75**. I did not test the plugin runtime as (AFAIK) we
intend to deprecate it; also, wasmtime's most recent version is 16.0, so
it'd make sense to bump the version at some point anyways. I did not
bump the version to 16.0 straight away as that'd require code changes in
`plugin_runtime`.
Release Notes:

- N/A
2023-12-28 19:22:43 +01:00
Marshall Bowers
dc64411cca
Extend theme_importer in preparation for importing Zed1 themes (#3791)
This PR extends the `theme_importer` with the overall structure required
to support importing themes from Zed1.

Release Notes:

- N/A
2023-12-22 13:47:30 -05:00
Mikayla
ee4957dd47
Implement most core actions 2023-11-14 00:06:33 -08:00
Conrad Irwin
f464d69ff8 Merge branch 'main' into dispatch-tree 2023-11-13 13:21:57 -07: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
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
Max Brunsfeld
28d3d21108 Generalize Refineable derive macro to derive arbitrary traits on the refinement type 2023-11-09 13:23:31 -08:00
Max Brunsfeld
291d35f337 Merge branch 'main' into zed2-project-test
Co-authored-by: Marshall <marshall@zed.dev>
2023-10-31 11:50:56 -07:00
Conrad Irwin
4a6a17d866 Merge branch 'main' into zed2 2023-10-27 10:55:15 +02:00
Conrad Irwin
adc426b668 v1 2023-10-26 18:19:57 +02:00
Joseph T. Lyons
98d03f6e7a Revert "Add activity_indicator2"
This reverts commit 88a3a57789.
2023-10-26 17:13:40 +02:00
Joseph T. Lyons
88a3a57789 Add activity_indicator2 2023-10-26 16:49:39 +02:00
Conrad Irwin
51aa0d6a94 Clearer error on importing both gpui and gpui2 2023-10-26 10:39:52 +02:00
Max Brunsfeld
59adcc1744 Load more notifications when scrolling down 2023-10-22 17:10:21 +02:00
Max Brunsfeld
234ccbe51f Merge branch 'main' into notifications 2023-10-22 12:25:30 +02:00
Conrad Irwin
352a554c74 Fix bug in vim visual block mode 2023-10-20 11:49:10 -06:00
Conrad Irwin
1c36134cf9 Fix single column vim selections 2023-10-20 11:17:19 -06:00
Conrad Irwin
9d07561d99 Merge branch 'main' into pixel-columns 2023-10-18 23:00:56 -06:00
Max Brunsfeld
c66385f0f9 Add an empty state to the notification panel 2023-10-16 12:54:44 -07:00
Nathan Sobo
938dd8b9ca Checkpoint 2023-10-16 20:16:35 +02:00
Nathan Sobo
1a3650ef2a Get everything rendering again 2023-10-16 20:15:24 +02:00
Julia
2323fd17b0
Autocomplete docs (#3126)
Release Notes:

- Added documentation display for autocomplete items.
- Fixed autocomplete filtering blocking the Zed UI, causing hitches and
input delays with large completion lists.
- Fixed hover popup link not firing if the mouse moved a slight amount
while clicking.
- Added support for absolute path file links in hover popup and
autocomplete docs.
2023-10-13 13:26:45 -04:00
Antonio Scandurra
23f11fcd5e Merge branch 'main' into gpui2 2023-10-12 10:55:17 +02:00
Julia
801af95a13 Make completion documentation scroll & fix accompanying panic from tag
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-10-10 10:08:29 -04:00
Conrad Irwin
002e2cc42c Round better for up/down 2023-10-09 21:48:32 -06:00
Conrad Irwin
d4ef764305 Merge branch 'main' into links 2023-10-09 20:08:48 -06:00
Conrad Irwin
5dbda70235 Fix ./script/bundle to allow passing key 2023-10-09 08:59:25 -06:00
Marshall Bowers
f6a4151f60 Merge branch 'main' into gpui2 2023-10-07 10:50:05 -04:00
Conrad Irwin
34b7537948 Add universal links support to mac platform 2023-10-06 23:15:37 -06:00
Marshall Bowers
456baaa112
Mainline GPUI2 UI work (#3099)
This PR mainlines the current state of new GPUI2-based UI from the
`gpui2-ui` branch.

Included in this is a performance improvement to make use of the
`TextLayoutCache` when calling `layout` for `Text` elements.

Release Notes:

- N/A

---------

Co-authored-by: Nate Butler <iamnbutler@gmail.com>
Co-authored-by: Antonio Scandurra <me@as-cii.com>
2023-10-06 13:18:56 -04:00
Antonio Scandurra
1816ab95a0 Checkpoint: start rendering images 2023-10-04 15:03:21 +02:00
Max Brunsfeld
95342c8c33 Merge branch 'main' into channel-changes 2023-10-03 17:52:28 -07:00
Max Brunsfeld
af09861f5c Specify uuid crate in the root Cargo.toml
Co-authored-by: Mikayla <mikayla@zed.dev>
2023-10-03 17:39:24 -07:00
Nathan Sobo
c57e19c8fa Checkpoint: Glyphs rendering how I'd like 2023-10-03 17:29:36 -06:00
Nathan Sobo
550d9a9f71 Checkpoint 2023-10-03 16:17:25 -06:00
Nathan Sobo
4208ac2958 WIP 2023-10-03 15:17:45 -06:00
Nathan Sobo
45429b5400 WIP 2023-10-03 14:25:29 -06:00
Conrad Irwin
d9813a5bec
show host in titlebar (#3072)
Release Notes:

- show host in the titlebar of shared projects
- clicking on faces in the titlebar will now always follow the person
(it used to toggle)
- clicking on someone in the channel panel will follow that person
- highlight the currently open project in the channel panel

- fixes a bug where sometimes following between workspaces would not
work
2023-10-02 21:02:02 -06:00
Max Brunsfeld
84c4db13fb Avoid spurious notifies in chat channel select
Co-authored-by: Mikayla <mikayla@zed.dev>
2023-10-02 15:57:59 -07:00
Marshall Bowers
9e1f7c4c18
Mainline GPUI2 UI work (#3079)
This PR mainlines the current state of new GPUI2-based UI from the
`gpui2-ui` branch.

Release Notes:

- N/A

---------

Co-authored-by: Nate Butler <iamnbutler@gmail.com>
Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
Co-authored-by: Nate <nate@zed.dev>
2023-10-02 18:20:47 -04:00
Conrad Irwin
9dc292772a Add a screen for gpui tests
Allows me to test notifications
2023-10-02 09:53:30 -06:00
Mikayla
1d5b665f13
Implement channel changes for messages 2023-10-01 22:32:11 -07:00
Piotr Osiewicz
488a3eeace
ui: Mirror option key in keybindings (#3065)
![image](https://github.com/zed-industries/zed/assets/24362066/94731737-a21a-4cef-a445-eb855f1a4d3e)

![image](https://github.com/zed-industries/zed/assets/24362066/e879ec9a-70aa-4989-923f-4cca18d01587)

Release Notes:

- Fixed option key's appearance in keybindings
2023-09-29 16:45:49 +02:00
Nathan Sobo
9fefb1d898 Checkpoint 2023-09-27 21:14:09 -06:00
Marshall Bowers
d0b15ed940
Report which requested font families are not present on the system (#3006)
This PR improves the error message when `FontCache.load_family` attempts
to load a font that is not present on the system.

I ran into this while trying to run the `storybook` for the first time.
The error message indicated that a font family was not found, but did
not provide any information as to which font family was being loaded.

### Before

```
   Compiling storybook v0.1.0 (/Users/maxdeviant/projects/zed/crates/storybook)
    Finished dev [unoptimized + debuginfo] target(s) in 8.52s
     Running `/Users/maxdeviant/projects/zed/target/debug/storybook`
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: could not find a non-empty font family matching one of the given names', crates/theme/src/theme_settings.rs:132:18
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
libc++abi: terminating due to uncaught foreign exception
fish: Job 1, 'cargo run' terminated by signal SIGABRT (Abort)
```

### After

```
   Compiling storybook v0.1.0 (/Users/maxdeviant/projects/zed/crates/storybook)
    Finished dev [unoptimized + debuginfo] target(s) in 7.90s
     Running `/Users/maxdeviant/projects/zed/target/debug/storybook`
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: could not find a non-empty font family matching one of the given names: `Zed Mono`', crates/theme/src/theme_settings.rs:132:18
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
libc++abi: terminating due to uncaught foreign exception
fish: Job 1, 'cargo run' terminated by signal SIGABRT (Abort)
```

Release Notes:

- N/A
2023-09-22 15:27:42 -04:00
Marshall Bowers
71c1e36d1e
Put Theme behind an Arc (#3017)
This PR puts the `Theme` returned from the `theme` function behind an
`Arc`.

### Motivation

While working on wiring up window focus events for the `TitleBar`
component we ran into issues where `theme` was holding an immutable
borrow to the `ViewContext` for the entirety of the `render` scope,
which prevented having mutable borrows in the same scope.

### Explanation

To avoid this, we can make `theme` return an `Arc<Theme>` to allow for
cheap clones and avoiding the issues with the borrow checker.

Release Notes:

- N/A

Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
2023-09-22 13:35:30 -04:00
Mikayla
66dd0e9ec0
Switch drag end event to be fired after mouse up 2023-09-21 08:58:36 -07:00
Nathan Sobo
dfeb702544 WIP - Next: implement Element derive macro 2023-09-20 22:26:46 -06:00
Nathan Sobo
5b0e333967 Checkpoint 2023-09-20 12:16:26 -06:00
Nathan Sobo
83dae46ec6 Checkpoint 2023-09-20 10:17:29 -06:00
Nate Butler
26f442a675 Merge branch 'main' into nate/gpui2-ui-components 2023-09-19 00:26:41 -04:00
Nathan Sobo
c7a3186d08 Checkpoint 2023-09-18 20:17:27 -06:00
Nathan Sobo
a5e4ceb735 Checkpoint: Add methods for setting arbitrary lengths 2023-09-18 19:48:22 -06: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
Max Brunsfeld
6c3fd2a687 Merge branch 'main' into chat-again 2023-09-15 11:06:39 -07:00
Conrad Irwin
3e01d78a80 Make cargo test -p gpui work 2023-09-15 10:24:12 -06:00
Max Brunsfeld
b75971196f Add buttons for opening channel notes and joining call, in chat panel header 2023-09-14 18:05:44 -07:00
Max Brunsfeld
dd7c687041 Style the chat panel further 2023-09-14 17:19:08 -07:00
Conrad Irwin
4667110d0f Fix multi-key shortcuts with modifiers
To make this work we need to move the handling of multiple possible key
events into the keyboard shortcut system.

This was broken in #2957.
2023-09-14 14:35:17 -06:00
Nathan Sobo
dc2733998e WIP 2023-09-12 12:43:08 -06:00
Nathan Sobo
3ba8857491 Checkpoint 2023-09-11 12:58:55 -06:00
Nathan Sobo
fe6f0a253b Merge remote-tracking branch 'origin/main' into chat-again 2023-09-11 12:08:01 -06:00
Conrad Irwin
0c2bc6e553
Fix some international keybindings (#2957)
This adds primitive interaction with the IME system for keyboard
shortcuts in zed.

- Consult the IME functionality when handling keyboard shortcuts. This
allows you to bind to characters (like " on a Brazillian keybaord, or $
on a Czech keyboard) that aren't typed with an unmodified key.
([#1981](https://github.com/zed-industries/community/issues/1981))
([#1913](https://github.com/zed-industries/community/issues/1913))

Co-authored-with: Antonio Scandurra <me@as-cii.com>
2023-09-11 11:56:57 -06:00
Conrad Irwin
e017dc6a5e Fix ctrl-` on Brazillian too 2023-09-11 11:33:04 -06:00
Conrad Irwin
0a6e577e10 Fix some international keybindings
This adds primitive interaction with the IME system for keyboard
shortcuts in zed.

For zed-industries/community#1981
For zed-industroes/community#1913
2023-09-11 10:35:42 -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
Max Brunsfeld
c2121c25c1 Restructure collab panel to allow opening chat + notes w/ one click 2023-09-08 17:06:39 -07: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
Conrad Irwin
5d782b6cf0
vim . to replay (#2936)
Release Notes:

- vim: Add `.` to replay
([#946](https://github.com/zed-industries/community/issues/946))
- vim: Fix `J` in visual mode, and with counts.
2023-09-08 11:52:35 -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
d311bd04ff Add basic inspector 2023-09-07 22:24:02 -06:00
Nathan Sobo
37ef28a3bf Merge branch 'main' into storybook 2023-09-07 07:56:57 -06:00
Nathan Sobo
99ad60460a Add support for fetching/rendering images 2023-09-06 17:13:43 -06:00
Nathan Sobo
6d4dd0e7a4 Checkpoint 2023-09-06 15:22:35 -06:00
Nathan Sobo
5a778fbde6 Checkpoint 2023-09-06 14:16:15 -06:00
Conrad Irwin
20f98e4d17 vim . to replay
Co-Authored-By: maxbrunsfeld@gmail.com
2023-09-06 13:49:55 -06:00
Nathan Sobo
85aedf9bed WIP: Icons not yet rendering 2023-09-05 16:40:52 -06:00
Nathan Sobo
e08c0fc4ce Checkpoint 2023-09-05 12:50:07 -06:00
Nathan Sobo
9ec7569e09 Checkpoint 2023-09-05 12:16:21 -06:00
Max Brunsfeld
d7e4cb4ab1 executor: timers must be used 2023-09-01 16:52:41 -07:00
Nathan Sobo
3b5ee59273 Split playground into gpui2 and storybook 2023-08-30 16:12:14 -06:00
Nathan Sobo
ee11be98e5 Add gpui2 crate 2023-08-30 15:00:11 -06:00
Nathan Sobo
746f77bf7c Checkpoint 2023-08-30 14:40:57 -06:00
Nathan Sobo
1d491fcd78 Get playground rendering with backward compatible theming 2023-08-30 11:09:34 -06:00
Nathan Sobo
d763946b18 Checkpoint: Working toward compatibility with themes 2023-08-30 10:11:00 -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
a0b6e500cf WIP 2023-08-29 18:40:24 -06:00
Nathan Sobo
a56fab8c11 Remove unused proc macro 2023-08-29 18:30:57 -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
Max Brunsfeld
9521f6da42 Simplify implementation of flex with spacing 2023-08-28 14:16:21 -07:00
Nathan Sobo
fd1633ac4b Render a titlebar you can barely see
Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
2023-08-28 14:24:27 -06:00
Nathan Sobo
b5aedc144d Allow layout to be called on element in any phase of its lifecyle.
Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
2023-08-28 14:23:16 -06:00
Nathan Sobo
5bb780073e Relativize child layouts to their parent origin 2023-08-25 23:22:53 -06:00
Nathan Sobo
3bebfbcd50 Checkpoint 2023-08-25 23:15:58 -06:00
Nathan Sobo
8ad736da8d WIP 2023-08-25 22:19:49 -06:00
Nathan Sobo
147aa0f695 WIP 2023-08-25 21:41:21 -06:00
Max Brunsfeld
404f76739c Format let-else statements 2023-08-25 10:11:32 -07:00
Mikayla
4eff8ad186
Add channel notes view
co-authored-by: Max <max@zed.dev>
2023-08-23 18:37:00 -07:00
Mikayla Maki
26c3312049
Fix cursor and hover styles changing when dragging the mouse (#2884)
Since the resizing rework on docks, I noticed a lot of cursor flickering
when dragging, that drags trigger hover states in underlying elements
instead of being ignored, and that clicking and dragging off a button
can leave that button's click style active. This PR fixes all three
bugs.

Release Notes:

- Fixed several styling bugs related to dragging the mouse cursor
2023-08-23 18:29:29 -07:00
Mikayla
ff75d1663b
Fix stuck click styling when dragging off of a button 2023-08-23 18:22:48 -07:00
Mikayla
4d2f5a8e04
Fix cursor and hover styles changing when dragging the mouse 2023-08-23 18:08:33 -07:00
Mikayla
707ca34f19
Merge branch 'main' into disclosable-component 2023-08-23 16:30:27 -07:00
Nathan Sobo
cf007a3d3b Start working on restoring button 2023-08-23 16:17:45 -06:00
Nathan Sobo
4c000379d2 Click events, children 2023-08-23 16:02:56 -06:00
Nathan Sobo
8e3b23e510 Rename Window::mouse_position to last_mouse_position
We want to encourage people to use WindowContext::mouse_position, which
requests the position from the platform.

Co-Authored-By: Conrad Irwin <conrad@zed.dev>
2023-08-23 13:28:22 -06: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
cd72a42bd4 Mark new crates as publish = false 2023-08-22 20:47: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
3921278319 Add more style helpers 2023-08-22 09:16:05 -06:00
Nathan Sobo
53679ce045 Checkpoint 2023-08-22 09:07:45 -06:00
Nathan Sobo
ff7b25c538 Checkpoint 2023-08-21 16:14:59 -06:00
Nathan Sobo
f4d8763d2b WIP 2023-08-19 23:16:20 -06:00
Nathan Sobo
6663d3f8eb Checkpoint 2023-08-19 22:33:28 -06:00
Nathan Sobo
afff46b335 Checkpoint 2023-08-19 21:24:28 -06:00
Nathan Sobo
2c6f692c56 Checkpoint 2023-08-19 20:29:55 -06:00