Commit Graph
25009 Commits
Author SHA1 Message Date
Max Brunsfeld b74fe577a3 Enable all warnings in workspace, fix all warnings (#3660) 2023-12-14 14:38:28 -08:00
Nate Butler 6bc0c9489a Use updated story container in Text story 2023-12-14 17:38:22 -05:00
Marshall Bowers 3fbef5ff2c Use editor_foreground color in editor 2023-12-14 17:34:07 -05:00
Marshall Bowers 7025944542 Use editor.foreground from VS Code for the editor foreground 2023-12-14 17:30:37 -05:00
Marshall Bowers 5ea31591a7 Emit editor_foreground color from theme converter 2023-12-14 17:28:45 -05:00
Max BrunsfeldandConrad 7813052622 Fix bug in Workspace::activate_pane_in_direction
Co-authored-by: Conrad <conrad@zed.dev>
2023-12-14 14:27:44 -08:00
Joseph T. Lyons aab0bdebc1 Use bitflags to hold error states 2023-12-14 17:22:13 -05:00
Max Brunsfeld da00f99421 Re-enable cmd-<number> key bindings for activating panes (#3659) 2023-12-14 14:16:43 -08:00
Max BrunsfeldandConrad c1ab213af1 Enable all warnings in workspace, fix all warnings
Bring back some workspace tests

Co-authored-by: Conrad <conrad@zed.dev>
2023-12-14 14:15:56 -08:00
Nathan Sobo 336acd490e Don't move in paint 2023-12-14 15:15:18 -07:00
Julia aecb8f68c9 Render panel in this test to make sure it can receive focus 2023-12-14 17:11:00 -05:00
Nate Butler 543d1b5783 Continue styling new story components 2023-12-14 16:52:05 -05:00
Max Brunsfeld 52588a4420 Enable dragging from project panel to panes (#3658)
Rework gpui2 drag API so that receivers need not specify the dragged
view type.
2023-12-14 13:32:40 -08:00
Max BrunsfeldandConrad 19c4494dd5 Re-enable cmd-<number> key bindings for activating panes
co-authored-by: Conrad <conrad@zed.dev>
2023-12-14 13:30:11 -08:00
9079d8dcf4 Enable dragging from project panel to panes
Rework gpui2 drag API so that receivers need not specify the dragged view type.

co-authored-by: Max <max@zed.dev>
co-authored-by: Conrad <conrad@zed.dev>
2023-12-14 13:20:48 -08:00
Nathan Sobo a559127e63 Merge remote-tracking branch 'origin/main' into perf-2 2023-12-14 14:16:59 -07:00
Joseph T. Lyons 8f4b904dba Add some TODOs 2023-12-14 16:10:53 -05:00
Marshall Bowers 951d389568 Style "Replace in project" input in project search (#3657)
This PR styles the "Replace in project" input in the project search.

Release Notes:

- N/A
2023-12-14 16:10:22 -05:00
Nathan Sobo 0c25758ea9 Use FxHashMap for element state 2023-12-14 14:06:19 -07:00
Joseph T. Lyons ee35d2ecc6 Tweak wording 2023-12-14 16:04:53 -05:00
Marshall Bowers 04d11a80cc Style "Replace in project" input 2023-12-14 15:58:17 -05:00
Marshall Bowers ce285cafbc Fix toolbar flex sizing 2023-12-14 15:57:06 -05:00
Nate ButlerandMarshall Bowers 7ad611839c Extend Story components, allow linking to story file
Co-Authored-By: Marshall Bowers <1486634+maxdeviant@users.noreply.github.com>
2023-12-14 15:55:17 -05:00
Joseph T. Lyons 6d47bfe8c8 Add contributing guide 2023-12-14 15:54:31 -05:00
Conrad Irwin 9325b9f1e9 Ignore invisible layers for mouse events (#3651)
Fixes clicking in the top/bottom 100px of the editor


Release Notes:

- N/A
2023-12-14 12:01:45 -07:00
Marshall Bowers 41f2bd006c Style inputs in project search (#3655)
This PR styles the inputs in the project search.

<img width="772" alt="Screenshot 2023-12-14 at 1 53 28 PM"
src="https://github.com/zed-industries/zed/assets/1486634/fe2362be-79db-4551-a473-2acf7a8a1bcb">

Release Notes:

- N/A
2023-12-14 13:58:11 -05:00
Nathan Sobo 1df02f29e6 Make z_indices bigger in StackingOrder 2023-12-14 11:37:48 -07:00
Nathan Sobo 0d91972947 Don't allocate interactive bounds 2023-12-14 11:28:52 -07:00
Joseph T. Lyons bb32f705a4 Prep feedback code for testing 2023-12-14 13:22:41 -05:00
Marshall Bowers 7e09a21bd6 Hide the toolbar if it has no visible items (#3654)
This PR makes the toolbar hide itself if it has no visible items.

This removes the double border beneath the tab bar when there are no
visible tools in the toolbar.

Release Notes:

- N/A
2023-12-14 13:02:27 -05:00
Conrad Irwin 1640668f61 Refactor editor to be more clear about stacking 2023-12-14 10:48:15 -07:00
Conrad Irwin da8b21382b Fix z-indexes in editor element
* Ensure that scroll events from blocks scroll the editor
* Ensure that scroll bars show behind hover things
2023-12-14 10:36:16 -07:00
Nathan Sobo bb72cc1126 WIP 2023-12-14 10:31:45 -07:00
Marshall Bowers 329321ee6e Improve storybook story selection (#3653)
This PR builds on top of #3652 by adding a selection prompt to the
storybook to allow you to choose from the available list of stories if
you don't provide one explicitly:

<img width="1387" alt="Screenshot 2023-12-14 at 12 00 26 PM"
src="https://github.com/zed-industries/zed/assets/1486634/640d62a3-1340-45f1-9746-69b513faff62">

This way we don't have to keep generating the `script/storybook` script
whenever stories are added/removed.

#### Usage (through `cargo`):

```sh
# Select from the available stories
cargo run -p storybook2

# Run a specific story
cargo run -p storybook2 -- components/list_item
```

#### Usage (through `script/storybook`):

```sh
# Select from the available stories
./script/storybook

# Run a specific story
./script/storybook list_item
```

Release Notes:

- N/A
2023-12-14 12:13:02 -05:00
Conrad Irwin 900c14a5e7 Robustify checks for visibility 2023-12-14 10:02:54 -07:00
Nate Butler 21a5e19892 Fix typo 2023-12-14 11:59:24 -05:00
Nate Butler 122f1f1b24 Generate script/storybook (#3652)
[[PR Description]]

This PR adds the ability to run stories with `script/storybook`.

Running it directly will give you a selector like this:

```zsh
➜  zed git:(add-storybook-script) script/storybook
1) auto_height_editor	 9) icon		17) scroll
2) avatar		10) icon_button		18) tab
3) button		11) keybinding		19) tab_bar
4) checkbox		12) label		20) text
5) context_menu		13) list		21) viewport_units
6) cursor		14) list_header		22) z_index
7) disclosure		15) list_item		23) picker
8) focus		16) overflow_scroll
```

You can also provide a value like:

`script/storybook {STORY_NAME}` - Example: `script/storybook text`

OR 

`script/storybook components/{STORY_NAME}` - Example: `script/storybook
components/text`

I just wanted an easier way to interface with stories quickly to make
using them a bit easier, and enable discovery of what exists easier with
the selector.

This was a really quick hack, in the future we can extend this to a
proper CLI.

Release Notes:

- N/A
2023-12-14 11:52:06 -05:00
Conrad Irwin e8aaf66353 Ignore invisible layers for mouse events 2023-12-14 09:44:04 -07:00
Nate Butler 1cffa6505b Generate script/storybook 2023-12-14 11:42:08 -05:00
Nathan Sobo e7708384d5 WIP 2023-12-14 09:25:14 -07:00
Piotr Osiewicz a750f309e0 calls: Fix off by one in prompts for leaving a call. (#3649)
We've noticed how leaving a call with multiple windows open would still
prompt with the popup along the lines of "Do you want to leave the
current call?". In Zed1, that popup only showed up when you've had just
one window open.

The code for prompting did not change at all between zed1 and zed2, but
the way we calculate the window count did. Calling AppContext::windows
to get all window handles from WindowContext::update essentially
excluded the window we were updating (that is the window being closed)
from the returned Vec of window handles. I've decided to keep the code
as close to original as possible (as the alternative would be to change
the \# of workspaces needed for a prompt to pop up). We now query the
window handles via a deref to AsyncAppContext, which does not exclude
"our" window handle from the returned results.

Release Notes:

- N/A
2023-12-14 15:35:31 +01:00
Piotr Osiewicz 4cdf2eb939 Vcs menu2 (#3648)
Header and footer are gonna be added in a separate PR as they require
changes to Picker trait that I feel are separate from the contents of
this PR.

Release Notes:

- N/A
2023-12-14 12:36:53 +01:00
Kirill Bulatov 9fd57e4dde Return include warnings toggle to the diagnostics panel 2023-12-14 10:00:31 +02:00
Marshall Bowers dc46d0c0a6 Change project search bar flex axis to column (#3647)
This PR changes project search bar's flex axis to `column`.

This fixes an issue where toggling the filters would cause the search
controls to center themselves vertically instead of staying next to the
search input.

Release Notes:

- N/A
2023-12-13 23:02:49 -05:00
Julia d2a9f95a11 Quick and dirty attempt to immediately apply focus change in tests
Doesn't quite work yet
2023-12-13 21:48:05 -05:00
Joseph T. Lyons 44a3fd0cc7 Avoid unnecessary match 2023-12-13 21:43:21 -05:00
Mikayla Maki b3510e24b0 Fix bugs in resizing the docks + Add debug styling (#3645)
This PR:
- Fixes several bugs with dock resizing
- Adds a new drag move API for resizes 
- Adds special debug styling for elements, including auto-opening Zed at
the element's location in source
- Changes the `cx.paint_quad()` API to take a type and adds several
helpers to create this type.
- Adds `()` as the empty element, and uses it to implement a derive
macro for the `Render` trait.

Release Notes:

- N/A
2023-12-13 18:40:28 -08:00
Joseph T. Lyons a9573de153 Highlight email address field as red when invalid 2023-12-13 21:39:31 -05:00
Joseph T. Lyons 80473a44b8 Remove completed TODOs 2023-12-13 21:35:30 -05:00
Joseph T. Lyons 661b06ca61 Feedback modal improvements (#3646)
- Cleans up modal state logic by using an enum over multiple booleans
- Simulates sending feedback in dev mode, so UI can be easily tested

Release Notes:

- N/A
2023-12-13 21:33:45 -05:00