Commit Graph
15037 Commits
Author SHA1 Message Date
Max Brunsfeld 13201a5c0f Use pointer cursor style for clickable ranges in InteractiveText 2023-11-29 12:42:09 -08:00
Max Brunsfeld 41d3616720 Implement SelectionsCollection::select_anchor_ranges 2023-11-29 12:41:22 -08:00
Nate Butler 7657769f27 Style hover popover (#3443)
[[PR Description]]

This PR styles the hover popover, and sets it on the [second elevation
level](https://zed-docs.vercel.app/doc/ui2/trait.StyledExt.html#method.elevation_2).

![CleanShot 2023-11-29 at 14 55
55@2x](https://github.com/zed-industries/zed/assets/1714999/01589b2a-d6e2-4baa-ba5d-050f06cf2c58)


Release Notes:

- N/A
2023-11-29 15:07:46 -05:00
Nate Butler ecf4228443 Style hover popover 2023-11-29 14:56:23 -05:00
Marshall Bowers 8f70f5bce3 Rework Disclosure component (#3442)
This PR reworks the `Disclosure` component.

The primary goal here was to remove the illegal state where a
`Disclosure` is rendered with a `Toggle::NotToggleable` state, as the
`Disclosure` shouldn't exist at all in this case.

Release Notes:

- N/A
2023-11-29 14:46:39 -05:00
Marshall Bowers 48493d1f6a Rework Toggle into Toggleable and ToggleState 2023-11-29 14:33:52 -05:00
Marshall Bowers 9438636415 Rework Disclosure component 2023-11-29 14:07:48 -05:00
Marshall Bowers 895647a0cc Reorganize list components (#3440)
This PR reorganizes the list components so that each of the sub
components lives in its own file.

### Motivation

I've seen a number of folks have trouble finding the `ListItem`
definition while pairing, so having it in its own file seems more
self-explanatory.

Release Notes:

- N/A
2023-11-29 13:45:59 -05:00
Marshall Bowers 51e94393ea Remove unnecessary constructor and Clone derives 2023-11-29 13:38:05 -05:00
Marshall Bowers bf04532715 Reorganize list components 2023-11-29 13:34:50 -05:00
Max Brunsfeld e43284ae8a Add a context menu to the project panel (#3393)
This PR adds a context menu to the project panel in Zed2.

* [x] Allow the context menu to extend outside of the project panel's
bounds
* [x] Add keyboard shortcuts to the context menu
* [x] Dismiss the context menu
    * [x] when running an action
    * [x] when changing selection in the project panel

Release Notes:

NA
2023-11-29 10:04:41 -08:00
Marshall Bowers a449e90498 Add Disableable trait (#3439)
This PR adds a new `Disableable` trait to use for elements that are
capable of being disabled.

Release Notes:

- N/A
2023-11-29 13:01:26 -05:00
Max Brunsfeld 0d3b09ea8d Merge branch 'main' into project-panel-context-menu 2023-11-29 09:45:31 -08:00
Conrad Irwin 312ad76d97 Move padding on uniform list inside the scrollable area (#3437)
Release Notes:

- N/A
2023-11-29 10:43:04 -07:00
Max BrunsfeldandConrad d018e9c0db Make DismissEvent a unit struct
Co-authored-by: Conrad <conrad@zed.dev>
2023-11-29 09:42:54 -08:00
Marshall Bowers 7d40150cbf Remove unneeded wrapping divs in ListItem left content (#3438)
This PR removes some unneeded wrapping `div`s around the left content in
`ListItem`s.

Release Notes:

- N/A
2023-11-29 12:40:35 -05:00
Max BrunsfeldandConrad 9a733dedd7 Add keyboard control over context menus
Co-authored-by: Conrad <conrad@zed.dev>
2023-11-29 09:39:20 -08:00
Marshall Bowers 426d457c80 Remove unneeded .clones 2023-11-29 12:35:39 -05:00
Marshall Bowers b0a9686c6c Remove unneeded wrapping divs in ListItem left content 2023-11-29 12:29:48 -05:00
Nate ButlerandMarshall Bowers dfb60c6d1d Button2 – Part1 (#3420)
## TODO

- [x] Remove `InteractionState`
- [ ] `Selectable` should use `Selection` instead of a boolean
- [x] Clean out ui2 prelude
- [ ] Build out button2 button types
- [ ] Port old buttons

Release Notes:

- N/A

---------

Co-authored-by: Marshall Bowers <1486634+maxdeviant@users.noreply.github.com>
2023-11-29 12:23:09 -05:00
Conrad Irwin bfc31aa692 Move padding on uniform list inside the scrollable area 2023-11-29 10:05:31 -07:00
Conrad Irwin dbd826405e Inviting/Responding/Creating Channels... etc. (#3433)
Release Notes:

- n/a
2023-11-29 09:29:25 -07:00
Joseph T. Lyons 99ff94db62 v0.116.x dev 2023-11-29 11:08:32 -05:00
Kirill Bulatov a8a8ebd12d Make prettier more robust to offline work and errors (#3434)
Refactors prettier support:

* moves away prettier-related code into a separate module, makes
prettier installation & start phases more type-restricted
* ensures prettier installation and start attempts are capped with a
fixed attempts amount: after it's exceeded, no further attempts to
install and/or start prettier area made
* improves default prettier management, by correctly preserving its
plugin set between (re) installations and always installing the prettier
server part
* slightly improves prettier logging 

Release Notes:

- N/A
2023-11-29 14:02:31 +02:00
Kirill Bulatov 5de10092a8 Log prettier installation start & success 2023-11-29 13:44:19 +02:00
Kirill Bulatov 9dd5a5a249 Fix the tests 2023-11-29 12:10:41 +02:00
Kirill Bulatov c65b9272c1 Port to gpui2 2023-11-29 11:52:26 +02:00
Kirill Bulatov c48e72db4c Style fixes 2023-11-29 11:33:29 +02:00
Kirill Bulatov 5fe4027db7 Simplify default prettier installation function 2023-11-29 10:58:22 +02:00
Kirill Bulatov 33d9b2de06 Clear failed installation task when error threshold gets exceeded 2023-11-29 10:58:22 +02:00
Kirill Bulatov 89224f18dd Properly determine default prettier plugins to install 2023-11-29 10:58:22 +02:00
Kirill Bulatov 92ef346b08 Properly increment installation attempts 2023-11-29 10:58:22 +02:00
Kirill Bulatov 0045a11847 Ignore initialized LSP request in prettier wrapper 2023-11-29 10:58:22 +02:00
Kirill Bulatov 0ffa9494e3 Always install default prettier 2023-11-29 10:58:22 +02:00
Kirill Bulatov 485cb153c9 Do not attempt to run default prettier if it's not installed yet 2023-11-29 10:58:22 +02:00
Kirill Bulatov b41312e584 Always write prettier server file 2023-11-29 10:58:22 +02:00
Kirill Bulatov f10d658e95 Split prettier code off to a separate module 2023-11-29 10:58:22 +02:00
Kirill Bulatov 98c44570ee Limit prettier installation and start attempts 2023-11-29 10:58:22 +02:00
Kirill Bulatov 9ec39fc4fa Use enum variants for prettier installation and startup phases 2023-11-29 10:58:22 +02:00
Kirill Bulatov 0abf3269e4 Exctract the common code 2023-11-29 10:58:22 +02:00
Conrad Irwin efd1bc5be0 Inviting/Responding/Creating Channels... etc. 2023-11-28 22:47:04 -07:00
Conrad Irwin 5cfefd7d39 use the right click event for buttons (#3432)
Previously we used mouse down

Release Notes:

- N/A
2023-11-28 21:27:42 -07:00
Conrad Irwin d21311b5bc use the right click event for buttons 2023-11-28 21:14:48 -07:00
Marshall Bowers 9bdfd34961 Remove ID hack in ListItem (#3431)
This PR removes the ID hack in `ListItem`, since the underlying issue
was fixed in #3430.

Release Notes:

- N/A
2023-11-28 23:11:29 -05:00
Conrad Irwin 15e353b291 Fix stateful elements in Components (#3430)
No more wrapper divs for buttons

Release Notes:

- N/A
2023-11-28 20:59:58 -07:00
Conrad Irwin c68936fda8 Remove useless method
We need to move state from layout to paint in any case
2023-11-28 20:53:46 -07:00
Conrad Irwin 816425c971 Fix stateful elements in Components
Previously a component assumed its element was stateless, this was
incorrect!
2023-11-28 20:47:11 -07:00
Max BrunsfeldandMarshall 621bb446e2 Right-align key bindings in context menus
Remove extra div in `List` that prevented list items from
filling the available space.

Co-authored-by: Marshall <marshall@zed.dev>
2023-11-28 17:23:49 -08:00
Mikayla Maki f727523d4a Restore welcome page (#3429)
Also restores the theme selector and base keymap selector. This does not
include a UI port.

Release Notes:

- N/A
2023-11-28 16:34:41 -08:00
Max Brunsfeld 8990ccbc48 Show action key bindings in context menus 2023-11-28 16:07:42 -08:00