Commit graph

810 commits

Author SHA1 Message Date
Jason Lee
dd3b8b1f3d
theme: Export colors attribute. (#822) 2025-04-30 10:16:35 +08:00
Jason Lee
832f8b8f75
svg_img: Refactor SvgImg to avoid assign source image size and fix drop image error. (#821)
## Break Change

- Removed `source` method from `SvgImg`, now need assign source in `new`
method.
- There is no need to give image size, it will read the size from SVG
file.
2025-04-29 19:25:43 +08:00
dependabot[bot]
9d467ac92b
build(deps): bump gpui from 04c0a54 to c56b5d8 (#819)
Bumps [gpui](https://github.com/huacnlee/zed) from `04c0a54` to
`c56b5d8`.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="c56b5d8099"><code>c56b5d8</code></a>
gpui: Fix VRAM leak caused by drawing large textures and resize
textures</li>
<li><a
href="3862d87e27"><code>3862d87</code></a>
gpui: Fix <code>window_handle</code> method on Linux.</li>
<li><a
href="7675ad9f8f"><code>7675ad9</code></a>
gpui: Fix <code>update_window</code> to <code>borrow_mut</code> will
crash on Windows.</li>
<li><a
href="5e31d86f1f"><code>5e31d86</code></a>
Fix panic in vim selection restoration (<a
href="https://redirect.github.com/huacnlee/zed/issues/29251">#29251</a>)</li>
<li><a
href="4a8f114528"><code>4a8f114</code></a>
Fix panic when collaborating with new multibuffers (<a
href="https://redirect.github.com/huacnlee/zed/issues/29245">#29245</a>)</li>
<li><a
href="ce1a674eba"><code>ce1a674</code></a>
eval: Fine-grained assertions (<a
href="https://redirect.github.com/huacnlee/zed/issues/29246">#29246</a>)</li>
<li><a
href="0d3fe474db"><code>0d3fe47</code></a>
editor: Use quantize score for code completions sort + Add code
completions t...</li>
<li><a
href="6a009b447a"><code>6a009b4</code></a>
debugger: Open debugger panel on session startup (<a
href="https://redirect.github.com/huacnlee/zed/issues/29186">#29186</a>)</li>
<li><a
href="75ab8ff9a1"><code>75ab8ff</code></a>
zlog: Add default filters (<a
href="https://redirect.github.com/huacnlee/zed/issues/29244">#29244</a>)</li>
<li><a
href="3705986fac"><code>3705986</code></a>
Adjust image cache APIs to enable ElementState based APIs (<a
href="https://redirect.github.com/huacnlee/zed/issues/29243">#29243</a>)</li>
<li>Additional commits viewable in <a
href="04c0a545a7...c56b5d8099">compare
view</a></li>
</ul>
</details>
<br />


Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-28 23:25:16 +08:00
Sunli
dc776224f9
svg_img: Fix memory leak in SvgImg (#818) 2025-04-28 14:42:37 +08:00
Floyd Wang
547c9c1827
gallery: Fix the error active panel display with search keywords (#817)
## Before

https://github.com/user-attachments/assets/25b925e5-c0f3-42b0-97f3-190fb738a10a

## After

https://github.com/user-attachments/assets/2d6e2b23-f3e2-45fd-a58c-69f31d0646a8
2025-04-25 19:06:39 +08:00
Ylin
f946560837
dropdown: Add display_title to DropdownItem to support custom title to dropdown input. (#816)
Co-authored-by: Jason Lee <huacnlee@gmail.com>
2025-04-25 19:05:24 +08:00
Jason Lee
9085879795
gallery: Add DatePicker and Calendar. (#815) 2025-04-25 16:05:47 +08:00
Jason Lee
a9d145dd50
Update disabled menu, button, dropdown etc. to use default cursor. (#814)
To follow macOS UX design.
2025-04-24 21:28:15 +08:00
Jason Lee
bbb267f2bf
accordion: Add gap between title and icon. (#813) 2025-04-24 21:01:11 +08:00
Floyd Wang
f7c900d8eb
input: Add Copy and Eq derives for StepAction (#812) 2025-04-24 11:06:32 +08:00
Jason Lee
b0ff230588
table: Disable auto scroll when resize column out of the table right bounds. (#811)
https://github.com/user-attachments/assets/f1569eb5-e6e6-43f9-9425-0de5e2235163

Do same behavior like the macOS table.
2025-04-23 22:18:40 +08:00
Jason Lee
3cff72cc37
table: Fix render_tr to ensure apply with h_flex. (#810)
- Reduce last empty column to 12px.
2025-04-23 22:09:14 +08:00
Jason Lee
b4449f10cf
dropdown: Avoid selected value text wrap. (#808) 2025-04-22 21:19:20 +08:00
Jason Lee
5cacffcc06 chore: Fix cargo clippy. 2025-04-22 19:36:09 +08:00
Jason Lee
a195795978
input: Refactor window.focused_input by use better way to ensure update. (#809) 2025-04-22 19:34:41 +08:00
Jason Lee
373d97ddf0
root: Fix to reset focused_input when close modal or drawer. (#807) 2025-04-22 18:54:07 +08:00
Ylin
affd29dc85
table: Ensure to select row when prev or next. (#805) 2025-04-22 18:46:41 +08:00
Jason Lee
39da30815a
input: Fix Input escape to propagate to parent element. (#806)
Fix #803 changes broke Escape to dismiss dropdown menu.
2025-04-22 18:40:27 +08:00
Jens Krause
f7be6a245a
input: Add Esc to clean. (#803) 2025-04-20 10:24:47 +08:00
Jason Lee
7719d8b6fc
chore: Update gallery download for Windows. (#804) 2025-04-18 00:10:08 +08:00
Jason Lee
16eb0f304b
gallery: Add to support search stories. (#802)
<img width="1196" alt="image"
src="https://github.com/user-attachments/assets/daa3f47a-0c4d-404c-a673-8e18880e8f6c"
/>
2025-04-17 20:46:57 +08:00
Jason Lee
be63d9701c
theme: Improve Switch and Sidebar selected item bg color. (#801) 2025-04-17 19:53:32 +08:00
Jason Lee
413d156ef4
input: Update Input text method to return &SharedString type. (#800)
## Break Changes

- input: Now the `text` method `Input` changed return type from
`SharedString` to `&SharedString`.
- list: Remove `set_query` and `query` method from `List`, you can use
`query_input` to instead.
2025-04-17 19:52:14 +08:00
Jason Lee
bef1dd2544
story: Add ClipboardStory (#799) 2025-04-17 18:57:23 +08:00
Jason Lee
034e465d28
list: Select first item on search. (#798) 2025-04-17 17:29:02 +08:00
Jason Lee
5b508d7219
gallery: Redesign the gallery. (#797)
Close #773

<img width="1712" alt="image"
src="https://github.com/user-attachments/assets/e27a28ca-cdd7-4970-8518-4fd0104bb3f8"
/>
2025-04-17 17:12:48 +08:00
Jason Lee
225a306169 theme: Improve ThemeMode to add more features. 2025-04-16 15:26:14 +08:00
Jason Lee
e2463bbdcf
linux: Fix sync_system_appearance on Linux. (#796)
Close #104
2025-04-16 14:55:01 +08:00
Jason Lee
3fb0c41fad
linux: Add libx11-xcb-dev to install script and build error. (#795)
![image](https://github.com/user-attachments/assets/0d9f637f-8aaa-4e9a-9400-5a124eda6453)

![image](https://github.com/user-attachments/assets/36233760-aa39-4e7b-b549-1a683e45014b)

![image](https://github.com/user-attachments/assets/1c308bf8-f77d-48e5-b345-f42264ea4084)
2025-04-16 09:00:31 +08:00
Jason Lee
8d37716b88
list: Export query_input for support update the default Query Input. (#794)
## Break Change

- Updated `set_placeholder` and `set_pattern` method to add `window` and
`cx` argument.

    ```diff
- fn set_placeholder(&mut self, placeholder: impl Into<SharedString>)
+ fn set_placeholder(&mut self, placeholder: impl Into<SharedString>, _:
&Window, cx: &mut Context<Self>)

    - fn set_pattern(&mut self, pattern: regex::Regex)
+ fn set_pattern(&mut self, pattern: regex::Regex, window: &mut Window,
cx: &mut Context<Self>)
    ```
2025-04-15 20:36:04 +08:00
Floyd Wang
0c4a0538e6
sidebar: Better active menu background (#793) 2025-04-15 14:36:02 +08:00
Floyd Wang
8930acf648
sidebar: Add suffix for menu item (#792)
| Light | Dark |
| - | - |
| <img width="913" alt="SCR-20250415-mkdr"
src="https://github.com/user-attachments/assets/5c4931e6-4d03-48ec-91c6-ade2d86de75a"
/> | <img width="913" alt="SCR-20250415-mkec"
src="https://github.com/user-attachments/assets/f85af984-ecc3-4cd7-913c-c4e93384dbf1"
/> |
2025-04-15 14:02:52 +08:00
Jason Lee
5ac98a83b5 chore: Update rust-toolchain.toml to use Rust 1.86 2025-04-15 13:41:14 +08:00
dependabot[bot]
b7b7c58bc4
build(deps): bump gpui from 236d6f9 to 04c0a54 (#790)
Bumps [gpui](https://github.com/huacnlee/zed) from `236d6f9` to
`04c0a54`.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="04c0a545a7"><code>04c0a54</code></a>
gpui: Add ImageCache.</li>
<li><a
href="a430d24139"><code>a430d24</code></a>
gpui: Fix <code>window_handle</code> method on Linux.</li>
<li><a
href="cd35ff91f7"><code>cd35ff9</code></a>
gpui: Fix <code>update_window</code> to <code>borrow_mut</code> will
crash on Windows.</li>
<li><a
href="d4736a5427"><code>d4736a5</code></a>
debugger: Fix bug where deleting a breakpoint could delete multiple
breakpoin...</li>
<li><a
href="353ae2335b"><code>353ae23</code></a>
Fix staging/unstaging hunks remotely (<a
href="https://redirect.github.com/huacnlee/zed/issues/28560">#28560</a>)</li>
<li><a
href="ad39d3226f"><code>ad39d32</code></a>
Add new actions <code>editor::FindNextMatch</code> and
<code>editor::FindPreviousMatch</code> (<a
href="https://redirect.github.com/huacnlee/zed/issues/28559">#28559</a>)</li>
<li><a
href="c35238bd72"><code>c35238b</code></a>
debugger: Add support for setting multiple breakpoints via actions (<a
href="https://redirect.github.com/huacnlee/zed/issues/28437">#28437</a>)</li>
<li><a
href="5757e352b0"><code>5757e35</code></a>
agent: Fix bug where wrong crease for <a
href="https://github.com/mention"><code>@​mention</code></a> would be
displayed (<a
href="https://redirect.github.com/huacnlee/zed/issues/28558">#28558</a>)</li>
<li><a
href="c124838a73"><code>c124838</code></a>
agent: Fix &quot;new text thread&quot; action name (<a
href="https://redirect.github.com/huacnlee/zed/issues/28555">#28555</a>)</li>
<li><a
href="5ebac7e30c"><code>5ebac7e</code></a>
agent: Clean up thread auto-capturing (<a
href="https://redirect.github.com/huacnlee/zed/issues/28550">#28550</a>)</li>
<li>Additional commits viewable in <a
href="236d6f902e...04c0a545a7">compare
view</a></li>
</ul>
</details>
<br />


Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-14 21:59:31 +08:00
Jason Lee
71b79cf1b4
chore: Add Windows CI (#789) 2025-04-14 20:46:32 +08:00
Jason Lee
aa44fd3a43
kbd: Fix Kbd keys ordering and on Windows. (#788) 2025-04-14 19:27:23 +08:00
Jason Lee
9a6a0f4421
tooltip: Add action, key_binding method to Tooltip. (#787) 2025-04-14 17:38:21 +08:00
Floyd Wang
8ef4e2eb17
modal: Respond confirm events only when on_ok or footer present (#786) 2025-04-14 16:56:16 +08:00
Jason Lee
d0a73011de
tooltip: Add KeyBinding to tooltip and Button. (#783)
- Improve `Kbd::format` method.
- Add `tooltip_with_action` method to Button for display key binding in
tooltip.
- 
## Break change

- The `Tooltip::new` has been changed it argument and return type.
    
    ```diff
- pub fn new(text: impl Into<Text>, _: &mut Window, cx: &mut App) ->
AnyView
    + pub fn new(text: impl Into<Text>) -> Self
    ```
2025-04-14 16:40:40 +08:00
Floyd Wang
95fb86ec08
checkbox: Make checked icon sizable (#785)
| Before | After |
| - | - |
| <img width="642" alt="SCR-20250414-nbwx"
src="https://github.com/user-attachments/assets/fa3daaf8-5465-49f5-8cd5-d59c19b50494"
/> | <img width="644" alt="SCR-20250414-nbli"
src="https://github.com/user-attachments/assets/e45aa560-0183-460a-b76d-e3cb0203067f"
/> |
2025-04-14 14:47:15 +08:00
Jason Lee
73be54a0f7
input: Improve clear button position in Input. (#782)
| Before | After |
| -- | -- |
| <img width="529" alt="image"
src="https://github.com/user-attachments/assets/02fdba71-7e83-43b9-ba4c-476eb21dcf28"
/> | <img width="530" alt="image"
src="https://github.com/user-attachments/assets/ad7b6378-c9ff-4ea4-943a-87af53a2ac79"
/> |
2025-04-11 19:13:17 +08:00
Floyd Wang
d04866eb77
checkbox: Support sizable (#781)
| Before | After |
| - | - |
| <img width="672" alt="SCR-20250409-pgbg"
src="https://github.com/user-attachments/assets/73a46b13-a3bb-4f58-afb0-aa388bbaefb5"
/> | <img width="669" alt="SCR-20250409-phiy"
src="https://github.com/user-attachments/assets/1230a02d-cdc7-4c2e-9949-bcad09eb2edc"
/> |
2025-04-09 17:31:56 +08:00
Jason Lee
aaa88db52c
story: Add example for secondary click table row. (#780) 2025-04-09 13:42:08 +08:00
Floyd Wang
206a1e049b
description_list: Wrap description value if it’s too long (#779)
| Before | After |
| - | - |
| <img width="752" alt="SCR-20250408-nfvl"
src="https://github.com/user-attachments/assets/5ed558af-869a-4634-bbb5-80fc1481a15c"
/> | <img width="752" alt="SCR-20250408-ngcy"
src="https://github.com/user-attachments/assets/a5871af5-978b-421d-b608-12fa940a884c"
/> |
2025-04-08 14:57:30 +08:00
Jason Lee
231e8ea2db
history: Fix redo, undo chars order for Input. (#775)
Ref #469


https://github.com/user-attachments/assets/b12187cc-c778-4452-8761-63a849ef58a3
2025-04-03 21:17:17 +08:00
Jason Lee
d186bf7c9e
sidebar: Fix Sidebar details, something like icon size, remove view_id argument. (#774)
Also updated the Sidebar example to support expand multiple root items.

## Break Change

- Sidebar create not need assign parent view_id now.
2025-04-03 15:02:05 +08:00
王子凌
b016d9fff4
modal: Fix close Modal by clicking overlay to support closing layer by layer. (#771)
Fix the issue that wrongly trigger `overlay` click event for the
layer-stacked `modals`.

Fix #772 

I.E. When clicking the `overlay`, only the last modal will possibly be
hide(If the last modal is not `overlayClosable`, click the overlay, all
the modals will not be hide).


![gif](https://github.com/user-attachments/assets/96ac97fc-6b6d-463d-bce9-393e6236c5df)

I had tried another solution:

![image](https://github.com/user-attachments/assets/d9882d70-c82c-4397-a5ff-65cd49dc08ab)

![image](https://github.com/user-attachments/assets/3855fb6b-4aac-4c7c-9581-3b0843ef78dc)

If this one is better than prev, I will commit it~

---------

Co-authored-by: Jason Lee <huacnlee@gmail.com>
2025-04-03 13:29:31 +08:00
Jakku Sakura
3051b9c1c4
dock: Fix to sync active state to panels when collapse dock. (#770)
This is a continuation of #764
Without this, if we drag webview to sidebar and collapse, webview is not
aware of itself being hidden
<img width="994" alt="image"
src="https://github.com/user-attachments/assets/6d8d66d1-2a9b-472a-a42f-d04b47aefaac"
/>
2025-04-03 13:13:29 +08:00
Jason Lee
b3b8172349 chore: Update rust-i18n. 2025-04-02 21:56:30 +08:00
Jason Lee
a60acd7e4d
list: Add secondary confirm support to list. (#769) 2025-04-02 16:45:27 +08:00