Martí Gimeno Ortí
5f13b49690
plot: Add stroke style per each Y series ( #1364 )
...
Enables the user to set different `stroke_style` to each Y data series,
keeping retrocompatibility with the previous API.
<img width="1300" height="411" alt="Screenshot from 2025-10-13 11-33-28"
src="https://github.com/user-attachments/assets/d665b87c-0d79-479c-9156-15a0f1c8ca10 "
/>
2025-10-14 09:36:30 +08:00
Jason Lee
5b2fed0ccb
markdown: Use list for Markdown render and add scrollbar. ( #1357 )
2025-10-13 22:06:07 +08:00
Jason Lee
2574e7f812
story: Add open file to Markdown and Editor example. ( #1363 )
...
Close #1352
2025-10-13 11:52:16 +08:00
Jason Lee
97df4efd46
input: Fix set_value when Input is disabled. ( #1362 )
...
Close #1350
2025-10-13 11:15:32 +08:00
Jason Lee
08cf199b39
editor: Add delay to trigger hover popover. ( #1361 )
2025-10-13 10:40:09 +08:00
Sunli
8a63fd67ab
chore: Fix webview example ( #1360 )
2025-10-13 10:10:35 +08:00
Martí Gimeno Ortí
32b8d65075
plot: Add StepAfter kind to StokeStrike ( #1356 )
...
Implements new `StokeStrike::StepAfter` for plot component
<img width="1700" height="1030" alt="step-after-plot-stoke-style"
src="https://github.com/user-attachments/assets/89252ba9-2834-4c9a-9020-7977ffea6865 "
/>
2025-10-13 09:59:51 +08:00
richerfu
20ddb88e95
input: impl Selectable for TextInput that allow it as tigger for popover ( #1353 )
2025-10-12 21:20:38 +08:00
Jason Lee
bfe99a2d33
doc: Update Longbridge app screenshot. ( #1348 )
2025-10-10 21:37:03 +08:00
Jason Lee
6817c8d3cc
menu: Add AppMenuBar. ( #1338 )
...
- input: Change Input to not unselect when blur.
- popup_menu: Fix get key binding on PopupMenu with action context.
<img width="935" height="694" alt="image"
src="https://github.com/user-attachments/assets/295fa84e-f1d8-4f6f-8a77-601a45f8ad6d "
/>
## TODO
- [x] Keyboard support.
- [x] Add submenu to example.
- [ ] ~~Icon~~ and check support. Wait
https://github.com/zed-industries/zed/pull/39876
2025-10-10 21:03:16 +08:00
Jason Lee
d364402a94
editor: Fix code actions not display. ( #1347 )
2025-10-10 19:28:59 +08:00
Floyd Wang
d4b0aff534
button: Fix the on_hover does not respond ( #1346 )
2025-10-10 10:52:05 +08:00
ihavecoke
9d01ac26bc
menu: Fix submenu item selection when multiple submenus exist ( #1342 )
...
Before:
https://github.com/user-attachments/assets/8653953e-4e9d-49e6-946a-1696ea6abee0
After:
https://github.com/user-attachments/assets/f5bfbf19-69e1-4e64-81c1-072c61e8a8f7
---------
Co-authored-by: Jason Lee <huacnlee@gmail.com>
2025-10-09 21:32:51 +08:00
Floyd Wang
7a8be9a628
button: Add Support for on_hover event ( #1341 )
2025-10-09 18:43:50 +08: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
Jason Lee
1fce2e1ac4
menu: Improve MenuItem paddings and fix submenu support. ( #1339 )
...
Fix #1332 was broken submenu selection.
2025-10-09 10:52:33 +08:00
Jason Lee
1db3e03fc3
context_menu: Fix subscription leak. ( #1337 )
2025-10-08 16:02:21 +08:00
Floyd Wang
66851c55e4
Bump gpui ( #1336 )
2025-10-08 11:20:06 +08:00
ihavecoke
d47b9c15ed
menu: Add flex property to custom element in popup menu items for better layout ( #1335 )
2025-10-08 11:04:21 +08:00
Floyd Wang
c3954b0455
input: Implement styled for number input ( #1333 )
2025-10-08 10:36:28 +08:00
Jason Lee
c579db975f
menu: Better handle hover for menu item. ( #1332 )
...
Follow #1328 to improve again.
2025-10-08 10:17:08 +08:00
Jason Lee
d0396d779e
editor: Add document_colors LSP. ( #1329 )
2025-10-06 18:08:12 +08:00
Jason Lee
efe7e14e88
menu: Unselect menu item when mouse move out. ( #1328 )
2025-10-06 09:45:45 +08:00
Jason Lee
794f4d6397
editor: Add to support move vertical for soft wrapped lines. ( #1312 )
2025-10-03 18:19:37 +08:00
Jason Lee
f59bac8c8b
tab_bar: Let normal/active tab has same border to avoid flash on active change. ( #1327 )
2025-10-03 16:30:28 +08:00
Jason Lee
a48232cefd
input: Clean to reset selection and scroll offset. ( #1326 )
...
- Focus back to input when click `clean` button.
2025-10-03 16:11:27 +08:00
Floyd Wang
9754cab4d7
button: Bind element ID after button is created ( #1325 )
...
- Fix the selected-state error in the popup menu.
2025-10-03 14:52:53 +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
Floyd Wang
4d459ea160
chore: Remove debugging logs
2025-10-03 13:37:45 +08:00
Jason Lee
cfd060b66d
editor: Split Input and Editor background color. ( #1323 )
...
Keep input to use window background color, the `editor.background` only
for Editor mode.
2025-10-03 11:20:01 +08:00
Jason Lee
e84e8ebaad
button: Fix button label display has overflow hidden. ( #1322 )
2025-10-03 10:18:00 +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
4ee64cc661
theme: Update theme schema to remove card and add group_box. ( #1321 )
2025-10-02 15:29:08 +08:00
Jason Lee
463f01bb16
theme: Update macos-clasic dark theme color. ( #1320 )
...
<img width="1073" height="1006" alt="image"
src="https://github.com/user-attachments/assets/625df905-b2f9-405f-a806-4574209d39de "
/>
<img width="908" height="893" alt="image"
src="https://github.com/user-attachments/assets/2d816d64-2e69-43dc-a707-a49e5f9842d4 "
/>
2025-10-02 14:46:27 +08:00
Floyd Wang
df8bcefaaa
tag: Implement styled for custom style ( #1319 )
2025-10-02 14:07:07 +08:00
Xu Desheng
8c6cde3719
highlighter: Use clip_offset to ensure UTF-8 char boundaries ( #1317 )
...
## Problem
SyntaxHighlighter panics when highlighting text containing multi-byte
UTF-8 characters (Chinese, Japanese, emoji, etc).
**Error**: `thread 'main' panicked at
ropey-2.0.0-beta.1/src/rope.rs:694:59`
**Root Cause**: tree-sitter may return byte offsets that fall in the
middle of multi-byte UTF-8 characters. When `Rope::slice()` receives
such offsets, it checks `is_char_boundary()` and panics with
`NonCharBoundary` error.
## Solution
Use `RopeExt::clip_offset()` to adjust byte offsets to the nearest char
boundaries before calling `slice()`.
**Changes**:
- Line 395-398: Clip offsets in main highlighting loop
- Line 441-443: Clip offsets when extracting injection content
- Line 478-479: Added explanatory comment for injection highlighting
- Added imports for `RopeExt` and `Bias`
**Safety**:
- `Bias::Left` for start offset ensures we don't skip the beginning of a
character
- `Bias::Right` for end offset ensures we include the full character
- The adjustment is minimal (at most 3 bytes for UTF-8)
- Uses existing project API (`RopeExt::clip_offset`)
## Testing
Tested with:
- ✅ Chinese text: "你好世界"、"**加粗中文**"
- ✅ Japanese text: "こんにちは"、"日本語"
- ✅ Emoji: "😀 🎉 ✨ 🚀 "
- ✅ Markdown syntax highlighting with CJK characters
- ✅ Code blocks with mixed languages
All tests pass without panics. Syntax highlighting works correctly. No
performance degradation observed.
## AI Assistance
🤖 This fix was developed with AI assistance (Claude). The solution
approach (using `clip_offset`) was identified through code analysis and
testing. The AI analyzed:
- ropey source code to understand the panic condition
- Existing usage of `clip_offset` in the codebase
- Tree-sitter byte offset behavior with UTF-8
All code has been reviewed and tested by humans, and further validated
by Gemini AI.
## Checklist
- [x] Follows existing code style
- [x] One PR does one thing (UTF-8 panic fix only)
- [x] All manual tests pass
- [x] Tested with real multi-byte UTF-8 content
- [x] No breaking changes
- [x] No performance regression
2025-10-02 12:14:07 +08:00
Jason Lee
de4a7a7026
doc: Update Iced editor info.
2025-09-30 16:50:41 +08:00
Jason Lee
935cd93f5a
chore: Fix rust logo URL in test.md.
2025-09-30 16:29:56 +08:00
Jason Lee
f4d3daa72a
theme: Fix Ayu theme comment color. ( #1316 )
2025-09-30 16:17:28 +08:00
Sunli
d619e00ecb
input: Only recreate the TextView used to display hover information when necessary. ( #1313 )
2025-09-30 16:11:32 +08:00
Jason Lee
69af1be6e5
chore: Update GPUI and fix DeferredScrollToItem API changes. ( #1315 )
2025-09-30 16:10:25 +08:00
Jason Lee
8b0898147f
editor: Fix Editor crash when text is empty to display placeholder. ( #1314 )
2025-09-30 16:07:03 +08:00
Sunli
591cfc8dab
text_view: Use weak references to the state in async task to avoid memory leaks. ( #1311 )
2025-09-30 15:26:59 +08:00
Sunli
880c019fb8
text_view: Reworks TextView to defer state initialization until first layout. ( #1310 )
2025-09-30 13:50:27 +08:00
Jason Lee
d5ae887cbb
editor: Fix hover definition to immediately hide when move out. ( #1309 )
2025-09-30 11:29:59 +08:00
Jason Lee
f92944546f
chore: Disable tab stop for some popover elements. ( #1306 )
2025-09-29 18:11:25 +08:00
Jason Lee
03cf48a783
input: Avoid scroll on select all. ( #1305 )
2025-09-29 17:49:59 +08:00
Jason Lee
6028de3b5a
editor: Input enter to get next indent level performance. ( #1304 )
...
Now we can handle about 1M lines.
https://github.com/user-attachments/assets/cb55cd18-6755-40cd-a5b0-3d0f865d12e1
2025-09-29 17:35:58 +08:00
Jason Lee
aca03d47c0
input: Fix Input to unselect on blur. ( #1303 )
2025-09-29 17:29:11 +08:00