Commit graph

196 commits

Author SHA1 Message Date
Jason Lee
724ccd64a7
chore: Add ui folder to Cargo default-members. (#1600)
This to help `cargo test` default will test `ui` and `story`.
2025-11-14 06:16:03 +00:00
Jason Lee
f88b547b70 Bump v0.4.0-preview2 2025-11-12 15:16:49 +08:00
Jason Lee
945db0be56
dialog: Rename Modal to Dialog. (#1538)
## Break Change

- Renamed `Modal` to `Dialog`.

```diff
- window.open_modal(...)
+ window.open_dialog(...)

- window.close_modal(...);
+ window.close_dialog(...);
```

- Renamed `show_close` method to `close_button` in Dialog.
```diff
- .show_close(false)
+ .close_button(true)
```
2025-11-07 17:25:55 +08:00
Jason Lee
34c589d45b Bump v0.4.0-preview1. 2025-11-06 22:27:26 +08:00
FlyingYu
be460dcbed
modal, drawer: Block background interaction when Modal, Drawer is active. (#1483)
Co-authored-by: Jason Lee <huacnlee@gmail.com>
2025-11-03 16:51:38 +08:00
Floyd Wang
123934237a Bump v0.4.0-preview0 2025-10-30 15:50:45 +08:00
Floyd Wang
183d17731d Bump v0.3.1 2025-10-27 13:52:29 +08:00
Iain
b740123d4b
example: Add missed control icon assets (#1424) 2025-10-24 13:30:27 +08:00
Jason Lee
ab7af9c01d Bump v0.3.0 2025-10-24 10:47:04 +08:00
Floyd Wang
b80fca28c1 Bump v0.3.0-preview2 2025-10-23 16:36:23 +08:00
Jason Lee
804a89df20
chore: Update GPUI v0.2.2 (#1416) 2025-10-23 07:41:50 +00:00
Vincent Hanquez
2b37028e08
chore: Update dependencies to smol = 2 (#1404)
just noticed the dependency is set to a fairly old version of smol (=
1), so update to smol = 2.

Also gpui/zed seems to be using smol = 2
2025-10-21 10:56:48 +08:00
Jason Lee
17ec395853 Bump v0.3.0-preview0 2025-10-17 10:37:49 +08:00
Jason Lee
f16487a2cb
chore: Fix license link in crate meta. (#1393)
Close #1392
2025-10-17 10:32:09 +08:00
Jason Lee
1adaf3ec55
tree: Add Tree. (#1373)
Close #318 


https://github.com/user-attachments/assets/1fed12e2-df53-4213-a3f5-c57bd8b4cadb
2025-10-15 18:39:47 +08:00
Jason Lee
429a4b2858
example: Add input example. (#1380) 2025-10-15 05:40:36 +00:00
Jason Lee
4ccd7d99d0
examples: Add examples folder. (#1378) 2025-10-15 02:26:13 +00:00
Jason Lee
6998708b81
Revert "chore: Update GPUI dependency." (#1376)
Reverts longbridge/gpui-component#1374

Because `gpui v0.2.1` have but, the text render not in vertical center.
2025-10-14 21:41:31 +08:00
Jason Lee
e56c7a39bf
chore: Update GPUI dependency. (#1374) 2025-10-14 12:37:15 +00:00
Jason Lee
ca9d5b77e2 chore: Release v0.2.0 2025-10-09 15:21:10 +08:00
Jason Lee
6ca9ac46fa
chore: Bump crate version. (#1340) 2025-10-09 15:20:34 +08:00
Floyd Wang
66851c55e4 Bump gpui (#1336) 2025-10-08 11:20:06 +08:00
Jason Lee
d0396d779e
editor: Add document_colors LSP. (#1329) 2025-10-06 18:08:12 +08:00
Floyd Wang
1358b2906e
Bump gpui (#1324)
* Wireup the `Pixels` change
https://github.com/zed-industries/zed/pull/39367.
2025-10-03 14:32:29 +08:00
Carlo Corradini
908c022efe
chore: Assets interpolate folder path via rust embed (#1318)
Use `rust-embed` feature `interpolate-folder-path` to always
(`debug`/`release`) load assets from the correct `assets` directory
2025-10-02 16:04:33 +08:00
Jason Lee
69af1be6e5
chore: Update GPUI and fix DeferredScrollToItem API changes. (#1315) 2025-09-30 16:10:25 +08:00
Jason Lee
5e504d10bb
chore: Refactor tab key to switch focus. (#991)
Wait https://github.com/zed-industries/zed/pull/33008,
https://github.com/zed-industries/zed/pull/34804 to merge.


https://github.com/user-attachments/assets/3c21ebc9-44a0-4311-bb0f-5f63fe8d4bb3

- Improved `focus_ring` to render like an outline.
- Added to support press `Enter`, `Space` key to trigger Checkbox,
Button, Radio.

## Break Changes

- The `FocusableExt` has been changed to only for crate internal.
- The `FocusableCycle` has been removed, now GPUI has it own tab stop
implementation.
2025-09-29 16:48:24 +08:00
Copilot
ed05c3ebec
chore: Remove Wef code as it has been extracted to separate repository (#1302)
All WEF (Web Embedding Framework) related code has been successfully
removed from the repository as it has been extracted to
https://github.com/longbridge/wef

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: huacnlee <5518+huacnlee@users.noreply.github.com>
2025-09-29 15:31:58 +08:00
Sunli
b8651515f0
chore: Remove unnecessary RefCell (#1301) 2025-09-29 14:39:04 +08:00
Sunli
3413c33d1c
chore: use async-wry (#1300) 2025-09-29 13:32:12 +08:00
Jason Lee
8f5bff61fb
chore: Fix sum_tree API changes. (#1286)
https://github.com/zed-industries/zed/pull/38776
2025-09-25 10:41:37 +08:00
Jason Lee
1c3eca93b8
editor: Revert to use ropey. (#1284)
For the License reason.

- The performance is slow down, before version can handle 200K lines,
now 150K lines is good.
2025-09-24 20:52:18 +08:00
Jason Lee
993ce34bd8
editor: Avoid scroll on select all. (#1277)
- Add `replace_text_in_range_silent` for some case to avoid show
completion, for example on cut, paster ...
- Improve to only call validation, mask on single line mode.
- Improve move cursor to scroll to visible to keep edge 3 lines.

https://github.com/user-attachments/assets/ca8bcca8-a55b-4c98-af7c-7639d1c34923

- Fix `RopeExt::offset_to_position` may crash.
- Add deffered_scroll_offset to improve paste to scroll to cursor.

https://github.com/user-attachments/assets/1af09a50-37f0-47c8-8185-4b78820d064a
2025-09-23 15:59:48 +08:00
Jason Lee
455605d64b
menu: Fix to support keyboard to select menu items. (#1263)
- And add to support scroll to selected item.

---------

Co-authored-by: Floyd Wang <gassnake999@gmail.com>
2025-09-22 21:47:30 +08:00
Floyd Wang
d3d2a9ee49 chore: Remove gpui test-support feature 2025-09-19 17:38:42 +08:00
Jason Lee
51efa766ea
editor: Improve search to select first match in visible range. (#1258) 2025-09-18 16:07:35 +08:00
Jason Lee
8a3ef51ea1
input: Add to support search and replace. (#1252)
<img width="806" height="765" alt="image"
src="https://github.com/user-attachments/assets/5e2a7144-f814-4874-b9c1-89ebf5d942ec"
/>

- Close #1212 to support search for Input.
- Fix #1235 to support scroll to cursor when go to line.
2025-09-17 19:02:00 +08:00
dependabot[bot]
30b4723853
build(deps): bump gpui from 9c548a0 to 53b2f37 (#1248) 2025-09-15 23:47:25 +08:00
Jason Lee
f1b6d7c5ed editor: Add completion, code_action provider. (#1242) 2025-09-15 19:25:02 +08:00
Jason Lee
da85754b96
input: Refactor diagnostics. (#1240)
<img width="613" height="530" alt="image"
src="https://github.com/user-attachments/assets/be86658d-706c-411c-8ba6-09b495208051"
/>

## Break Changes

- The `Markers` has been renamed to use `Diagnostics`.
- The `input::LineNumber` has renamed to `input::Position` and changed
from 1-based to use 0-based.
- Renamed `go_to_line` to `set_cursor_position`, `line_column` to
`cursor_position`.

```diff
- pub fn line_column(&self) -> LineColumn
+ pub fn cursor_position(&self) -> Position

- pub fn go_to_line(&mut self, line: usize, column: Option<usize>, window: &mut Window, cx: &mut Context<Self>)
+ pub fn set_cursor_position(&mut self, position: impl Into<Position>, window: &mut Window, cx: &mut Context<Self>)
```
2025-09-11 16:54:40 +08:00
Jason Lee
3fa996c331
input: Fix line column by use chars offset. (#1239)
- Add autocorrect to markdown example for test `markers`.

<img width="1104" height="590" alt="image"
src="https://github.com/user-attachments/assets/03103088-e828-4039-82b0-c816d5f36141"
/>
2025-09-10 20:56:15 +08:00
Jason Lee
844574befc
input: Fix track scroll to selected end on drag move. (#1231) 2025-09-10 13:59:02 +08:00
Jason Lee
a9953a9349
input: Use zed's Rope (#1214)
Now with 10K lines plain text, in release mode on macOS. The
`large-text` example can work with:

- 120 FPS for display.
- 90 FPS for update text.

```
MTL_HUD_ENABLED=1 cargo run --example large-text --release
```

- Fixed the cursor position at end of line, also support at start of
line.


https://github.com/user-attachments/assets/1de52f6c-e138-4ed3-a600-06372a807ed8

### Check list

- [x] Modifying Text with Rope
- [x] LineColumn, GoToLine
- [x] Code Highlight
- [x] Delete word, select word
- [x] Delete line
- [x] Move left, right, up, down
2025-09-08 16:44:52 +08:00
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