Commit Graph
15817 Commits
Author SHA1 Message Date
Joseph T. Lyons e4db2e1145 Add notes 2023-12-15 17:18:52 -05:00
Joseph T. Lyons 8f26c2770a Tweak wording 2023-12-15 01:47:59 -05:00
Joseph T. Lyons 8f4b904dba Add some TODOs 2023-12-14 16:10:53 -05:00
Joseph T. Lyons ee35d2ecc6 Tweak wording 2023-12-14 16:04:53 -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
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
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 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
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
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
Mikayla 8b9240cb84 Remove inconsistency with how GPUI used to handle these events 2023-12-13 18:32:42 -08:00
Mikayla 626ed06f86 Merge branch 'main' into fix-splits-bugs 2023-12-13 18:29:48 -08:00
Joseph T. Lyons 01f4d7bcef Use an enum to represent modal states and simplify logic 2023-12-13 21:20:09 -05:00
Joseph T. Lyons fb22f04409 Add Duration dependency 2023-12-13 21:19:36 -05:00
Mikayla 83407107df add cmd-click-to-jump-to-element 2023-12-13 18:19:25 -08:00
Joseph T. Lyons 9d9205ca8d Use existing convention to silence warnings 2023-12-13 21:19:12 -05:00
Joseph T. Lyons 70fbe2b02c Simulate sending feedback in dev 2023-12-13 21:18:50 -05:00
Marshall Bowers c923ff8f4d 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 5231b412ef 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 45a30238e9 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
Max Brunsfeld cc4e0b2fa1 Allowing dragging tabs onto panes and pane edges (#3641) 2023-12-13 17:23:43 -08:00
Max Brunsfeld dc210610b8 Clone item when dragging to split 2023-12-13 17:16:00 -08:00
Max Brunsfeld d6542feb14 Ensure only top layer is styled with drag over style 2023-12-13 17:07:23 -08:00
Max Brunsfeld 8b9080cbb2 Start work on allowing dragging tabs onto panes and pane edges 2023-12-13 17:06:42 -08:00
Mikayla 14ef7fbb55 Add interactive debug info 2023-12-13 17:03:56 -08:00
Mikayla 15c01277af Add debug and debug below methods for observing the bounds of divs 2023-12-13 16:47:55 -08:00
Mikayla 992828bacb Tidy up workspace resizing 2023-12-13 16:35:25 -08:00
Marshall Bowers 9d2708c71e 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
92b959fc4e 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
Mikayla 33a127bd78 Fix dock split resizin 2023-12-13 15:14:51 -08:00
Joseph T. Lyons 9659a57292 Fix variable name 2023-12-13 17:31:51 -05:00
Marshall Bowers 3c3c733898 Add config files for running Postgres inside Docker Compose (#3637)
This PR adds config files for running the Postgres instance for local
Zed development in a Docker Compose instance.

For those of us who don't like to have a Postgres install always present
on the host system 😄

Usage:

```
docker compose up -d
```

Release Notes:

- N/A
2023-12-13 17:25:07 -05:00
Joseph T. Lyons e9cdc16b4c Remove TODO
Thanks @ConradIrwin
2023-12-13 17:09:26 -05:00
Mikayla f87a8c5565 Add new drag API 2023-12-13 13:40:19 -08:00
Mikayla de754ed76f Add fluent quad API 2023-12-13 13:21:48 -08:00