Jason Lee
64e3653bc9
modal: Add scrollbar to modal again. ( #971 )
2025-06-17 18:49:49 +08:00
Jason Lee
0e3b61a704
Revert "modal: Add scrollbar to Modal for overflow contents. #960 " ( #970 )
2025-06-17 17:48:42 +08:00
Jason Lee
edf9ed7e5f
input: Fix move up/down to keep same column. ( #968 )
...
Close #908
https://github.com/user-attachments/assets/f050dd1a-501c-4784-a45b-78ba77cdf19c
2025-06-17 15:23:37 +08:00
Jason Lee
3d7f1f8a73
input: Keep showing the blink cursor when typing or moving. ( #967 )
...
https://github.com/user-attachments/assets/3b7d2cfd-50b0-4744-bb74-1deafc5710e3
2025-06-17 14:20:27 +08:00
Jason Lee
869d48b446
input: Fix Input cursor x position when scrolled. ( #966 )
...
https://github.com/user-attachments/assets/db76d3a3-ecd6-45c6-8377-0afa4746f2db
2025-06-17 14:14:23 +08:00
Jason Lee
de491a790c
input: Fix Input prefix, suffix position, and mask * in vertical center. ( #965 )
...
- Fix Input, NumberInput padding x with prefix, suffix.
- Fix Input mask char to render in vertical center.
<img width="498" alt="image"
src="https://github.com/user-attachments/assets/f7b34e17-2503-4a24-9e16-3a30b48bacb5 "
/>
- Fix to only use `Tab`, `Shift-Tab` to indent in multi-line mode.
- Improve blink cursor to render with 1.5px width and same as
line-height.
2025-06-17 13:59:02 +08:00
Floyd Wang
56e282315d
dock: Bind actions only when the tab panel is not collapsed ( #964 )
2025-06-17 13:38:24 +08:00
Floyd Wang
f183236d52
dock: Hide suffix action when tab_panel is collapsed ( #963 )
2025-06-17 11:50:52 +08:00
Jason Lee
60bebaf51f
markdown: Fix Todo list item checkbox style. ( #962 )
...
<img width="394" alt="image"
src="https://github.com/user-attachments/assets/dee22c50-4110-46e3-9205-320809c2ef00 "
/>
2025-06-17 10:50:57 +08:00
Jason Lee
d2633faf82
modal: Add scrollbar to Modal for overflow contents. ( #960 )
...
- Add `overlay` variable to Theme.
<img width="536" alt="image"
src="https://github.com/user-attachments/assets/12ed43c8-00b5-41b1-8cf6-0f31b533525c "
/>
2025-06-16 17:35:02 +08:00
Jason Lee
61283a71f0
scrollbar: Refactor ScrollbarState to have Cell inside. ( #959 )
...
## Break Change
- Now we added `Rc<Cell<>>` inside the ScrollbarState.
```diff
- scroll_state: Rc<Cell<ScrollbarState>>,
+ scroll_state: ScrollbarState,
```
2025-06-16 15:11:52 +08:00
Victor Quiroz
769c0990a4
number_input: Allow signed numbers ( #957 )
...
Allow negative numbers and explicit positive numbers.
Added these tests:
1. Only one sign at the start of the number.
2. No signs in the middle of the number.
3. No signs in the fractional part.
4. Sign doesn't break formatting.
https://github.com/user-attachments/assets/89c4f4c7-d3bf-4cc1-aeca-7e9bedd02e20
---------
Co-authored-by: Jason Lee <huacnlee@gmail.com>
2025-06-16 10:05:37 +08:00
Floyd Wang
aaa855053f
list: Add a default style for empty data ( #955 )
...
<img width="890" alt="image"
src="https://github.com/user-attachments/assets/68339cab-023f-42bc-93cc-0cded1b690b0 "
/>
2025-06-13 15:44:00 +08:00
Jason Lee
89c210c4ca
highlighter: Avoid crash when language not registered. ( #954 )
...
Close #952
Fallback to use plain text to display.
2025-06-12 19:45:29 +08:00
Jason Lee
1032881103
markdown: Add debounce 500ms to update markdown to avoid render slow. ( #953 )
...
Ref #933
2025-06-12 19:15:23 +08:00
Jason Lee
e29b51cc83
popover: Improve PopoverContent to support styled methods. ( #951 )
...
- Add `refine_style` method to `StyledExt`.
- Also improve the Popover example style.
<img width="1053" alt="image"
src="https://github.com/user-attachments/assets/bf435a79-6c34-41ab-802a-29a7600ecd29 "
/>
2025-06-12 15:00:00 +08:00
Jason Lee
d61b0d2510
highlighter: Fix highlight offset and reset highlight when replace all text. ( #950 )
...
- Improve JSON highlights.
<img width="839" alt="image"
src="https://github.com/user-attachments/assets/3f28ae1c-9f07-4df4-a477-f875a26d4c7d "
/>
2025-06-12 14:11:01 +08:00
Floyd Wang
2febe2611b
dock: Use disabled instead of hiding the zoom menu ( #949 )
2025-06-12 12:10:03 +08:00
Jason Lee
ed6adc2dae
input: Simplify newline logic for multi-line text and fix auto-grow lines count. ( #948 )
...
- Fix to only keep indent in CodeEditor mode.
https://github.com/user-attachments/assets/4b926a18-b0b5-4419-97dd-21778cd20fb3
2025-06-12 10:59:41 +08:00
Jason Lee
6ea427549a
input: Add focus_bordered method to toggle Input focus border. ( #946 )
2025-06-11 21:34:37 +08:00
Jason Lee
a3a4f1942d
chart: Update Chart story by use JSON file data. ( #947 )
2025-06-11 21:34:22 +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
f82c347e37
title_bar: Fix pl to override default TitleBar left padding. ( #944 )
2025-06-11 16:52:51 +08:00
Jason Lee
a7505487e1
highlighter: Fix Zig language highlight. ( #942 )
...
<img width="1143" alt="image"
src="https://github.com/user-attachments/assets/62f87eb4-1d16-4165-8504-803aadf1b0fe "
/>
2025-06-11 16:18:38 +08:00
Jason Lee
4c0e13bc8d
radio: Add id to RadioGroup to avoid clicks conflict. ( #941 )
...
## Break Changes
- The `RadioGroup` now require a `id` to init.
```diff
- RadioGroup::horizontal()
+ RadioGroup::horizontal("group-id-1")
- RadioGroup::vertical()
+ RadioGroup::vertical("group-id-2")
```
2025-06-11 15:45:24 +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
Floyd Wang
c333fd7106
notification: Add support for rendering custom content ( #938 )
...
## Break Change
You no longer need to pass a message when creating a new notification.
Instead, use the `message` method.
```diff
- Notification::new("There was a problem with your request.");
+ Notification::new().message("There was a problem with your request.");
```
<img width="1023" alt="image"
src="https://github.com/user-attachments/assets/4b93f2bb-e130-45d6-974f-8b14efac58a4 "
/>
2025-06-10 12:06:02 +08:00
stayhydated
0aceb02302
dropdown: Replace specialized impl From Vec<SharedString> to Vec<T: DropdownItem + Clone> ( #935 )
...
Needed for a proc macro i plan to publish when ready
```rs
#[derive(Clone, DropdownItemFtl, EsFluent, EnumIter, EnumString)]
#[fluent(enumerable)]
pub enum PreferedLanguage {
English,
French,
Chinese,
}
#[derive(Clone, DropdownItemFtl, EsFluent, EnumIter, EnumString)]
#[fluent(enumerable)]
pub enum Country {
UnitedStates,
France,
China,
}
#[derive(GpuiForm)]
pub struct User {
#[gpui_form(component(input))]
pub username: Option<String>,
#[gpui_form(component(input))]
pub email: String,
#[gpui_form(component(number_input))]
pub age: Option<u32>,
#[gpui_form(component(number_input))]
pub balance: Decimal,
#[gpui_form(component(check_box))]
pub subscribe_newsletter: bool,
#[gpui_form(component(switch))]
pub enable_notifications: bool,
#[gpui_form(component(dropdown(searchable)))]
pub country: Option<Country>,
#[gpui_form(component(dropdown()))]
pub preferred_language: PreferedLanguage,
#[gpui_form(component(calendar))]
pub birth_date: chrono::NaiveDate,
#[gpui_form(component(date_picker))]
pub appointment_date: chrono::NaiveDate,
#[gpui_form(component(progress))]
pub completion_percentage: f32,
#[gpui_form(skip)]
pub skip_me: bool,
}
```
2025-06-10 10:08:42 +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
c5201e6de9
input: Revert #929 changed replace_text_in_range result an incorrect cursor pos. ( #930 )
2025-06-09 19:02:09 +08:00
Jason Lee
d648874860
input: Add cmd-], cmd-[ to indent, outdent text. ( #929 )
2025-06-09 18:31:14 +08:00
Jason Lee
6aab9d3345
code-editor: Show hover popover for diagnostics. ( #924 )
...
<img width="719" alt="image"
src="https://github.com/user-attachments/assets/75fa9737-09e1-4baa-b7ac-304e847005c8 "
/>
2025-06-09 16:16:15 +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
Ylin
01197769df
list: Improve the selection method to support more scenarios ( #925 )
2025-06-06 19:50:49 +08:00
Jason Lee
d598e58666
tag: Add rounded to Tag and support outline for all variants. ( #923 )
...
<img width="1316" alt="image"
src="https://github.com/user-attachments/assets/e06f672d-f311-4dc2-b62a-c1f5cbce6973 "
/>
2025-06-06 13:35:24 +08:00
Floyd Wang
e3e00a38b8
Update README
2025-06-06 10:39:00 +08:00
Floyd Wang
936ee27a2c
input: Fix the panic issue in end_of_line ( #922 )
2025-06-06 10:07:11 +08:00
Jason Lee
74de042b60
popup_menu: Do not dismiss PopupMenu when clicked on a submenu item. ( #921 )
2025-06-06 09:25:04 +08:00
Jason Lee
a8f5ced4e6
code-editor: Add markers for display diagnostics to CodeEditor. ( #920 )
...
Ref:
https://microsoft.github.io/monaco-editor/typedoc/functions/editor.setModelMarkers.html


2025-06-05 23:04:01 +08:00
Floyd Wang
9afe0063a4
plot: Fix incorrect tooltip dot left position ( #919 )
2025-06-05 16:25:28 +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
a1bdd50735
story: Reorder story menu
2025-06-04 19:29:32 +08:00
Jason Lee
989e85211a
doc: Update README to add features.
2025-06-04 19:26:41 +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
7934e8af31
story: Fix double border in ResizableStory.
2025-06-04 18:11:00 +08:00
Jason Lee
c97cdd7b89
input: Fix line number width, when line number not enable. ( #916 )
2025-06-03 23:40:21 +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
Floyd Wang
dc1d516a30
button: Impl Selectable for the dropdown button ( #913 )
...
## Break Change
- Add `is_selected` to the `Selectable` trait; Returns true if the
element is selected.
2025-06-02 14:25:18 +08:00