Commit graph

203 commits

Author SHA1 Message Date
Jason Lee
344e4407ff
input: Use Rope for InputState. (#1208)
This PR to change the Input to use
[ropey](https://github.com/cessen/ropey) to store the text.

## Break Changes

- The `value` method of `InputState` now returns a `SharedString` type.

```diff
- pub fn value(&self) -> &SharedString
+ pub fn value(&self) -> SharedString
```

Ref links:

- https://github.com/cessen/ropey
- https://zed.dev/blog/zed-decoded-rope-sumtree
- https://github.com/helix-editor/helix/blob/master/docs/architecture.md
2025-09-05 18:20:47 +08:00
Chuqiao Feng
8992852165
inspector: Add live editor to inspector (#1205)
Inspired by Zed, this PR implements a simple live Rust and JSON style
editor for the inspector.

The rust style editor only supports `Styled` and `StyledExt` method
calls with no arguments.




https://github.com/user-attachments/assets/df7f1746-92d7-416c-afd5-e389ac3ea9ae

---------

Co-authored-by: Floyd Wang <gassnake999@gmail.com>
2025-09-05 11:58:36 +08:00
Jason Lee
2cfb5d24a9
highlighter: Use sum_tree to store the highlight cache. (#1198) 2025-09-03 14:09:46 +08:00
Jason Lee
e4a367f157
chore: Update GPUI to solve SVG rendering size. (#1189)
https://github.com/zed-industries/zed/pull/36663
2025-09-01 10:48:49 +08:00
Jason Lee
785df6a5ff
chore: Remove SvgImg element. (#1187)
## Break Change

- The `SvgImg` element has been removed.
This is a special implementation and should not be included in the GPUI
Component.
2025-08-29 17:37:11 +08:00
Floyd Wang
2a652dcc01
chore: Bump gpui & wireup Keystroke changes (#1176) 2025-08-27 17:44:10 +08:00
Jason Lee
396c8dbe63
theme: Improve theme color fallback to use blend to avoid alpha. (#1162)
Also updated the themes colors to match this default rule.
2025-08-20 16:37:46 +08:00
Jason Lee
6ae7558c44
theme: Add ThemeRegistry to load and watch themes dir. (#1148) 2025-08-18 19:29:27 +08:00
Jason Lee
dcca730d65
group_box: Add GroupBox element. (#1146)
Close #1144 

## Break Changes

- Renamed used theme variable `card`, `card_foreground` to `group_box`,
`group_box_foreground` for GroupBox.

<img width="1088" height="958" alt="image"
src="https://github.com/user-attachments/assets/adb1cbe6-fd6f-4d22-a434-39455f57ce09"
/>
2025-08-18 11:36:07 +08:00
Jason Lee
406bf8d929
chore: Fork html5minify for HTML render. (#1140)
Continue #1137 

Forked html5minify to improve:

- Resolve `\n` not replaced issue, now no need Regexp to replace.
- Resolve the difference version of html5ever dependency.
2025-08-15 11:10:23 +08:00
Jason Lee
899fbd693a
chore: Use html5minify instead of minify-html. (#1137)
Ref #1132 

This change to reduce release mode binary size from 21MB to 12MB.

## HTML Render example

<img width="1712" height="1312" alt="image"
src="https://github.com/user-attachments/assets/f07c02c9-1b0e-4aa4-b81a-d2b0ac4f7260"
/>
2025-08-15 09:52:38 +08:00
Jason Lee
9a389224f3
chore: Update GPUI and other crates. (#1136) 2025-08-14 19:57:53 +08:00
Jason Lee
63f61dca04
chore: Avoid built-in tree-sitter languages in default. (#1135)
With a `tree-sitter-languages` feature to enable it (Default not
enable).

Changed this for reduce the application size (From 52 MB to 22MB), Ref
#1132

Now default only includes `tree-sitter-json`, if you want more:

```toml
[dependencies]
gpui-component = { features = ["tree-sitter-languages"] }
```

---

```
cargo bloat -p hello_world --release -n 10
    Finished `release` profile [optimized] target(s) in 0.27s
    Analyzing target/release/hello_world

 File  .text    Size              Crate Name
 0.4%   1.4% 88.5KiB simple_minify_html simple_minify_html::code_gen::attrs::ATTRS::{{closure}}
 0.3%   1.0% 62.1KiB              taffy taffy::compute::grid::track_sizing::resolve_intrinsic_track_sizes
 0.1%   0.5% 32.6KiB     gpui_component gpui_component::theme::theme_color::ThemeColor::dark
 0.1%   0.5% 30.0KiB     gpui_component gpui_component::theme::theme_color::ThemeColor::light
 0.1%   0.5% 29.9KiB          html5ever html5ever::tree_builder::TreeBuilder<Handle,Sink>::step
 0.1%   0.4% 27.2KiB               gpui taffy::compute::flexbox::compute_flexbox_layout
 0.1%   0.4% 23.3KiB               usvg usvg::text::layout::layout_text
 0.1%   0.4% 22.5KiB              resvg resvg::filter::apply_inner
 0.1%   0.3% 21.4KiB               gpui jpeg_decoder::decoder::Decoder<R>::decode_internal
 0.1%   0.3% 21.2KiB         image_webp image_webp::lossless::LosslessDecoder<R>::decode_image_stream
25.3%  94.3%  5.7MiB                    And 14091 smaller methods. Use -n N to show more.
26.8% 100.0%  6.0MiB                    .text section size, the file size is 22.4MiB
```
2025-08-14 18:02:27 +08:00
Jason Lee
a73273a0f1
text_view: Use simple-minify-html instead of minify-html. (#1134)
To avoid depends on lightningcss, this is a heavy crate.

Ref #1132 

```
cargo bloat --release -n 200  --crates
    Finished `release` profile [optimized] target(s) in 0.30s
    Analyzing target/release/story

 File  .text     Size Crate
 4.6%  16.9%   3.4MiB lightningcss
```
2025-08-14 13:54:00 +08:00
Jason Lee
123a4a9fcd
chore: Update GPUI to fix click_count API changes. (#1123)
Closes #1116
2025-08-08 11:53:45 +08:00
Jason Lee
9a040eaaac
list: Refactor List, Dropdown delegate API to support section. (#1107)
Ref UITableView API:

https://developer.apple.com/documentation/uikit/uitableviewdatasource

## Changes

- Added some section related API to `ListDelegeate` and
`DropdownDelegate` with default implement, so if you don't need section
that you can just keep the default.
- Added `sections_count` method to get the number of sections, default
is 1.
- Added `render_section_header` for special the section header by if
needed, default return None.
- Added `render_section_footer` for special the section footer by if
needed, default return None.

## Break Changes

- The `DropdownState` have change new method to use IndexPath type:

  ```diff
  - DropdownState::new(vec![], Some(1), window, cx);
  + DropdownState::new(vec![], Some(IndexPath::new(1)), window, cx);
  ```

- The `ListDelegeate`, `DropdownDelegate` has changed API:
  - The `ix` are change from `usize` to `IndexPath`.

  ```diff
- fn render_item(&self, ix: usize, window: &mut Window, cx: &mut
Context<List<Self>>) -> Option<Self::Item>
+ fn render_item(&self, ix: IndexPath, window: &mut Window, cx: &mut
Context<List<Self>>) -> Option<Self::Item>

- fn set_selected_index(&mut self, ix: Option<usize>, window: &mut
Window, cx: &mut Context<List<Self>>)
+ fn set_selected_index(&mut self, ix: Option<IndexPath>, window: &mut
Window, cx: &mut Context<List<Self>>)
  ```

- The `items_count` method have added `section` argument to support list
section.
  
  ```diff
  - fn items_count(&self, cx: &App) -> usize
  + fn items_count(&self, section: usize, cx: &App) -> usize
  ```

- The `can_load_more` method has renamed to `is_eof` in `ListDelegate`
and `TableDelegate`.

  ```diff
  - fn can_load_more(&self, cx: &App) -> bool
  + fn is_eof(&self, cx: &App) -> bool
  ```

- The `can_search` method has renamed to `searchable` in `ListDelegate`.

  ```diff
  - fn can_search(&self) -> bool
  + fn searchable(&self) -> bool
  ```

## Showcase

<img width="1196" height="925" alt="image"
src="https://github.com/user-attachments/assets/22750abe-cc3f-427e-903b-51758bd4e027"
/>

<img width="1214" height="934" alt="image"
src="https://github.com/user-attachments/assets/52d42546-e6e7-4448-9c0f-43cd659fb630"
/>

---------

Co-authored-by: Floyd Wang <gassnake999@gmail.com>
2025-08-05 19:23:32 +08:00
Jason Lee
efa2c7c9ef
virtual_list: Add VirtualListScrollHandle to support scroll_to_item. (#1108)
- Also fixed Table scroll to selected column support.


https://github.com/user-attachments/assets/3b7c51a7-addf-4657-9f9f-de9047fffab8
2025-07-31 18:09:23 +08:00
Jason Lee
579c7a3cbb
virtual_list: Fix scrollable size calculate in VirtualList. (#1087)
The `virtual_list` scroll range issue because recently GPUI changed the
`ScrollHandle` API, now we only get the `max_offset`.

So #1086 have fixed this to implementation a `content_size` method to
calculate `max_offset` and `bounds` of the `ScrollHandle`.

But I found that the `Interactivity` prepaint (This is used in
VirtualList) was not to update the `bounds` of the `ScrollHandle`.

Wait https://github.com/zed-industries/zed/pull/35013 to merge.

| Before | After |
| -- | --- |
| <img width="620" alt="image"
src="https://github.com/user-attachments/assets/6ffb8f30-93b4-42ec-a837-90f80ecb2bf5"
/> | <img width="620" alt="image"
src="https://github.com/user-attachments/assets/21466332-030c-495f-8c84-e3a2c6eeb403"
/> |
- Split `Scrollbale` and `VirtualList` story.

## Break Changes

- The `content_size` argument has been removed from `virtual_list`
callback.
2025-07-24 08:30:42 +00:00
Cyandev
dfbda3999a
modal: Refine enter animation (#1080)
This PR adds a fade in animation for modals, which makes the UI looks
smoother.


https://github.com/user-attachments/assets/7671aa78-a3bd-43a6-ace7-d051d24f2523

---------

Co-authored-by: Jason Lee <huacnlee@gmail.com>
2025-07-23 10:29:42 +08:00
Jason Lee
7d3301d695
tab_bar: Fix some incorrect style in TabBar. (#1078)
This change to fix some incorrect style use, that will break in Taffy
0.5.2+

Ref https://github.com/zed-industries/zed/pull/34827

- Add `Tab::empty` to create a Tab without label.
- Fix form layout in Taffy new version.
- Update GPUI for scroll API changes.
2025-07-22 13:30:04 +08:00
Jason Lee
9c782796c2
theme: Improve theme color fallbacks based on base colors. (#1069)
- Added a lot of default fallbacks for theme colors based on `base`
colors.
- Added `hue`, `saturation`, `lightness` method to change Hsla color.
- Update stories to use theme colors, not a direct color.
- Improve `Badge`, `Avatar` to use theme colors.
- Added a new theme: `Fahrenheit`.
2025-07-17 11:43:40 +08:00
Jason Lee
977ce5df29
theme: Refactor Theme config to support JSONSchama. (#1068) 2025-07-16 19:22:09 +08:00
Jason Lee
44427afacb
theme: Add to support highlight color to theme config. (#1055)
<img width="1058" height="1026" alt="image"
src="https://github.com/user-attachments/assets/300fb16b-c5e4-4eef-9690-54fcabc4fe47"
/>
<img width="836" height="855" alt="image"
src="https://github.com/user-attachments/assets/3fdc8301-375d-4223-a2ea-8d4f411a90bd"
/>
2025-07-14 17:04:18 +08:00
Jason Lee
8bf66443b2
theme: Add theme schema to support JSON theme config. (#1050) 2025-07-07 19:40:00 +08:00
Jason Lee
cafb03777b
chore: Remove shadow_xs, now GPUI has this method. (#1043)
https://github.com/zed-industries/zed/pull/33361
2025-07-04 15:17:55 +08:00
Jason Lee
b80d3a95b1
badge: Add icon variant to Badge. (#1029)
<img width="1248" alt="image"
src="https://github.com/user-attachments/assets/5d80a3d9-4d4e-4eea-89c9-cea9ab33be9e"
/>
2025-07-03 11:13:39 +08:00
Jason Lee
41663ca030
chore: Update GPUI and fix FocusableWrapper removed error. (#1026)
Close #1024 

Ref https://github.com/zed-industries/zed/pull/32436
2025-07-02 11:06:04 +08:00
Jason Lee
deb1187c40
story: Fix #1017 duplicate action name error. (#1020) 2025-06-30 11:18:57 +08:00
Jason Lee
67f0ffbc9c
chore: Upgrade GPUI and fix action API changes. (#1008)
Ref https://github.com/zed-industries/zed/pull/33263
2025-06-25 11:06:12 +08:00
dependabot[bot]
fb125f24c1
build(deps): bump gpui from 0852912 to a067c16 (#1000)
Bumps [gpui](https://github.com/zed-industries/zed) from `0852912` to
`a067c16`.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="a067c16c82"><code>a067c16</code></a>
windows: Use drop target helper (<a
href="https://redirect.github.com/zed-industries/zed/issues/33203">#33203</a>)</li>
<li><a
href="1a6c1b2159"><code>1a6c1b2</code></a>
windows: Fix window close animation (<a
href="https://redirect.github.com/zed-industries/zed/issues/33228">#33228</a>)</li>
<li><a
href="8718019b52"><code>8718019</code></a>
file finder: Ensure filter options keybinding is displayed (<a
href="https://redirect.github.com/zed-industries/zed/issues/33244">#33244</a>)</li>
<li><a
href="a32505fcc2"><code>a32505f</code></a>
agent: Fix token limit callout to show burn mode only for zed provider
(<a
href="https://redirect.github.com/zed-industries/zed/issues/33096">#33096</a>)</li>
<li><a
href="980917bb7c"><code>980917b</code></a>
agent: Preserve chat box text on 'New From Summary' (<a
href="https://redirect.github.com/zed-industries/zed/issues/33220">#33220</a>)</li>
<li><a
href="bd8471bb40"><code>bd8471b</code></a>
agent: Add soft-wrap to long terminal command JSON (<a
href="https://redirect.github.com/zed-industries/zed/issues/33188">#33188</a>)</li>
<li><a
href="16f1da1b7e"><code>16f1da1</code></a>
agent: Fix long previous user message double scroll (<a
href="https://redirect.github.com/zed-industries/zed/issues/33056">#33056</a>)</li>
<li><a
href="272fc672af"><code>272fc67</code></a>
windows: Dialog QoL improvements (<a
href="https://redirect.github.com/zed-industries/zed/issues/33241">#33241</a>)</li>
<li><a
href="e68b95c61b"><code>e68b95c</code></a>
agent: Ensure tool names are unique (<a
href="https://redirect.github.com/zed-industries/zed/issues/33237">#33237</a>)</li>
<li><a
href="28f56ad7ae"><code>28f56ad</code></a>
windows: Avoid setting the mouse cursor while the window is disabled (<a
href="https://redirect.github.com/zed-industries/zed/issues/33230">#33230</a>)</li>
<li>Additional commits viewable in <a
href="0852912fd6...a067c16c82">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-06-24 10:17:40 +08:00
Sunli
934d08c332
wef: Fixed some issues (#975) 2025-06-18 10:46:55 +08:00
Sunli
b70b229370
wef: Added a new WebView component named "Wef" based on CEF. (#877)
Wef is a Rust library for embedding WebView functionality using Chromium
Embedded Framework (CEF3) with offscreen rendering support.
2025-06-17 18:57:44 +08:00
enpitsulin
1214798abd
chore: Update GPUI and fix uniform_list API changes. (#945)
close #943

I am not sure about title specification of PR. pls feel free to edit.
2025-06-11 17:48:04 +08:00
Jason Lee
79ff6ba9cc
highlighter: Fix injection language highlight. (#931)
Still have a bit bug for highlight:

<img width="1012" alt="image"
src="https://github.com/user-attachments/assets/7ec39c85-c20c-4231-8752-b2a7a80f5570"
/>
2025-06-11 15:26:27 +08:00
Jason Lee
a6b9c96a27
title_bar: Fix TitleBar drag area. (#936)
Ref https://github.com/zed-industries/zed/pull/30828 changed new GPUI
API for better details for TitleBar drag area.
2025-06-09 23:09:07 +08:00
Jason Lee
c3ec1deb97
code-editor: Update CodeEditor to support external language. (#928)
Add [Navi](https://navi-lang.org) language for example to external
language for CodeEditor.

<img width="864" alt="image"
src="https://github.com/user-attachments/assets/73afa56d-31bd-4867-a9f2-0a8cf790af0f"
/>
2025-06-09 14:27:33 +08:00
Floyd Wang
44ec74f1fb
chart: Draw dashed lines using gpui PathBuilder (#927)
https://github.com/zed-industries/zed/pull/31678
2025-06-09 11:55:32 +08:00
Floyd Wang
ecfa6b8451
chart: Add decimal feature (#918) 2025-06-05 16:03:20 +08:00
Duane Bester
4477cca969
highlighter: Adding tree-sitter-sequel for SQL support. (#917)
📦 Adding dependency:
[tree-sitter-sequel](https://github.com/derekstride/tree-sitter-sql)

### Previews

<img width="1398" alt="Screenshot 2025-06-04 at 9 27 08 PM"
src="https://github.com/user-attachments/assets/4aee67be-6fb3-4c57-95be-20792639851a"
/>
<img width="1398" alt="Screenshot 2025-06-04 at 9 34 02 PM"
src="https://github.com/user-attachments/assets/730e148f-2bc9-481d-8eea-8110f7884e69"
/>
2025-06-05 11:54:52 +08:00
Floyd Wang
516c8fada4
chart: Introduce chart (#878)
Add a new component called `plot`. It provides a low-level approach to
data analysis and visualization.
Chart is a collection of ready-to-use chart components built with
`plot`.

| Light | Dark |
| - | - |
| <img width="1712" alt="SCR-20250604-qhxb"
src="https://github.com/user-attachments/assets/bf7ce76e-ab7a-42c2-92e7-17cd135de66f"
/> | <img width="1712" alt="SCR-20250604-qhxr"
src="https://github.com/user-attachments/assets/dd3e44ea-bbb5-41a2-8cce-38b316d7d800"
/> |
2025-06-04 19:22:11 +08:00
Jason Lee
2b796c94e9
highlighter: Improve performance for large file. (#911)
Still need to improve.

This version can work smooth when the file lines are less than 5000
lines.

> cargo run --release on MacBook Pro, Apple M3 CPU

- Editing at 110 FPS+
- Display at 120 FPS.

<img width="977" alt="image"
src="https://github.com/user-attachments/assets/37958bcb-20d8-486b-8c50-2728d16f971b"
/>
2025-06-03 23:20:33 +08:00
Jason Lee
901312bc5a
chore: Switch gpui to depends on Zed official. (#912)
Now, GPUI have merged `window_handle` support for all platforms.

- https://github.com/zed-industries/zed/pull/24327
- https://github.com/zed-industries/zed/pull/24545
- https://github.com/zed-industries/zed/pull/28152

It's time to depends on Zed official main branch.
2025-06-02 10:05:45 +08:00
Jason Lee
a4aff404ce
highlighter: Use tree-sitter to highlight code. (#904)
<img width="1318" alt="image"
src="https://github.com/user-attachments/assets/4a8e7b93-a7e7-4648-b8da-c5a6e7ede4f9"
/>
<img width="1318" alt="image"
src="https://github.com/user-attachments/assets/bfc35845-719f-4c97-bf50-087feb0f6775"
/>
2025-05-29 19:54:52 +08:00
Jason Lee
0389608f59 chore: Update GPUI and fix Edges type chagnes. 2025-05-27 09:54:13 +08:00
Jason Lee
a95482fdd8
chore: Upgrade GPUI 2025/05/26 with inspector changes. (#895)
https://github.com/zed-industries/zed/pull/31315
2025-05-26 13:40:27 +08:00
Jason Lee
119d348e4a
input: Fix indent, outdent to consider \r on Windows. (#880)
https://github.com/user-attachments/assets/c662c251-36e5-4a80-bad9-7438ba1b395c
2025-05-21 22:37:07 +08:00
Jason Lee
445b1e4e02
input: Fix click can not to position cursor on empty line on Windows. (#875)
Reverts longbridge/gpui-component#874

Ref https://github.com/zed-industries/zed/pull/31031
2025-05-21 10:01:53 +08:00
Jason Lee
1b13bd707a
input: Update GPUI for fix click can not to position cursor on a empty line on Windows. (#874)
https://github.com/zed-industries/zed/pull/31022
2025-05-20 23:09:24 +08:00
Jason Lee
c0e0d82594
input: Add mask pattern to format display. (#854)
- Add `mask_pattern` to Input, NumberInput.
- Fix Input `set_text` to move cursor to end.

https://github.com/user-attachments/assets/2d7e362a-3f80-47a4-94e3-efd729bffcac
2025-05-14 22:27:46 +08:00
Jason Lee
3a915dba89
chore: Update GPUI 2025/04/30 (#826) 2025-04-30 14:41:08 +08:00
Sunli
69dad78867
svg_img: No longer use the global image loader. (#823)
Update SvgImg load logic and try to drop image to fix VRAM leak issue.

---------

Co-authored-by: Jason Lee <huacnlee@gmail.com>
2025-04-30 11:56:24 +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
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
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
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
b3b8172349 chore: Update rust-i18n. 2025-04-02 21:56:30 +08:00
Jakku Sakura
4f0617e96f
example: Fix to hide WebView when switch tab. (#764)
fixes #763
it also prevent crashing on linux due to gtk not initialized

---------

Co-authored-by: Jason Lee <huacnlee@gmail.com>
2025-04-02 10:50:20 +08:00
Floyd Wang
2274337de3
chore: Update GPUI 2025/03/31 2 (#754)
Reupdate because https://github.com/zed-industries/zed/issues/27767.
2025-03-31 16:49:10 +08:00
Floyd Wang
13de7d5a7e
chore: Update GPUI 2025/03/31 (#752) 2025-03-31 10:31:39 +08:00
Floyd Wang
9f103bac6f
svg_img: Use system fonts to support CJK characters (#750)
| Before | After |
| - | - |
| <img width="528" alt="SCR-20250327-mpcz"
src="https://github.com/user-attachments/assets/22dc30ea-582a-4133-996a-90bcf8cb54be"
/> | <img width="535" alt="SCR-20250327-mnbv"
src="https://github.com/user-attachments/assets/5f360d17-8285-44d8-963b-17784c4c0eb5"
/> |
2025-03-27 14:44:04 +08:00
Jason Lee
a89f971108
chore: Update GPUI 2025/03/20 and fix spawn method. (#725)
- Update `resvg`, `usvg` to 0.45.0
2025-03-20 21:23:50 +08:00
Floyd Wang
81e6da503b
chore: Remove unused feature (#702) 2025-03-10 22:17:27 +08:00
Jason Lee
4c9c7980ee
chore: Upgrade GPUI 2025/03/07 (#697) 2025-03-07 20:22:58 +08:00
Jason Lee
c3f08d52b9
text_view: Add syntax highlight to CodeBlock. (#684)
<img width="1712" alt="image"
src="https://github.com/user-attachments/assets/e7539df4-20db-431b-9bbc-52e08e9de062"
/>
<img width="1712" alt="image"
src="https://github.com/user-attachments/assets/85d52319-1029-4306-8629-ec0321d0571b"
/>
2025-03-04 21:50:50 +08:00
Jason Lee
793a35eff2
text_view: Fix img height in TextView. (#679)
Close #643

<img width="1103" alt="image"
src="https://github.com/user-attachments/assets/0f0a0af0-8fe2-4322-b012-0f970ba9e13d"
/>

Ref https://github.com/zed-industries/zed/pull/25632
2025-03-03 20:51:26 +08:00
Jason Lee
3ba63915ce
text_view: Fix some case may lose spaces, <br> in HTML and Markdown render. (#667) 2025-02-26 17:52:18 +08:00
Jason Lee
c74791aac8
description_list: Add DescriptionList. (#658)
<img width="1089" alt="image"
src="https://github.com/user-attachments/assets/15069422-14aa-4fa3-b661-65fcf7417323"
/>
<img width="1089" alt="image"
src="https://github.com/user-attachments/assets/df4a4b90-b304-40d3-a9ce-1be73eaaa9f4"
/>
<img width="1089" alt="image"
src="https://github.com/user-attachments/assets/1deaf1e8-4b30-4afd-90af-1bd0eecf53e2"
/>
2025-02-25 15:32:59 +08:00
Jason Lee
06f9178ec4
text: Add TextView with Markdown and Simple HTML support. (#639) 2025-02-20 20:08:59 +08:00
Jason Lee
a5db381ef4
chore: Upgrade GPUI 2025/02/10 (#610)
- Replace `Window::parent_view_id()` with `Window::current_view()`
https://github.com/zed-industries/zed/pull/24212
- Fix SvgImg crash by move `use_asset` to `request_layout`.
- Fix Input to implement `character_index_for_point` method
https://github.com/zed-industries/zed/pull/23989
- Fix Input IME position to under the cursor line.
  <img width="504" alt="image"
src="https://github.com/user-attachments/assets/8a6f56c8-6aae-4c0c-8c5a-3959d6a9d224"
/>
- Fix Input overflow sub crash.
2025-02-10 11:53:25 +08:00
Jason Lee
99a4c793c5
chore: Update crate name to gpui-component for publish crate to hold the name. (#603) 2025-02-06 11:57:34 +08:00
Jason Lee
85c6872e68
input: Use closest_index_for_position from GPUI. (#593) 2025-02-03 15:03:31 +08:00
Jason Lee
576dda344c chore: Upgrade GPUI 2025/01/30 2025-01-30 11:06:29 +08:00
Jason Lee
6fa1888ee6
chore: Upgrade for GPUI API changes. (#589) 2025-01-29 16:49:17 +08:00
Jason Lee
327d40e0e0
chore: Upgrade GPUI 3 (#587)
The pervious version has keep on
[gpui2](https://github.com/longbridge/gpui-component/tree/gpui2) branch,
if there need to use.

Ref https://github.com/zed-industries/zed/pull/22632

## Prepare

### Generate index.scip

```bash
rust-analyzer scip ./ > index.scip
```

### Get [refactor](https://github.com/zed-industries/refactor)

```bash
https://github.com/zed-industries/refactor.git
```

## Refactor exist code

```bash
cd refactor
cargo run -- ~/work/gpui-component
```

Then will get result if successed:

```
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.03s
     Running `target/debug/refactor /Users/jason/work/gpui-component`
Loaded 115 SCIP documents
Processing files starting with focus path: ""
Changed 90 files
```

-------------

## Changes

```diff
- View<T>
- Model<T>
+ Entity<T>

- WeakView<T>
+ WeakEntity<T>

- FocusableView
+ Focusable

- cx.bounds()
+ window.bounds()
- cx.refresh()
+ window.refresh()
- cx.focused()
+ window.focused(cx)
- cx.with_optional_element_state
- window.with_optional_element_state
```

```diff
- &mut WindowContext
+ &mut Window, &mut App

- cx: &mut WindowContext
+ window: &mut Window, cx: &mut App

- &mut ViewContext<
+ &mut Window, &mut Context<

- cx: &mut ViewContext<
+ window: &mut Window, cx: &mut Context<
```

```diff
- cx.spawn(|_, mut cx| async move { 
+ cx.spawn_in(window, |_, mut cx| async move {
- cx.dispatch_action(Box::new(...))
+ window.dispatch_action(Box::new(...), cx)
```

`cx.spawn`

```diff
- cx.spawn(|view, mut cx| async move {
+ cx.spawn_in(window, |view, mut window| async move {
+     _ = view.update_in(&mut window, move |view, window, cx| {
```
2025-01-27 03:58:48 +08:00
Jason Lee
71de5dd882
input: Fix position cursor in multi-line mode. (#583)
Close #581

Ref https://github.com/zed-industries/zed/pull/23668

https://github.com/user-attachments/assets/c69d098e-d2cb-4053-b739-6c7dd666e769
2025-01-26 14:12:08 +08:00
Jason Lee
cd613db6d6
number_input: Improve NumberInput to better handle mouse down position cursor and fix sizable API. (#582)
Close #579 

- Leave some space before the Input to support mouse down to position
cursor at start of line.
- Fix to match with size appearance.
- Keep padding left and right to Input, even setup `appearance: false`.

## Break Changes

- The `xlarge`, `large`, `small`, `xsmall` ... method has been moved to
use `ui::Sizable` trait to same as other component.
2025-01-24 23:39:19 +08:00
Jason Lee
20feab5f40
modal: Add confirm Modal with default Ok, Cancel buttons. (#558)
<img width="581" alt="image"
src="https://github.com/user-attachments/assets/ad53fb63-f3be-41e6-90c0-f03cba48c4db"
/>

- Added `overlay_closable` method to Modal to control overlay click to
close modal.
- Added `on_ok`, `on_cancel` callback method.
- Added `confirm` to setup to use default confirm style (With a Ok,
Cancel button).

## Break Changes

- The `footer` method has been changed to with a fn not a element.
2025-01-20 17:42:05 +08:00
Jason Lee
8dca96469e
chore: Update GPUI with MSAA and PathBuilder. (#548) 2025-01-15 16:52:03 +08:00
Jason Lee
a0f6b48eff
chore: Update GPUI 2025/01/14 (#547) 2025-01-14 19:21:04 +08:00
dependabot[bot]
804705a260
build(deps): bump wry from 0.47.2 to 0.48.0 (#530)
Bumps [wry](https://github.com/tauri-apps/wry) from 0.47.2 to 0.48.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/tauri-apps/wry/releases">wry's
releases</a>.</em></p>
<blockquote>
<h2>wry v0.48.0</h2>
<!-- raw HTML omitted -->
<pre><code>Updating crates.io index
     Locking 404 packages to latest compatible versions
      Adding html5ever v0.26.0 (available: v0.29.0)
      Adding soup3 v0.5.0 (available: v0.7.0)
      Adding toml v0.8.2 (available: v0.8.19)
      Adding toml_datetime v0.6.3 (available: v0.6.8)
      Adding toml_edit v0.20.2 (available: v0.20.7)
Fetching advisory database from
`https://github.com/RustSec/advisory-db.git`
Loaded 722 security advisories (from /home/runner/.cargo/advisory-db)
    Updating crates.io index
    Scanning Cargo.lock for vulnerabilities (405 crate dependencies)
Crate:     atk
Version:   0.18.2
Warning:   unmaintained
Title:     gtk-rs GTK3 bindings - no longer maintained
Date:      2024-03-04
ID:        RUSTSEC-2024-0413
URL:       https://rustsec.org/advisories/RUSTSEC-2024-0413
Dependency tree:
atk 0.18.2
└── gtk 0.18.2
    ├── wry 0.48.0
    ├── webkit2gtk 2.0.1
    │   └── wry 0.48.0
    └── tao 0.31.0
        └── wry 0.48.0
<p>Crate:     atk-sys
Version:   0.18.2
Warning:   unmaintained
Title:     gtk-rs GTK3 bindings - no longer maintained
Date:      2024-03-04
ID:        RUSTSEC-2024-0416
URL: <a
href="https://rustsec.org/advisories/RUSTSEC-2024-0416">https://rustsec.org/advisories/RUSTSEC-2024-0416</a>
Dependency tree:
atk-sys 0.18.2
├── gtk-sys 0.18.2
│   ├── webkit2gtk-sys 2.0.1
│   │   ├── wry 0.48.0
│   │   └── webkit2gtk 2.0.1
│   │       └── wry 0.48.0
│   ├── webkit2gtk 2.0.1
│   └── gtk 0.18.2
│       ├── wry 0.48.0
│       ├── webkit2gtk 2.0.1
&lt;/tr&gt;&lt;/table&gt;
</code></pre></p>
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/tauri-apps/wry/blob/dev/CHANGELOG.md">wry's
changelog</a>.</em></p>
<blockquote>
<h2>[0.48.0]</h2>
<ul>
<li><a
href="eb0c8163f1"><code>eb0c816</code></a>
(<a
href="https://redirect.github.com/tauri-apps/wry/pull/1423">#1423</a> by
<a
href="https://github.com/tauri-apps/wry/../../SpikeHD"><code>@​SpikeHD</code></a>)
Rename <code>{WebViewBuilderExtWindows,
WebViewBuilderExtUnix}::with_extension_path</code> to
<code>with_extensions_path</code>.</li>
<li><a
href="b4ba5b47f2"><code>b4ba5b4</code></a>
(<a
href="https://redirect.github.com/tauri-apps/wry/pull/1426">#1426</a> by
<a
href="https://github.com/tauri-apps/wry/../../FabianLars"><code>@​FabianLars</code></a>)
On Windows, Wry will now log PostMessage errors instead of
panicking.</li>
<li><a
href="f0c6b947dd"><code>f0c6b94</code></a>
(<a
href="https://redirect.github.com/tauri-apps/wry/pull/1441">#1441</a> by
<a
href="https://github.com/tauri-apps/wry/../../renovate"><code>@​renovate</code></a>)
Updated <code>webview2-com</code> to <code>0.34</code>.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="2ffcd494af"><code>2ffcd49</code></a>
Apply Version Updates From Current Changes (<a
href="https://redirect.github.com/tauri-apps/wry/issues/1424">#1424</a>)</li>
<li><a
href="6ad66d3880"><code>6ad66d3</code></a>
chore(deps): update rust crate pollster to 0.4.0 (<a
href="https://redirect.github.com/tauri-apps/wry/issues/1405">#1405</a>)</li>
<li><a
href="f0c6b947dd"><code>f0c6b94</code></a>
fix(deps): update rust crate webview2-com to 0.34 (<a
href="https://redirect.github.com/tauri-apps/wry/issues/1441">#1441</a>)</li>
<li><a
href="ca74176748"><code>ca74176</code></a>
chore(deps): update rust crate winit to 0.30 (<a
href="https://redirect.github.com/tauri-apps/wry/issues/1235">#1235</a>)</li>
<li><a
href="72f386f1c5"><code>72f386f</code></a>
fix: tried to access uninitialized instance variable (<a
href="https://redirect.github.com/tauri-apps/wry/issues/1425">#1425</a>)</li>
<li><a
href="413817c8ad"><code>413817c</code></a>
chore(deps): update rust crate tao to 0.31 (<a
href="https://redirect.github.com/tauri-apps/wry/issues/1351">#1351</a>)</li>
<li><a
href="e3ef45f586"><code>e3ef45f</code></a>
fix(deps): update rust crate thiserror to v2 (<a
href="https://redirect.github.com/tauri-apps/wry/issues/1411">#1411</a>)</li>
<li><a
href="b4ba5b47f2"><code>b4ba5b4</code></a>
fix: log postmessage errors (<a
href="https://redirect.github.com/tauri-apps/wry/issues/1426">#1426</a>)</li>
<li><a
href="4740c0bf60"><code>4740c0b</code></a>
refactor: destruct tuples to enhance readability (<a
href="https://redirect.github.com/tauri-apps/wry/issues/1438">#1438</a>)</li>
<li><a
href="eb0c8163f1"><code>eb0c816</code></a>
refactor!: Rename <code>with_extension_path</code> to
<code>with_extensions_path</code> (<a
href="https://redirect.github.com/tauri-apps/wry/issues/1423">#1423</a>)</li>
<li>See full diff in <a
href="https://github.com/tauri-apps/wry/compare/wry-v0.47.2...wry-v0.48">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=wry&package-manager=cargo&previous-version=0.47.2&new-version=0.48.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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-01-08 15:11:33 +08:00
Jason Lee
d265ba7667 chore: Update GPUI 2024/11/30 2024-12-30 17:12:38 +08:00
Jason Lee
d4819b34aa
chore: Update GPUI with AnchorCorner renamed to Corner. (#497)
Ref https://github.com/zed-industries/zed/pull/22119
2024-12-18 18:02:47 +08:00
xda
5874c6974f
tiles: Add Tiles (#435)
## Break Changes

- Renamed `DockItemState` to `PanelState`.
- Renamed `DockItemInfo` to `PanelInfo`.
- Update `cx` type from `WindowContext` to `AppContext` for Panel trait
`panel_name` method.

## TODO

- [ ] Support merge panels into TabPanel.
- [ ] Support split panels into Tile.

---------

Co-authored-by: Jason Lee <huacnlee@gmail.com>
2024-12-16 20:33:14 +08:00
Jason Lee
64a3b4399b
chore: Update GPUI with gradient support. (#487) 2024-12-12 10:19:38 +08:00
Jason Lee
9f0f05af2d
scrollbar: Adjust scrollbar style and add scrollbar_thumb_hover to theme. (#482)
<img width="297" alt="image"
src="https://github.com/user-attachments/assets/1779bf6c-2d01-4a12-9052-2ba571bff68b">

<img width="301" alt="image"
src="https://github.com/user-attachments/assets/9971b248-9a48-47ff-847c-00eafff17fe1">
2024-12-10 17:08:09 +08:00
Jason Lee
9288dc91c2
input: Add to support multi-line Input. (#463) 2024-12-09 20:17:05 +08:00
Jason Lee
142d092867
dock: Add add_panel method to add panel to DockArea. (#440)
Ref #438 

https://github.com/user-attachments/assets/93b40aed-39f3-4d16-a442-13aa7a931895
2024-11-27 11:27:04 +08:00
Jason Lee
0119c80120
input: Update GPUI and fix Input changes. (#437)
Ref https://github.com/zed-industries/zed/pull/20968
2024-11-26 21:41:34 +08:00
dependabot[bot]
931d762955
build(deps): bump wry from 0.47.0 to 0.47.2 (#434) 2024-11-26 13:29:03 +08:00
Jason Lee
fa6abe5a9e
chore: Upgrade GPUI and fix API changes. (#426)
Refs:

- https://github.com/zed-industries/zed/pull/20349
- https://github.com/zed-industries/zed/pull/20371
- https://github.com/zed-industries/zed/pull/20686
2024-11-18 11:35:49 +08:00
dependabot[bot]
a4abc164bb
build(deps): bump wry from 0.46.3 to 0.47.0 (#408)
Bumps [wry](https://github.com/tauri-apps/wry) from 0.46.3 to 0.47.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/tauri-apps/wry/releases">wry's
releases</a>.</em></p>
<blockquote>
<h2>wry v0.47.0</h2>
<!-- raw HTML omitted -->
<pre><code>Updating crates.io index
     Locking 418 packages to latest compatible versions
      Adding android-activity v0.5.2 (latest: v0.6.0)
      Adding ash v0.37.3+1.3.251 (latest: v0.38.0+1.3.281)
      Adding bit-set v0.5.3 (latest: v0.8.0)
      Adding bit-vec v0.6.3 (latest: v0.8.0)
      Adding bitflags v1.3.2 (latest: v2.6.0)
      Adding block2 v0.3.0 (latest: v0.5.1)
      Adding cairo-rs v0.18.5 (latest: v0.20.5)
      Adding cairo-sys-rs v0.18.2 (latest: v0.20.0)
      Adding calloop v0.12.4 (latest: v0.14.1)
      Adding calloop-wayland-source v0.2.0 (latest: v0.4.0)
      Adding cfg-expr v0.15.8 (latest: v0.17.0)
      Adding cfg_aliases v0.1.1 (latest: v0.2.1)
      Adding convert_case v0.4.0 (latest: v0.6.0)
      Adding core-foundation v0.9.4 (latest: v0.10.0)
      Adding core-graphics v0.23.2 (latest: v0.24.0)
      Adding core-graphics-types v0.1.3 (latest: v0.2.0)
      Adding cssparser v0.27.2 (latest: v0.34.0)
      Adding d3d12 v0.19.0 (latest: v22.0.0)
      Adding derive_more v0.99.18 (latest: v1.0.0)
      Adding gdk-pixbuf v0.18.5 (latest: v0.20.4)
      Adding gdk-pixbuf-sys v0.18.0 (latest: v0.20.4)
      Adding generic-array v0.14.7 (latest: v1.1.0)
      Adding gethostname v0.4.3 (latest: v0.5.0)
      Adding getrandom v0.1.16 (latest: v0.2.15)
      Adding gio v0.18.4 (latest: v0.20.5)
      Adding gio-sys v0.18.1 (latest: v0.20.5)
      Adding glib v0.18.5 (latest: v0.20.5)
      Adding glib-macros v0.18.5 (latest: v0.20.5)
      Adding glib-sys v0.18.1 (latest: v0.20.5)
      Adding glow v0.13.1 (latest: v0.15.0)
      Adding glutin_wgl_sys v0.5.0 (latest: v0.6.0)
      Adding gobject-sys v0.18.0 (latest: v0.20.4)
      Adding gpu-allocator v0.25.0 (latest: v0.27.0)
      Adding gpu-descriptor v0.2.4 (latest: v0.3.0)
      Adding gpu-descriptor-types v0.1.2 (latest: v0.2.0)
      Adding hashbrown v0.12.3 (latest: v0.15.1)
      Adding hashbrown v0.14.5 (latest: v0.15.1)
      Adding heck v0.4.1 (latest: v0.5.0)
      Adding html5ever v0.26.0 (latest: v0.29.0)
      Adding icrate v0.0.4 (latest: v0.1.2)
      Adding indexmap v1.9.3 (latest: v2.6.0)
      Adding itoa v0.4.8 (latest: v1.0.11)
      Adding jni-sys v0.3.0 (latest: v0.4.0)
&lt;/tr&gt;&lt;/table&gt; 
</code></pre>
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/tauri-apps/wry/blob/dev/CHANGELOG.md">wry's
changelog</a>.</em></p>
<blockquote>
<h2>[0.47.0]</h2>
<ul>
<li><a
href="72212568cb"><code>7221256</code></a>
(<a
href="https://redirect.github.com/tauri-apps/wry/pull/1365">#1365</a> by
<a
href="https://github.com/tauri-apps/wry/../../Norbiros"><code>@​Norbiros</code></a>)
Add
<code>WebViewBuilder::with_initialization_script_for_main_only</code> to
enable injecting JavaScript code into main frame only or all
subframes.</li>
<li><a
href="c1b26b9612"><code>c1b26b9</code></a>
(<a
href="https://redirect.github.com/tauri-apps/wry/pull/1394">#1394</a> by
<a
href="https://github.com/tauri-apps/wry/../../amrbashir"><code>@​amrbashir</code></a>)
Add <code>WebView::cookies</code> and
<code>WebView::cookies_for_url</code> APIs.</li>
<li><a
href="c193e2a04c"><code>c193e2a</code></a>
(<a
href="https://redirect.github.com/tauri-apps/wry/pull/1408">#1408</a> by
<a
href="https://github.com/tauri-apps/wry/../../amrbashir"><code>@​amrbashir</code></a>)
Fix <code>DragDropEvent::Drop</code> event never fired on Wayland (and
sometimes on X11).</li>
<li><a
href="1d63fa3253"><code>1d63fa3</code></a>
(<a
href="https://redirect.github.com/tauri-apps/wry/pull/1403">#1403</a> by
<a
href="https://github.com/tauri-apps/wry/../../SpikeHD"><code>@​SpikeHD</code></a>)
Add <code>WebViewBuilder::with_extension_path</code> API to Windows and
Linux.</li>
<li><a
href="0c192f4fda"><code>0c192f4</code></a>
(<a
href="https://redirect.github.com/tauri-apps/wry/pull/1414">#1414</a> by
<a
href="https://github.com/tauri-apps/wry/../../lucasfernog"><code>@​lucasfernog</code></a>)
Fix Android static handlers not being replaced when the application UI
is relaunched while still running in the foreground.</li>
<li><a
href="9a2a2d42b6"><code>9a2a2d4</code></a>
(<a
href="https://redirect.github.com/tauri-apps/wry/pull/1412">#1412</a> by
<a
href="https://github.com/tauri-apps/wry/../../amrbashir"><code>@​amrbashir</code></a>)
Fix icons of dragged items getting stuck when using
<code>WebViewBuilder::with_drag_drop_handler</code> on some distros like
Gnome.</li>
<li><a
href="fa9875bb16"><code>fa9875b</code></a>
(<a
href="https://redirect.github.com/tauri-apps/wry/pull/1409">#1409</a> by
<a
href="https://github.com/tauri-apps/wry/../../amrbashir"><code>@​amrbashir</code></a>)
On Windows, disable Webview2's file drop when using
<code>WebViewBuilder::with_drag_drop_handler</code> which fix drag
events for files from &quot;Recent files&quot; view.</li>
<li><a
href="6007608277"><code>6007608</code></a>
(<a
href="https://redirect.github.com/tauri-apps/wry/pull/1400">#1400</a> by
<a
href="https://github.com/tauri-apps/wry/../../amrbashir"><code>@​amrbashir</code></a>)
On Windows, fix webview slightly larger than the window inner size,
which resulted in a hidden 1px in the right and bottom borders of the
webview</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="08f3c68f56"><code>08f3c68</code></a>
Apply Version Updates From Current Changes (<a
href="https://redirect.github.com/tauri-apps/wry/issues/1399">#1399</a>)</li>
<li><a
href="c193e2a04c"><code>c193e2a</code></a>
fix(linux): fix <code>DragDropEvent::Drop</code> never fired on wayland
(<a
href="https://redirect.github.com/tauri-apps/wry/issues/1408">#1408</a>)</li>
<li><a
href="6007608277"><code>6007608</code></a>
fix(windows): handle window borders when resizing to parent (<a
href="https://redirect.github.com/tauri-apps/wry/issues/1400">#1400</a>)</li>
<li><a
href="58cc0824c2"><code>58cc082</code></a>
fix(android): drop MainPipe on activity destroy (<a
href="https://redirect.github.com/tauri-apps/wry/issues/1415">#1415</a>)</li>
<li><a
href="0c192f4fda"><code>0c192f4</code></a>
fix(android): allow static handlers to be replaced (<a
href="https://redirect.github.com/tauri-apps/wry/issues/1414">#1414</a>)</li>
<li><a
href="9a2a2d42b6"><code>9a2a2d4</code></a>
fix: call <code>ctx.drop_finish</code> in webkit2gtk drop handler (<a
href="https://redirect.github.com/tauri-apps/wry/issues/1412">#1412</a>)</li>
<li><a
href="7c4f2b7299"><code>7c4f2b7</code></a>
chore: typo <code>se</code> -&gt; <code>set</code> (<a
href="https://redirect.github.com/tauri-apps/wry/issues/1413">#1413</a>)</li>
<li><a
href="b1d4d830d4"><code>b1d4d83</code></a>
ci: remove macos-12, no longer supported (<a
href="https://redirect.github.com/tauri-apps/wry/issues/1410">#1410</a>)</li>
<li><a
href="fa9875bb16"><code>fa9875b</code></a>
fix(windows): set WebView2 <code>AllowExternalDrop</code> to false (<a
href="https://redirect.github.com/tauri-apps/wry/issues/1409">#1409</a>)</li>
<li><a
href="72212568cb"><code>7221256</code></a>
feat: Allow injecting JavaScript code into subframes (<a
href="https://redirect.github.com/tauri-apps/wry/issues/1365">#1365</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/tauri-apps/wry/compare/wry-v0.46.3...wry-v0.47">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=wry&package-manager=cargo&previous-version=0.46.3&new-version=0.47.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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>
2024-11-15 14:26:03 +08:00
Floyd Wang
df54c7b2fb
svg_img: Embed the font file (#401)
<img width="644" alt="image"
src="https://github.com/user-attachments/assets/7acaff6c-0913-402a-8759-2660d2977ce5">
2024-11-08 15:45:00 +08:00
Floyd Wang
6d0b332071
svg_img: Render SVGs with text tags (#390)
<img width="620" alt="image"
src="https://github.com/user-attachments/assets/61f2a1f8-6926-484d-bcb8-076a9d85e89c">
2024-11-07 11:39:06 +08:00
ihavecoke
c871138ca7
webview: Upgrade wry version to fixed with_user_agent regression. (#384)
https://github.com/tauri-apps/wry/releases/tag/wry-v0.46.3
2024-10-31 14:24:10 +08:00
Floyd Wang
c87b4c7f01
notification: Autohide should not panic when the window is not found (#374) 2024-10-22 10:43:00 +08:00
Jason Lee
2c979c32c5
linux: Fix #104 Linux platform crash with BorrowMutError. (#367)
![Screenshot from 2024-10-19
01-20-24](https://github.com/user-attachments/assets/cc0d2250-38ae-4381-a06c-c64ec309ee4c)
2024-10-19 01:21:31 +08:00
Jason Lee
f35db249a6
theme: Update GPUI and imporve dark color. (#358)
## Before

<img width="1712" alt="image"
src="https://github.com/user-attachments/assets/f4e74cf0-e386-4e91-86d1-05ee75b26471">

## After 

<img width="1712" alt="image"
src="https://github.com/user-attachments/assets/da393ea9-79ee-4535-a46d-68684d7ad738">
2024-10-17 19:14:42 +08:00
Jason Lee
28d887cf5e webview: Use Wry crate version. 2024-10-16 16:32:25 +08:00
Jason Lee
fdca75d5a7
title_bar: Add a new TitleBar, remove the old version. (#348)
- Removed old workspace crate, moved out to
[gpui-workspace](https://github.com/huacnlee/gpui-workspace)

<img width="491" alt="image"
src="https://github.com/user-attachments/assets/5048491c-9b98-4af5-9f0f-9a0f20c2308f">

Icons for Windows and Linux use by SVG icon, it based on:

-
https://learn.microsoft.com/en-us/windows/apps/design/style/segoe-fluent-icons-font
- Download Font: [Segoe Fluent
Icons](https://learn.microsoft.com/en-us/windows/apps/design/downloads/#fonts)
2024-10-16 16:22:17 +08:00