Commit graph

1012 commits

Author SHA1 Message Date
Floyd Wang
634ab14306 button: Use muted foreground as disabled text color (#1088) 2025-07-24 14:19:10 +08:00
Cyandev
e9d8741835
scrollbar: Fix content size (#1086)
Caused by PR #1078 incorrect changes, and GPUI was changed API
https://github.com/zed-industries/zed/pull/34832

The content size of the scrollable area should be its max scroll offset
plus the container size.

---------

Co-authored-by: Jason Lee <huacnlee@gmail.com>
2025-07-24 10:20:04 +08:00
Jason Lee
fcf447d612
theme: Fix scrollbar default color and list hover color. (#1085) 2025-07-23 11:50:42 +00:00
Floyd Wang
6d28cce719
notification: Fix display issues caused by the taffy upgrade (#1084) 2025-07-23 19:12:13 +08:00
Jason Lee
f458cb83f8
accordion: Fix accordion to size full. (#1083)
- Remove `accordion.background` color from themes.
2025-07-23 10:45:02 +00:00
Floyd Wang
a2b91a7a2b
input(state): Provide context to the validate method (#1082) 2025-07-23 14:30:16 +08:00
Jason Lee
271116926c
code-editor: Add go_to_line method to CodeEditor. (#1081)
- Fix to emit `enter` press key in Input single-line mode.
2025-07-23 13:33:09 +08: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
61b7e54bfa
table: Refactor the Table API for describe the columns. (#1072)
## Break Changes

- The `ColFixed` has renamed to `ColumnFixed`.
- The `ColSort` has renamed to `ColumnSort`.

### TableDelegate

- Removed `col_name`, `col_resizable`, `col_selectable`, `col_width`,
`col_sort`, `col_fixed`, `col_paddings`, `col_movable` method, now use
`col` method to return a TableCol for describe of them.
- The `cols_count` method renamed to `columns_count`.

    ```diff
    - fn cols_count(&self, _: &App) -> usize
    + fn columns_count(&self, _: &App) -> usize
    ``` 
- The `move_col` has renamed to `move_column`.
- The `visible_cols_changed` has renamed to `visible_columns_changed`.

### TableEvent

```diff
- TableEvent::SelectCol
+ TableEvent::SelectColumn
- TableEvent::MoveCol
+ TableEvent::MoveColumn
- TableEvent::ColWidthsChanged
+ TableEvent::ColumnWidthsChanged
```
2025-07-21 11:16:35 +08:00
Floyd Wang
b7f443b73f
label: Streamline the test cases (#1074) 2025-07-18 17:10:36 +08:00
Floyd Wang
b553ca8dcc
label: Add support for highlighting specified text (#1073)
<img width="1712" height="1312" alt="SCR-20250718-ogsp"
src="https://github.com/user-attachments/assets/5f0043ef-77c7-4d91-ad99-4061b14497ff"
/>
<img width="1712" height="1312" alt="SCR-20250718-oguh"
src="https://github.com/user-attachments/assets/ed0bf114-37d0-458d-9321-82766fe75076"
/>
2025-07-18 16:33:36 +08:00
Jason Lee
7f3f2a3940
button: Fix selected style for outline button. (#1070) 2025-07-17 14:20:19 +08:00
Jason Lee
6a3a5f8a4c theme: Fix missed key warnings in theme files. 2025-07-17 11:54:19 +08:00
Jason Lee
3fd2fd9293 chore: Remove danger.foreground, danger.background from the required list in jsonschema. 2025-07-17 11:50:34 +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
9166c1db25
Add .theme-schema.json 2025-07-16 18:23:38 +08:00
Jason Lee
ed75659765
table: Update to standardization the TableDelegate API. (#1067)
## Break Changes

- Renamed some method name of the TableDelegate.

```diff
- fn can_select_col
+ fn col_selectable

- fn can_resize_col
+ fn col_resizable

- fn col_padding
+ fn col_paddings

- fn can_move_col
+ fn col_movable
```

- Removed `fn can_loop_select` remove TableDelegate, instead of to use
`loop_selection` option on `Table`.
2025-07-16 17:11:49 +08:00
Jason Lee
ea1f5331c8
input: Hide cursor and selection when window is deactivated. (#1066) 2025-07-16 14:01:46 +08:00
Jason Lee
eca7949583
input: Update input behaviors to do not unselect on blur or press escape. (#1065)
- Also to pub `unselect` for manually use, and fix this method will
incorrect to move right 1 char.
2025-07-16 13:29:58 +08:00
Jason Lee
0fbe32c7d7
highlighter: Fix to support custom language register. (#1064) 2025-07-15 19:24:25 +08:00
Jason Lee
ffa0a2eb3a theme: Fix catppuccin theme button color. 2025-07-15 18:41:33 +08:00
Jason Lee
ac026e26c9
theme: Improve theme color fallbacks and add more themes. (#1063) 2025-07-15 18:33:36 +08:00
Jason Lee
51f03b926e
theme: Compact theme config files. (#1062) 2025-07-15 16:54:10 +08:00
Jason Lee
d139198c15
theme: Impl Default for Theme. (#1061) 2025-07-15 16:35:12 +08:00
Jason Lee
c9b5993472
story: Improve story case style. (#1060) 2025-07-15 11:56:07 +08:00
Jason Lee
cfd1551575
theme: Add more theme and fix to use default color from base color. (#1058) 2025-07-14 20:17:11 +08:00
Jason Lee
6508927e7f
input: Add appearance option to NumberInput, Dropdown, DatePicker to render without style. (#1054)
<img width="1100" height="935" alt="image"
src="https://github.com/user-attachments/assets/b213c778-eef0-4d63-8d07-b68da9a078b1"
/>
2025-07-14 19:57:56 +08:00
Jason Lee
867b4ff3a6
dock: Open dock if clicked on the tab of the collapsed bottom dock. (#1057) 2025-07-14 18:49:31 +08:00
Jason Lee
1df450d3b0
story: Fix tiles story. (#1056) 2025-07-14 18:06:46 +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
82b87d92ab
text_view: Fix nested Blockquote render in Markdown and HTML. (#1053)
<img width="986" height="271" alt="image"
src="https://github.com/user-attachments/assets/1de04629-2bdc-48f2-ae69-45c33482aeff"
/>

- Also fixed short language name in code block, e.g.: `rs` -> `rust`.
2025-07-14 14:30:40 +08:00
Floyd Wang
3b759cd448
plot: Use f32 instead of f64 (#1052)
## Break Change
- Convert all `f64` parameters to `f32`.

Since the GPUI geometry module uses f32 for rendering, we are also
switching to f32. This helps avoid many as operators and unnecessary
conversions.
2025-07-08 16:24:59 +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
463c3ebfea
chore: Remove unnecessary examples that have includes in gallery. (#1049) 2025-07-07 12:11:19 +08:00
Jason Lee
40a2467374
virtual_list: Add element state to cache item size calculate. (#1048) 2025-07-07 11:47:35 +08:00
Jason Lee
4156c831c6
chore: Refactor code for Input. (#1046) 2025-07-05 14:37:12 +08:00
Jason Lee
89ee8c0630
otp_input: Fix to keep showing focus border when all code has filled. (#1047)
https://github.com/user-attachments/assets/dd10793e-668e-4c01-9bc9-fe00b539a5d1
2025-07-05 14:12:20 +08:00
Jason Lee
1f46b6b81c
story: Add more case to markdown example. (#1045) 2025-07-04 16:35:30 +08:00
Jason Lee
9b0ce145f6
alert: Improve Alert styles. (#1044)
<img width="1201" alt="image"
src="https://github.com/user-attachments/assets/7484132b-8bdd-4353-a6f0-f038189d9b15"
/>
2025-07-04 15:29:05 +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
1a4b7ce76a
highlighter: Fix some case update will get incorrect syntax highlight. (#1041) 2025-07-04 12:46:59 +08:00
Jason Lee
1069469c46
theme: Update secondary color and fix toggle selected color. (#1039)
<img width="1712" alt="image"
src="https://github.com/user-attachments/assets/9ec4f4ea-f318-4db6-b9cd-7911cc4f9462"
/>
<img width="1712" alt="image"
src="https://github.com/user-attachments/assets/85d52c62-1e51-49d3-905e-30865555cfd8"
/>

<img width="1712" alt="image"
src="https://github.com/user-attachments/assets/eb71f364-730d-4f55-a84d-95235a3545f0"
/>
<img width="1712" alt="image"
src="https://github.com/user-attachments/assets/3383e8f7-500d-4348-b391-c764a35fd6a9"
/>
2025-07-03 19:23:40 +08:00
Jason Lee
6886ae746e
story: Add Indicator, Skeleton story. (#1038) 2025-07-03 18:54:23 +08:00
Jason Lee
d70d649a67
story: Move DescriptionList into main story. (#1037) 2025-07-03 18:09:30 +08:00
Jason Lee
4075447c63
text_view: Fix list item to merge inline paragraphs, and fix paragraphs margin. (#1036)
## Before

<img width="1712" alt="image"
src="https://github.com/user-attachments/assets/579385e6-a206-45e4-80a1-e1e2cdd6b164"
/>

## After

<img width="1712" alt="image"
src="https://github.com/user-attachments/assets/2f551d22-5662-4c3c-a0e5-5ce9f26e1e66"
/>
2025-07-03 18:02:08 +08:00
Jason Lee
9eb7e10a1d
button: Adjust outline button active color. (#1035) 2025-07-03 15:35:19 +08:00
Floyd Wang
f4025a9447
form: Fix label text wrapping issue (#1034)
| Before | After |
| - | - |
| <img width="752" alt="image"
src="https://github.com/user-attachments/assets/32abd11a-39c6-4045-9727-3188c46e482c"
/> | <img width="752" alt="image"
src="https://github.com/user-attachments/assets/98e45484-1c05-4d90-977f-efd9b89d9dd9"
/> |
2025-07-03 15:09:57 +08:00
Copilot
51f36e1256
doc: Add GitHub Actions build status badge to README.md (#1032) 2025-07-03 11:41:34 +08:00