The project panel now both observes all the project updates and
subscribes to project events it's interested in. The observing handler
updates the list of visible entries on any notification, which looks
pretty excessive.
This PR removes the observer completely, and adds missing event handlers
to the subscription, thus removing unnecessary work.
Release Notes:
- N/A
Fixes: #8050
For some reason that we didn't investigate, if you have view caching
enabled,
and you have non-integer sized bounds, and you are right aligning
things, the
co-ordinates can differ by +/- 1px when using the cached view.
The easiest fix for now is to just not do that.
Co-Authored-By: Antonio <as-cii@zed.dev>
Release Notes:
- Fixed the pane icons flickering
([#8050](https://github.com/zed-industries/zed/issues/8050)).
Co-authored-by: Antonio <as-cii@zed.dev>
Previously, if you had the following files/folders in your project
1-abc
10
11-def
...
2
21-abc
that's how we'd display them.
With this change, we now try to parse them as numbers, if possible, and
use that to sort. If we can't parse a component as a number, we fall
back to normal string comparison.
End result is this:
1-abc
2
10
11-def
...
21-abc
Release Notes:
- Fixed filenames with numeric components (`1.txt`, `1/one.txt`, ...)
not being sorted as numbers, but as string.
Before:
![screenshot-2024-02-27-18 29
43@2x](https://github.com/zed-industries/zed/assets/1185253/2d223126-329f-4ae7-9a12-d33e2c3fe52f)
After:
![after](https://github.com/zed-industries/zed/assets/1185253/f4f98fa0-e66f-40aa-aa28-189143cbb75f)
---------
Co-authored-by: Marshall <marshall@zed.dev>
This fixes#7314 and #7778.
The problem was copying a folder into itself, which is actually quite a
common operation in macOS's `Finder.app`: you select a folder, hit
`cmd-c` and `cmd-v` and have a copy. That's also how it works in VS
Code.
The fix here is to detect when we're copying a folder into itself and
treating it like we're copying a file into itself: we don't want to copy
into the target, we want to copy into the folder one level higher up,
which will then automatically add a ` copy` to the end of the name.
Release Notes:
- Fixed ability to copy folders into themselves by selecting them in
project panel and hitting `copy` and `paste`. Instead of endless
recursion, a copy of the folder is now created.
([#7314](https://github.com/zed-industries/zed/issues/7314)).
Demo:
https://github.com/zed-industries/zed/assets/1185253/2141310a-991d-491d-8498-eb766275a1f5
Reverts zed-industries/zed#7674
@ABckh: reverting this as it introduced a significant performance
slowdown, most likely caused by iterating through all the snapshot
entries to determine whether a directory is foldable/unfoldable/omitted.
It would be great if you could open a new PR that reverts this revert
and addresses the performance issues. Thank you!
/cc: @maxbrunsfeld
Release notes:
- N/A
Added support of auto collapsed directories, for example when directory
has only one directory inside we should display it as dir1/dir2 (#6935
). Please feel free to propose better solutions, as I am new in Rust
Demo:
https://streamable.com/seo3n9
Release Notes:
- Added support for auto-collapsing directories.
Reverts zed-industries/zed#7481
This would regress performance because we'd be using the standard
library's hash maps everywhere, so reverting for now.
Fixes#7003 and #7005.
Selecting as a reaction to actually opening a new item doesn’t seem
robust in all cases, the PR improves that.
Release Notes:
- Fixed missing project panel file selection in certain cases
- Disallow sharing gitignored files through collab
- Show errors when failing to open files
- Show a warning to followers when view is unshared
/cc @mikaylamaki, let's update this to use your `private_files` config
before merge.
Release Notes:
- Added the ability to prevent sharing private files over collab.
---------
Co-authored-by: Piotr <piotr@zed.dev>
Co-authored-by: Mikayla <mikayla@zed.dev>
Release Notes:
- Added bash syntax highlighting to `.env` files.
- Added a `private_files` setting for configuring which files should be
considered to contain environment variables or other sensitive
information.
- Added a `redact_private_values` setting to add or remove censor bars
over variable values in files matching the `private_files` patterns.
-(internal) added a new `redactions.scm` query to our language support,
allowing different config file formats to indicate where environment
variable values can be identified in the syntax tree, added this query
to `bash`, `json`, `toml`, and `yaml` files.
---------
Co-authored-by: Nathan <nathan@zed.dev>
This PR sorts the dependency lists in our `Cargo.toml` files so that
they are in alphabetical order.
This should make them easier to visually scan when looking for a
dependency.
Apologies in advance for any merge conflicts 🙈
Release Notes:
- N/A
This should prevent a class of bugs where one queries the wrong type of
global, which results in oddities at runtime.
Release Notes:
- N/A
---------
Co-authored-by: Marshall <marshall@zed.dev>
Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
#6910
I changed the `open_file` symbol to `open`, because this is more
consistent with the original intention
Release Notes:
- Added the ability to expand/collapse directories using the
`project_panel::Open` action.
- [x] Fill in GPL license text.
- [x] live_kit_client depends on live_kit_server as non-dev dependency,
even though it seems to only be used for tests. Is that an issue?
Release Notes:
- N/A
Adding the typos crate to our CI will take some doing, as we have
several tests which rely on typos in various ways (e.g. checking state
as the user types), but I thought I'd take a first stab at fixing what
it finds.
Release Notes:
- N/A
A sequence of events: Launch Zed -> Quit Zed -> Launch Zed would leave
you with a project panel in a a different state on each open (e.g. if it
is open on 1st one, 2nd run will have it closed). We were essentially
not tracking whether the deserialization took place.
Release Notes:
- Fixed project panel being toggled on/off on startup due to incorrect
tracking of serialization state (solves
https://github.com/zed-industries/community/issues/2406)
This PR renames the `h_stack` and `v_stack` to `h_flex` and `v_flex`,
respectively.
We were previously using `h_stack` and `v_stack` to match SwiftUI, but
`h_flex` and `v_flex` fit better with the web/flexbox terminology that
the rest of GPUI uses.
Additionally, we were already calling the utility functions used to
implement `h_stack` and `v_stack` by the new names.
Release Notes:
- N/A
- Update chat panel with current channel
- Open chat panel for guests
- Open chat when joining a channel with guests
- Some tweaks for chat panels
- Don't lose focus on default panel state
- Make chat prettier (to my eyes at least)
- Fix multiple mentions in one message
- Show a border when scrolled in chat
- Fix re-docking chat panel
- Move settings subscription to dock
[[PR Description]]
Release Notes:
- Opens chat by default when joining a public channel
- Improves chat panel UI
This PR renames the `IconElement` component to just `Icon`.
This better matches the rest of our components, as `IconElement` was the
only one using this naming convention.
The `Icon` enum has been renamed to `IconName` to free up the name.
I was trying to come up with a way that would allow rendering an
`Icon::Zed` directly (and thus make the `IconElement` a hidden part of
the API), but I couldn't come up with a way to do this cleanly.
Release Notes:
- N/A
This PR fixes an issue where right-click on any project panel entry
would cause the context menu on the root of the project panel
(introduced in #3954) to deploy.
We need to stop propagation in the handler on the inner project panel
list items so that the click event doesn't bubble up the tree.
Release Notes:
- Fixed an issue where the project panel was always deploying the root
context menu rather than on the clicked item.