Commit graph

750 commits

Author SHA1 Message Date
Floyd Wang
9d3b673c96
CI: Reopen machete (#755)
https://github.com/longbridge/gpui-component/pull/663
2025-03-31 18:24:53 +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
f34ebdf621
theme: Update table_head_foreground (#753) 2025-03-31 15:12:54 +08:00
Floyd Wang
13de7d5a7e
chore: Update GPUI 2025/03/31 (#752) 2025-03-31 10:31:39 +08:00
Floyd Wang
417e097b1a
dock: Add tab_name for collapsed tab panels (#751) 2025-03-28 11:44:34 +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
aadcf4e1df
accordion: Fix toggle accordion item. (#749)
Close #740

![CleanShot 2025-03-27 at 11 25
54](https://github.com/user-attachments/assets/7aa2e9ed-a3f2-4683-854a-bc1768912f54)
2025-03-27 14:22:00 +08:00
Floyd Wang
26b59ea23e
story: Sync number input value when changed (#748)
Closed #741 


https://github.com/user-attachments/assets/ec572918-a574-4adb-a8c0-c59010dc4d5e
2025-03-27 11:27:38 +08:00
Jason Lee
05fea87ec4
example: Fix modal example button id. (#747)
Ref #740

- Fix modal example button id.
- Fix switch example to allow check.
2025-03-27 11:24:06 +08:00
Jason Lee
e8f89e04d6
button: Update ButtonCustomVariant default variable value to use transparent. (#746) 2025-03-27 10:43:40 +08:00
Jason Lee
17926cea16
button: Add warning, success, info variant to Button. (#745)
<img width="1342" alt="SCR-20250327-jfzq"
src="https://github.com/user-attachments/assets/7c44458a-9467-4095-9cd6-1dcb35cc351b"
/>
<img width="1342" alt="SCR-20250327-jgak"
src="https://github.com/user-attachments/assets/07d33d60-f581-46d4-9a54-174e56ab82ca"
/>
2025-03-27 10:15:53 +08:00
Jason Lee
e582d22f11
sidebar: Fix collapsed to display icon only. (#743)
<img width="1056" alt="image"
src="https://github.com/user-attachments/assets/162f9e47-72ef-47c2-b3a4-9bc10682a624"
/>
2025-03-27 09:35:01 +08:00
Angelk90
a70a0f168d
i18n: Add italian (#738) 2025-03-26 21:54:30 +08:00
Jason Lee
a587c87a85
doc: Update Contributing Guide. (#739)
Close #737
2025-03-26 21:46:42 +08:00
Jason Lee
814ea0e824
alert: Add to support styled. (#736) 2025-03-25 15:04:28 +08:00
Jason Lee
22d9394266
alert: Add Alert. (#735)
![](https://github.com/user-attachments/assets/dd0436b7-6821-49a2-8a7a-cf43285cd49e)

![image](https://github.com/user-attachments/assets/56e17233-f9ea-4be6-afed-16ef39ffb06c)

<img width="821" alt="image"
src="https://github.com/user-attachments/assets/6350f48b-6ced-4063-b115-06422d49b92c"
/>
<img width="821" alt="image"
src="https://github.com/user-attachments/assets/3d71688a-b0ca-4223-a097-858388a47f6d"
/>
<img width="821" alt="image"
src="https://github.com/user-attachments/assets/ec3af860-0f8f-420b-9da7-f390c4742492"
/>
<img width="821" alt="image"
src="https://github.com/user-attachments/assets/d9a85c06-209a-4ef9-ac9a-8456491fedc6"
/>
2025-03-25 14:10:24 +08:00
Jason Lee
f650491605
menu: Add external link icon to link menu item. (#734)
<img width="403" alt="image"
src="https://github.com/user-attachments/assets/ad6682b6-2114-4f55-be84-d06c02ae401e"
/>
2025-03-24 22:30:29 +08:00
Jason Lee
e0f4a7d3cd
menu: Add label item to PopupMenu. (#733)
<img width="883" alt="image"
src="https://github.com/user-attachments/assets/06071f62-ddd3-4f9e-ae2f-82b583089792"
/>
2025-03-24 22:04:47 +08:00
Floyd Wang
f759cc5023
calendar: Fix duplicate IDs cause click events not respond (#732) 2025-03-24 20:01:29 +08:00
Jason Lee
8a3b858d1a
tabs: Add menu to TabBar to display more items. (#731)
<img width="752" alt="image"
src="https://github.com/user-attachments/assets/a7efb600-553a-4b78-a8f4-aaba504d44f0"
/>

- tabs: Use default cursor when Tab is disabled.
- popup_menu: Add to support add menu item with disabled state.
2025-03-24 18:05:54 +08:00
Floyd Wang
760c0597eb
description_list: Fix incorrect align items for horizontal layout (#730)
| Before | After |
| - | - |
| <img width="539" alt="image"
src="https://github.com/user-attachments/assets/ecd997b5-1f59-4c41-83a3-dfdee6b1be8a"
/> | <img width="556" alt="image"
src="https://github.com/user-attachments/assets/1088d466-1635-45c3-b578-9ada1c960d66"
/> |
2025-03-24 17:15:46 +08:00
Jason Lee
12e3678e55
description_list: Update label_width type to accept any Into<DefiniteLength>. (#729) 2025-03-24 15:29:50 +08:00
Jason Lee
ffa36c1c5b input: Add focused_input, has_focused_input method to Root. #727
Add this to save current focused Input, this used to avoid some special keybinding conflict.

For example: `/` as ToggleSearch, if on this action, we can check is there `has_focused_input` to decide to ignore or handle action.

- dock: Rename toggle button visible method.
2025-03-21 17:34:32 +08:00
Floyd Wang
9d2a70be48
svg_img: Reduce ImageSource creation (#728) 2025-03-21 17:22:12 +08:00
Jason Lee
393e7e8f85 story: Update layout state file location on release mode. 2025-03-21 17:17:35 +08:00
Floyd Wang
0d1c40a56a
dock: Support hide dock toggle buttons (#726) 2025-03-21 11:55:02 +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
Jason Lee
c98e4f0521
checkbox: Add children to Radio, Checkbox to display long texts. (#724)
This change is going to solve the wrapped text line-height.

Before this change, the Label is must set `line-height: 100%` to render
at same line with the checkbox.

But if there have a long text in label, wrapped lines need more
line-height to leave lines spaces. But if we set line-height over the
100%, that the checkbox will not align horizontal center.

So, this change to use other child to solve this issue, we can set
line-height to the child not to the label.


<img width="1204" alt="image"
src="https://github.com/user-attachments/assets/981cf925-01c7-48d7-9dd2-881c727a1759"
/>
2025-03-20 19:12:48 +08:00
Floyd Wang
49e8b06ccb
label: Fix typo (#722) 2025-03-19 14:15:49 +08:00
Jason Lee
88325ea14b
input: Add insert and replace method to Input. (#721)
Close #719 

https://github.com/user-attachments/assets/aed24aef-c69f-4512-81bb-bb7e4a6de14e
2025-03-17 22:40:09 +08:00
Jason Lee
a0c7d0b791
tab: Adjust underline tab style. (#720)
<img width="1293" alt="image"
src="https://github.com/user-attachments/assets/bd0cdd71-9e83-460a-8224-f255a590f2ac"
/>
2025-03-17 21:50:39 +08:00
Floyd Wang
7442aa1fba
dock: Fixed panels will lose height when dragged to minimum (#718)
## Before


https://github.com/user-attachments/assets/c49464bf-6106-422b-b948-83c5b4c4de60

## After


https://github.com/user-attachments/assets/b83fba18-ecfd-458f-8f25-5d59a60a66cb
2025-03-14 15:55:51 +08:00
Floyd Wang
8e7ef5631e
dropdown_button: Support outline style (#716) 2025-03-12 17:23:37 +08:00
Jason Lee
87b8958059
modal: Use bold text for Modal title. (#715)
<img width="995" alt="image"
src="https://github.com/user-attachments/assets/3e9ba919-eb91-4e8d-ba89-3a85e263e550"
/>
2025-03-12 11:57:59 +08:00
Jason Lee
6da7de5299
button: Improve Button to support combine outline with other variants. (#714)
<img width="1385" alt="image"
src="https://github.com/user-attachments/assets/240df695-bfd5-4680-89a2-2640db206b24"
/>
2025-03-12 11:57:25 +08:00
Jason Lee
89170eea1d
color_picker: Add icon use icon as color picker button. (#711) 2025-03-11 21:14:14 +08:00
Jason Lee
d0abcb2456
switch: Fix switch label to vertical center. (#710)
<img width="775" alt="image"
src="https://github.com/user-attachments/assets/c004e552-c161-4e09-9543-13727382204b"
/>
2025-03-11 20:55:58 +08:00
Jason Lee
c2dddf6f55
input: Update gap between input and prefix, suffix. (#709)
<img width="813" alt="image"
src="https://github.com/user-attachments/assets/9d99a74a-92b6-44f5-bf33-35ddef6a7ca0"
/>
2025-03-11 20:40:50 +08:00
Jason Lee
df94217999
tiles: Fix back panels flick when hover on top panel in tiles. (#708)
- Move resize handle out of the panel to avoid conflict with scrollbar.
2025-03-11 19:56:50 +08:00
Jason Lee
d8ec1ee516
title_bar: Fix TITLE_BAR_HEIGHT const to it actually height 34px. (#707) 2025-03-11 18:50:32 +08:00
Jason Lee
5e4e810c0d
description_list: Add to support border style to DescriptionList vertical layout. (#706)
<img width="899" alt="image"
src="https://github.com/user-attachments/assets/38108d88-7b27-4964-8b1d-07b81522698b"
/>
<img width="980" alt="image"
src="https://github.com/user-attachments/assets/c4467a72-0011-486b-9918-af21297b8c3e"
/>
<img width="980" alt="image"
src="https://github.com/user-attachments/assets/21e8fc31-1642-4ab4-b180-01aea6e81b38"
/>
<img width="980" alt="image"
src="https://github.com/user-attachments/assets/65a02a85-7538-4b6f-83e5-33502c30367e"
/>
2025-03-11 17:59:56 +08:00
Jason Lee
65fad70c21
menu: Fix min_w support to PopupMenu. (#705) 2025-03-11 13:41:41 +08:00
Jason Lee
d451ce5c2d
menu: Add menu_element_with_icon, menu_element_with_check to PopupMenu. (#704)
- Added `menu_element_with_icon` and `menu_element_with_check` method to
PopupMenu.

<img width="317" alt="image"
src="https://github.com/user-attachments/assets/d32575e3-25fc-4d6f-bde2-ec5bc5f238dd"
/>


## Break changes

- menu: Renamed `menu_with_element` method to `menu_element`.
2025-03-11 11:18:43 +08:00
Jason Lee
6a00cfcc4a
text_view: Fix HTML render to support blockquote. (#703)
<img width="850" alt="image"
src="https://github.com/user-attachments/assets/4d8f662f-aebe-4c40-bc56-828627f16064"
/>
2025-03-10 22:53:53 +08:00
Floyd Wang
81e6da503b
chore: Remove unused feature (#702) 2025-03-10 22:17:27 +08:00
Jason Lee
61bb78d174
tab: Update default tab size padding x to match with Panel's padding. (#701)
- Fix muted_foreground in dark mode.
- Fix secondary button active color in dark mode.
- Fix to ensure render last empty space when TabBar have suffix.

<img width="1203" alt="image"
src="https://github.com/user-attachments/assets/65144893-6705-4087-87f3-7e478eaa1405"
/>
<img width="1203" alt="image"
src="https://github.com/user-attachments/assets/0fe3b72b-11f5-4917-959c-a2c88ba0213c"
/>
2025-03-10 21:23:00 +08:00
Jason Lee
54d74a9617
kdb: Add min width 20px to Kdb. (#700)
<img width="358" alt="image"
src="https://github.com/user-attachments/assets/824a0cdd-e03b-49f4-bde6-b77ae0ab48cd"
/>
2025-03-10 17:12:43 +08:00
Jason Lee
4db0fd5819
kbd: Use background for Kbd. (#699) 2025-03-10 17:03:41 +08:00
Jason Lee
3e4a3ed046
tag: Add color to Tag to support more colors. (#698)
- Add `ColorName` enum.

<img width="588" alt="image"
src="https://github.com/user-attachments/assets/20670946-1a4f-45ff-b5ac-81e7eb760242"
/>

<img width="586" alt="image"
src="https://github.com/user-attachments/assets/7ce4a87f-fa6b-4794-83c5-3f18e6d09dcb"
/>
2025-03-07 21:41:04 +08:00
Jason Lee
4c9c7980ee
chore: Upgrade GPUI 2025/03/07 (#697) 2025-03-07 20:22:58 +08:00