Commit Graph
146 Commits
Author SHA1 Message Date
Conrad Irwin ca0dcf741f Use layers to correct mouse event handling too 2023-11-28 00:07:26 -07:00
Conrad Irwin 17b5f9294c Fix hover state when element is occluded 2023-11-27 23:18:25 -07:00
Marshall Bowers 24f3034106 Add ListItem story (#3411)
This PR adds a story for the `ListItem` component, so we can work on it
in isolation.

Release Notes:

- N/A
2023-11-27 15:24:41 -05:00
Conrad Irwin 4f885252ab [Zed2] Collab UI (#3403)
Release Notes:

- N/A
2023-11-27 12:40:59 -07:00
Marshall Bowers feb7753a73 Fix typo in uniform_list's doc comment 2023-11-27 14:20:27 -05:00
Conrad Irwin 7a8aba329b Break content mask for hoverables 2023-11-27 11:43:14 -07:00
Antonio Scandurra 682712f132 Account for previous line lengths when returning index 2023-11-24 18:32:48 +01:00
Antonio Scandurra 56d043f671 Allow finding which ranges were clicked on an InteractiveText 2023-11-23 18:08:49 +01:00
Piotr Osiewicz 390ecb5b0c Merge branch 'main' into collab_ui-zed2 2023-11-23 15:02:55 +01:00
Piotr Osiewicz c191943849 Add basic call/user UI in top-right corner.
Allow ui::Avatar to take custom data instead of always relying on URI resolution
2023-11-23 15:00:13 +01:00
Antonio Scandurra 3b918bfee8 Merge branch 'main' into rename-element-traits
# Conflicts:
#	crates/gpui2/src/elements/uniform_list.rs
#	crates/ui2/src/components/context_menu.rs
#	crates/ui2/src/components/list.rs
2023-11-23 12:47:46 +01:00
Nathan Sobo c23f17ee0b Reorganize element-related traits 2023-11-22 11:19:43 -07:00
Antonio Scandurra eaf90a4fbd Fix drawing uniform list elements when scrolling 2023-11-22 18:32:02 +01:00
Antonio Scandurra bd4a710cef Use interactivity's base style for UniformList 2023-11-22 17:50:34 +01:00
Antonio Scandurra 2b6e8de11f Don't perform wrapping in completions 2023-11-22 14:23:09 +01:00
Antonio Scandurra fff2d7955e Round up line width 2023-11-22 14:01:22 +01:00
Antonio Scandurra 3a8e9b5697 Avoid holding borrow to editor while painting child elements 2023-11-22 11:40:38 +01:00
2c4d83c9af WIP
co-authored-by: conrad <conrad@zed.dev>
co-authored-by: Nathan <nathan@zed.dev>
2023-11-20 14:46:01 -08:00
Mikayla 6985b70859 fix gpui2 2023-11-20 11:55:27 -08:00
Conrad Irwin 25ed7c57c1 WIP 2023-11-20 12:34:08 -07:00
Conrad Irwin d0dd44faad Merge branch 'main' into callback-handles 2023-11-20 12:21:42 -07: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
Mikayla 88024ca7c9 Remove V parameter on elements 2023-11-19 18:32:31 -08:00
Conrad Irwin c0d85dc1dd Fix text wrapping when a child of a v_stack() (#3362)
Previously text that was rendered in a flex-column would reserve the
correct
amount of space during layout, and then paint itself incorrectly.

Release Notes:

- N/A
2023-11-19 11:37:31 -07:00
Conrad Irwin 0711121586 Add some test cases 2023-11-18 22:16:28 -07:00
Nathan Sobo 33cd6f520a Clean compile with redesigned element traits 2023-11-18 21:51:47 -07:00
Conrad Irwin cf47ed2c5f Fix wrapping when parent has a max_width
(Also avoid re-wrapping text we already wrapped)
2023-11-18 21:31:16 -07:00
Conrad Irwin 7172ce37b1 Fix text wrapping when a child of a v_stack() 2023-11-18 20:35:22 -07:00
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