Commit Graph
167 Commits
Author SHA1 Message Date
Nathan Sobo adc355a1e6 Element refinement passing on ui2 2023-11-18 20:05:47 -07:00
Nathan Sobo 2515bbf990 Move self in Element::paint
Remove mutable state borrows in favor of state ownership in render processes to streamline element rendering.
2023-11-17 23:32:55 -07:00
Conrad Irwin a6d6f8a193 shhh (#3358)
- Fix image errors


Release Notes:

- N/A
2023-11-17 14:01:44 -07:00
Nathan Sobo c866c211b5 Make static str and SharedString implement Element 2023-11-17 13:48:01 -07:00
Conrad Irwin 6bfe6fa0e1 Fix image errors
* Firstly only log one error per image load, not per frame
* Secondly use an Icon not an image for rendering Icons
2023-11-17 13:47:07 -07:00
Conrad Irwin 624bd0a05a Collab ui2 (#3357)
* Clickable context menus & movable panels – what will they think of
next?!

Release Notes:

- N/A
2023-11-17 13:33:18 -07:00
Conrad Irwin 9d742b90c3 Allow you to click on a context menu item 2023-11-17 11:57:51 -07:00
Nathan Sobo 2fb13cf1ca Separate WrappedLines from ShapedLines (#3350)
ShapedLines are never wrapped, whereas WrappedLines are optionally
wrapped if they are associated with a wrap width. Originally, when
rewriting GPUI, I tried to combine everything because wrapping is
inherently optional for the Text element, but we have a bunch of APIs
that don't make sense on a line that may wrap, so we need a distinct
type for that case.

This is a precursor to implementing clickable links in markdown. I
noticed multiple places where we were confused about whether or not the
line was wrapped so this felt important.

Release Notes:

- N/A
2023-11-16 23:20:35 -07:00
Nathan Sobo 9558da8681 Separate WrappedLines from ShapedLines
ShapedLines are never wrapped, whereas WrappedLines are optionally wrapped if
they are associated with a wrap width. I tried to combine everything because
wrapping is inherently optional for the Text element, but we have a bunch of
APIs that don't make sense on a line that may wrap, so we need a distinct type
for that case.
2023-11-16 23:10:51 -07:00
Conrad Irwin 6d4276ea5f Merge branch 'main' into collab_ui2 2023-11-16 22:08:42 -07:00
Conrad Irwin c0ad15756c More attachment configuration for context menus 2023-11-16 21:59:23 -07:00
Conrad Irwin 9547e88d88 TEMP 2023-11-16 19:50:31 -07:00
Mikayla 4de2c0f7ef Re-implement actions as derive macros instead of blanket impls 2023-11-16 17:32:02 -08:00
Conrad Irwin 074a221e0f Progress on ContextMenu 2023-11-16 16:59:27 -07:00
Conrad Irwin 9456f716c2 Only send one right click event 2023-11-16 15:30:53 -07:00
Conrad Irwin 267e07472d Checkpoint, MenuHandle can open one 2023-11-16 13:32:19 -07:00
Conrad Irwin d782426491 Dismiss tooltips on click 2023-11-16 10:26:09 -07:00
Conrad Irwin 74afa62a55 Add Overlay component to gpui2 2023-11-15 23:00:36 -07:00
Conrad Irwin 8c14a8fa95 Merge branch 'main' into collab_ui2 2023-11-15 21:04:47 -07:00
Conrad Irwin 0a9fb3978b Enable panel switching 2023-11-15 21:01:00 -07:00
Nathan Sobo 4f09633379 Remove focus_in styling helper 2023-11-15 14:17:49 -07:00
Nathan Sobo c6b374ebc9 Remove initialize method from Element trait 2023-11-15 14:11:19 -07:00
Antonio Scandurra 33a808a49b WIP 2023-11-15 20:41:09 +01:00
Antonio Scandurra 3978d4e872 Show fold indicators (#3334)
Release Notes:

- N/A
2023-11-15 20:10:24 +01:00
Antonio ScandurraandNathan Sobo c225a3e5af Don't use Mutex or Arc now that app state is not Send
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2023-11-15 18:50:34 +01:00
Antonio ScandurraandNathan Sobo 17b8e4a684 Handle clicking folded ranges
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2023-11-15 18:19:26 +01:00
Conrad Irwin 91b54b352b Add command palette tests and simulate_keystrokes 2023-11-14 23:22:51 -07:00
Nathan Sobo 00d8921ae9 Fix click events by notifying when we assign pending_mouse_down 2023-11-14 19:22:41 -07:00
Mikayla 7f72df6dcf Merge branch 'main' into element-types 2023-11-14 15:49:10 -08:00
Conrad Irwin 1109cd11c8 Abandon ship 2023-11-14 16:17:24 -07:00
Conrad Irwin b69b5742ed Fix panicking unwrap() 2023-11-14 11:27:52 -07:00
Nathan Sobo bb584cc7c4 WIP 2023-11-14 11:00:52 -07:00
Nathan Sobo e08f1690b3 Remove commented field 2023-11-14 09:33:28 -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
Nathan Sobo ce30a689a0 Checkpoint 2023-11-13 23:15:45 -07: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
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