Commit Graph

623 Commits

Author SHA1 Message Date
Kirill Bulatov
331af82cb1 Rework context menu's custom element API to handle clicks properly 2023-12-20 18:23:09 +02:00
Kirill Bulatov
19d1568140 Lsp log selector fixes 2023-12-20 18:23:09 +02:00
Kirill Bulatov
fe40e3920b Fix remaining z-index bugs
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-12-20 18:23:09 +02:00
Kirill Bulatov
1474816a93 Syntax tree panel style fixes 2023-12-20 18:23:08 +02:00
Kirill Bulatov
6a90a76bf2 Use stock gpui2 ui components 2023-12-20 18:23:08 +02:00
Kirill Bulatov
acbb3f39f6
Better display items from different sources with different z-indices in the same place (#3723) 2023-12-20 00:01:37 +02:00
Kirill Bulatov
cf12d62fc5 Tidy up z-index handling
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-12-19 23:50:42 +02:00
Marshall Bowers
097640e7c5
Fix typo in ButtonCommon doc comment (#3722)
This PR fixes a small typo in the doc comments for `ButtonCommon`.

Was waiting to roll this up into another PR, but it never ended up
happening.

Release Notes:

- N/A
2023-12-19 16:32:57 -05:00
Kirill Bulatov
8f1c5375ef Fix more z-index and rendering issues
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-12-19 23:30:17 +02:00
Kirill Bulatov
825a8f0927 Initial fix of the z-index
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2023-12-19 23:29:08 +02:00
Max Brunsfeld
1c3698ae20 Implement channel modal
Co-authored-by: Nathan <nathan@zed.dev>
2023-12-19 12:02:35 -08:00
Nate Butler
a1085184a1 use to_string to return the format distance string from FormatDistance 2023-12-19 11:57:57 -05:00
Nate Butler
d8a8feb45c Add FormatDistance struct, add hide_prefix option 2023-12-19 11:41:14 -05:00
Nate Butler
79653d2175 Rename format distance test names 2023-12-19 11:19:18 -05:00
Nate Butler
ae313ff830 Allow format_distance to take a DateTimeType 2023-12-19 11:16:59 -05:00
Nate Butler
30b01b9bc0 Update imports, tab height const 2023-12-19 11:03:08 -05:00
Nate Butler
286f654517 Update assistant header 2023-12-19 10:57:36 -05:00
Nate Butler
57efaa92cf Style assistant header, update icons 2023-12-19 10:30:46 -05:00
Antonio Scandurra
afbc61a344 Prevent default when mousing down on a button that responds to clicks
This ensures that ancestors that track focus don't accidentally steal
it on mouse down, which was preventing the editor from deploying the
code actions menu.
2023-12-19 14:27:19 +01:00
Antonio Scandurra
02e53025f3 Track caller on h_stack and v_stack 2023-12-19 14:26:30 +01:00
Marshall Bowers
734bbfa66f
Use status colors for contact availability indicators (#3704)
This PR updates the availability indicators in the contact list to use
the status colors from the theme.

Release Notes:

- N/A
2023-12-18 16:56:44 -05:00
Marshall Bowers
9785481aba
Make Disclosure accept an ID (#3701)
This PR makes the `Disclosure` component accept an ID rather than using
a static ID for all disclosures.

Release Notes:

- N/A
2023-12-18 15:21:04 -05:00
Marshall Bowers
0aa690f915
Always show channel toggle when collapsed (#3698)
This PR makes the channel toggle disclosure always visible when a
channel tree is collapsed, as opposed to just being visible on hover.

This makes it possible to visually identify collapsed channel trees
without having to hover over each entry.

Release Notes:

- N/A
2023-12-18 13:27:47 -05:00
Nate Butler
eeaa1e5cf9 Add github icon 2023-12-18 12:56:57 -05:00
Nate Butler
d72cd3795a Fix implementation of full_width and icon_position in button 2023-12-18 12:56:50 -05:00
Nate Butler
50a44dd8ba Improve tooltip with keybinding styling 2023-12-15 11:07:17 -05:00
Nate Butler
62ea58618c Merge branch 'main' into story-enhancements 2023-12-15 10:26:59 -05:00
Conrad Irwin
7e1d61d116 Merge branch 'main' into user-menu 2023-12-14 20:18:20 -07:00
Nate Butler
e4f9bddbab Remove unused imports 2023-12-14 17:56:42 -05:00
Nate Butler
936c78be94 WIP IconButton story 2023-12-14 17:51:08 -05:00
Nathan Sobo
d13a21c238 Don't move in paint 2023-12-14 15:15:18 -07:00
Nathan Sobo
fb3382bcc5 Merge remote-tracking branch 'origin/main' into perf-2 2023-12-14 14:16:59 -07:00
Nathan Sobo
1ae25f52a1 WIP 2023-12-14 10:31:45 -07:00
Marshall Bowers
ceede28fab
Ensure the outer ListItem element has a unique ID (#3644)
This PR fixes an issue where the outer `ListItem` element was using a
static ID instead of the one provided to the component.

Now that active states are fixed, this meant that any time there were
sibling list items they would share active states if one of them was
clicked.

Release Notes:

- N/A
2023-12-13 21:14:21 -05:00
Marshall Bowers
474f09ca3f
Remove unneeded left-click filtering in ListItem (#3643)
This PR removes the left-click filtering from the `on_click` handler for
`ListItem`s.

It's no longer needed after #3584.

Release Notes:

- N/A
2023-12-13 21:03:50 -05:00
Marshall Bowers
057b235c56
Implement VisibleOnHover for IconButton (#3642)
This PR implements the `VisibleOnHover` trait for `IconButton`s.

I noticed that in a lot of places we were wrapping an `IconButton` in an
extra `div` just so we could call `visible_on_hover` on it. By
implementing the trait on `IconButton` directly it allows us to avoid
the interstitial `div` entirely.

Release Notes:

- N/A
2023-12-13 20:42:27 -05:00
Marshall Bowers
137e4e9251
Add .visible_on_hover helper method (#3639)
This PR adds a `.visible_on_hover` helper method that can be used to
make an element only visible on hover.

I noticed we were repeating this similar stanza in a bunch of different
spots:

```rs
some_element
    .invisible()
    .group_hover("", |style| style.visible())
``` 

so it seemed like a nice thing to factor out into a reusable utility.

Release Notes:

- N/A
2023-12-13 19:12:20 -05:00
Marshall Bowers
d59de96921
Style collab panel (#3638)
This PR styles the collab panel.

Release Notes:

- N/A

---------

Co-authored-by: Nate Butler <iamnbutler@gmail.com>
Co-authored-by: Marshall Bowers <1486634+maxdeviant@users.noreply.github.com>
2023-12-13 18:20:04 -05:00
Conrad Irwin
7899833367 Don't hang the app when signing in offline 2023-12-13 15:52:43 -07:00
Marshall Bowers
ee509e043d
Rework ListItem and ListHeader to use slot-based APIs (#3635)
This PR reworks the `ListItem` and `ListHeader` components to use
slot-based APIs, making them less opinionated about their contents.

Splitting this out of the collab UI styling PR so we can land it to
avoid conflicts.

Co-authored-by: Nate <nate@zed.dev>

Release Notes:

- N/A
2023-12-13 16:08:31 -05:00
Max Brunsfeld
e09b07ddae
Allow dragging tabs (#3616) 2023-12-12 16:20:37 -08:00
Max Brunsfeld
6362221363 Scroll the tab bar to show the active tab
Co-authored-by: Nathan <nathan@zed.dev>
Co-authored-by: Marshall <marshall@zed.dev>
2023-12-12 15:42:33 -08:00
Max Brunsfeld
a579713a45 Allow dragging and dropping tabs
Co-authored-by: Nathan <nathan@zed.dev>
Co-authored-by: Marshall <marshall@zed.dev>
2023-12-12 15:07:03 -08:00
Max Brunsfeld
a4a501603e Start work on dragging tabs 2023-12-12 15:04:49 -08:00
Julia
2e00da5a79
zed2 notification panel (#3603)
Release Notes:

- N/A
2023-12-12 18:04:47 -05:00
Marshall Bowers
e489e2e583
Enable scrolling in tab bar (#3614)
This PR enables scrolling horizontally in the tab bar.

Currently this requires holding down <kbd>Shift</kbd> for the scroll to
activate. We'll need to look into this.

Scrolling also currently works when there is a split in the editor, as
the non-split view goes down a different rendering path that does not
constrain the pane width, which breaks a number of things.

Release Notes:

- N/A
2023-12-12 16:38:25 -05:00
Marshall Bowers
d2feaa41a5
Extract TabBar component (#3613)
This PR extracts a new `TabBar` component from the tab bar
implementation in the workspace.

Release Notes:

- N/A
2023-12-12 15:50:05 -05:00
Julia
fd6320b136 Finish fixing up Avatar using URI 2023-12-12 11:49:04 -05:00
Julia
44d40625fe Start changing Avatar to use URI
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-12-12 11:27:40 -05:00
Kirill Bulatov
ca8e8d1065 Finish removing all dangerous focus APIs 2023-12-12 16:11:14 +02:00