ihavecoke
a5217df13e
Popover content supports setting the maximum width ( #180 )
...
Before:

After:

2024-08-27 22:08:50 +08:00
Jason Lee
7b5efd19bb
Better Panel resize. ( #178 )
...
- Resize panels when windows is resize to smaller #175 .
https://github.com/user-attachments/assets/b2c50949-7310-4d3d-8276-5bf15cf3ba9f
2024-08-27 18:38:37 +08:00
Jason Lee
c5c8e46ac7
New Dock ( #172 )
...
https://github.com/user-attachments/assets/c8c55faa-8f17-4fa2-9f62-5fdd598087ef
- [x] Move to insert panel to tabs middle.
- [x] Zoom panel
- [x] Tab popup menu (Close Panel, Split, Zoom in/Zoom out)
- [x] TabBar scrollable
- [ ] TabBar nav history
2024-08-23 18:01:29 +08:00
Jason Lee
7a00e8a68e
Add search to List example. ( #168 )
...
- Fix drawer, modal open to focus on first input.
2024-08-19 16:13:14 +08:00
Jason Lee
f05d2ebbd2
popup_menu: Add submenu support. ( #165 )
...
- Add submenu support.
- Removed Popover `window` mode, this is not a good design.
https://github.com/user-attachments/assets/0e3735f4-2bfb-459f-a24d-e3440e738d4f
2024-08-19 14:58:28 +08:00
Jason Lee
fd837565c4
Add KeyBinding to MenuItem. ( #164 )
...
<img width="370" alt="image"
src="https://github.com/user-attachments/assets/a0e98260-75ac-4a79-bf24-80d2c82f9507 ">
2024-08-16 18:57:43 +08:00
Jason Lee
4490618c4a
Update table to support to support toggle col selection. ( #159 )
...
- Add `border` method to enable/disable border, default: `true`.
- Update `stripe` default to false.
- Update theme to remove table head color, just use window bg like.
<img width="1263" alt="image"
src="https://github.com/user-attachments/assets/2e0994a9-7172-4812-a0e2-3b3ba4281112 ">
Closes #155
2024-08-16 14:34:53 +08:00
Jason Lee
e86f90d309
Close Dropdown menu on blur. ( #157 )
...
Closes #156
2024-08-16 14:03:45 +08:00
Jason Lee
b3f62bf096
Export with_type and impl FluentBuilder for Notification. ( #154 )
2024-08-15 19:52:37 +08:00
Jason Lee
57dab4d15a
Rename with_id, with_type_id to id, type_id. ( #153 )
2024-08-15 18:05:07 +08:00
Floyd Wang
a02a6ed6b8
Set default true for cleanable & trigger event when dropdown clean ( #152 )
2024-08-15 18:01:43 +08:00
Jason Lee
36475bac76
Add with_type_id to support set a struct as a Notification unique id. ( #151 )
2024-08-15 18:01:32 +08:00
Jason Lee
c9763224c2
Add Notification ( #149 )
...
https://github.com/user-attachments/assets/8a10bff7-f669-471e-8516-2a64ae95ae0a
2024-08-15 16:50:33 +08:00
Jason Lee
6d86e64846
Update modal demo to focus input on open. ( #147 )
2024-08-15 09:45:58 +08:00
Jason Lee
3550b1ee13
Add slide down animation t Modal. ( #141 )
...
- Export cx.active_modal and cx.active_drawer
- Add support custom modal style, and add show_close option.
2024-08-14 17:23:39 +08:00
Jason Lee
b934ff76e6
Add Modal ( #138 )
...
https://github.com/user-attachments/assets/f4c2f9dd-2508-4251-a861-1af3af7542a3
2024-08-13 17:41:12 +08:00
Jason Lee
63f333d8ad
Add Drawer ( #137 )
...
- Update scrollable to accept EntityId.
https://github.com/user-attachments/assets/a6c02890-3a6e-4b82-b5c5-3f0a48f35368
2024-08-13 16:01:52 +08:00
Jason Lee
bb6d8d8f60
Cleanup first version impls ( #132 )
2024-08-11 14:46:55 +08:00
Jason Lee
8f71b807aa
Add Animate ( #130 )
2024-08-09 18:22:06 +08:00
Jason Lee
ebf8a7f6f3
Add Skeleton ( #128 )
...
https://github.com/user-attachments/assets/deb57e8d-f894-41b6-b44b-cc2b4a307429
2024-08-09 15:55:48 +08:00
Jason Lee
5d55c5c31e
Add DateRangePicker ( #123 )
...
https://github.com/user-attachments/assets/cc934401-78c5-42d6-afc8-a365fea2129b
2024-08-08 23:29:54 +08:00
Jason Lee
2c531fa3ef
Add text style to Button with no padding. ( #122 )
2024-08-08 20:13:52 +08:00
Jason Lee
966ce4c2dd
Add link, link_with_icon to PopupMenu, and remove track_focus. ( #121 )
...
- Add `popup_menu` quick API to Button to let easy to use.
2024-08-08 19:50:10 +08:00
Jason Lee
27d094c590
datepicker: Add Year, Month select mode. ( #119 )
...
https://github.com/user-attachments/assets/b6232d8e-0832-449d-a982-49e015232cfa
2024-08-07 23:09:42 +08:00
Jason Lee
ebdcf244e2
Add Calendar and DatePicker. ( #117 )
...
https://github.com/user-attachments/assets/dda87fa7-f080-418a-8dd7-ab8581eb3beb
2024-08-07 20:25:11 +08:00
Floyd Wang
e07f551317
Fix the issue where large sections of label do not wrap ( #118 )
2024-08-07 19:38:48 +08:00
Jason Lee
340c5fef3d
Improve OtpInput to add more size, use Icon to render mask. ( #116 )
...
- Add `default_value`, `set_value`, `masked` method.
- Add `set_value`, `value` method to set/get from OptInput.
<img width="390" alt="image"
src="https://github.com/user-attachments/assets/ef5368e9-132d-4de6-8506-aeecc47a9189 ">
2024-08-07 11:39:02 +08:00
Jason Lee
827f57fb6a
Add Sizable trait to impl small, xsmall, large and apply to Button, Input, Dropdown, Switch. ( #113 )
2024-08-06 17:19:54 +08:00
Jason Lee
f3fdfae002
Fix list next to select first item, cancel to deselect item. ( #110 )
...
- Add confirmed to ListItem to show check style.
2024-08-06 11:31:35 +08:00
Jason Lee
4b61c3c25a
Add ContextMenu ( #107 )
...
https://github.com/user-attachments/assets/1534bb31-1d32-40b8-8871-f41fb182c8e9
2024-08-05 20:54:07 +08:00
Jason Lee
553b6409c0
Improve Dropdown to Add search support and custom icon ( #106 )
...
- Add SearchableVec to let Dropdown support search filter.
- Fix dropdown title overflow.
- Add to support custom dropdown right icon.
https://github.com/user-attachments/assets/b9e28fce-3e0f-44f7-a0f4-3e01f6db31d1
2024-08-05 11:47:55 +08:00
Floyd Wang
12b5d1b501
Add clipboard ( #105 )
2024-08-05 11:35:02 +08:00
Floyd Wang
e784f98a38
TableDelegate methods return ViewContext<Table<Self>> ( #101 )
2024-08-02 16:38:48 +08:00
Floyd Wang
48efdecdef
The button compact method defaults to true ( #99 )
2024-08-02 11:31:40 +08:00
Jason Lee
e9d409a4b1
Add Link style Button ( #97 )
...
<img width="1305" alt="image"
src="https://github.com/user-attachments/assets/ee42d86f-e237-4544-aa2d-1414dabfb55e ">
- Update `primary`, `danger`, `outline`, `ghost`, `link` methods to as a
builder method to just change style.
- Add `compact` used to reduce padding.
<img width="1279" alt="image"
src="https://github.com/user-attachments/assets/ccbd71c0-9157-4ef8-b164-b99ade24cf92 ">
2024-08-01 19:54:35 +08:00
Jason Lee
3dd149e711
Update PopupMenu to support checked style. ( #96 )
...
<img width="256" alt="image"
src="https://github.com/user-attachments/assets/87009870-e426-48e5-9860-ba91b4702ea4 ">
2024-08-01 15:41:00 +08:00
Jason Lee
0e3736e312
Update Dropdown title to use SharedString ( #95 )
2024-08-01 11:00:18 +08:00
Jason Lee
d1c19c5912
Add Link ( #91 )
2024-07-31 14:24:57 +08:00
Jason Lee
d659713555
Fix Label, Checkbox, Radio to support label text wrap. ( #90 )
...
<img width="1102" alt="image"
src="https://github.com/user-attachments/assets/1443378d-54e9-43a4-8bb8-0d0f4581169d ">
2024-07-31 11:49:32 +08:00
Jason Lee
9766a0766b
Fix dropdown to avoid item text wrap. ( #88 )
2024-07-30 19:58:48 +08:00
Jason Lee
6465969c5a
Improve svg_img to use cached assets. ( #87 )
2024-07-30 19:54:27 +08:00
Floyd Wang
73121123f3
Add custom button demo ( #86 )
2024-07-30 11:24:29 +08:00
Jason Lee
8aaeb9383d
Fix dropdown click to lose focus. ( #80 )
2024-07-29 19:00:17 +08:00
Floyd Wang
66698bfe27
Rename dropdown render_empty to empty ( #82 )
...
Also, `OTPInput` to `OtpInput`
2024-07-29 15:37:38 +08:00
Jason Lee
a3df086e79
theme: Fix list, table theme colors. ( #79 )
...
- Fix list, table theme colors.
- Fix table hover bg.
- Add avatar to table list.
- Update dropdown Size:Small style.
2024-07-29 13:52:45 +08:00
Jason Lee
15e9804f08
table: Add sort button to table column. ( #77 )
...
https://github.com/user-attachments/assets/d6a3dc9b-758f-4108-8d1d-d8a3d2dc0dc2
2024-07-28 23:24:55 +08:00
Jason Lee
7bfdfcb2ec
table: Add drag to move col. ( #76 )
...
https://github.com/user-attachments/assets/9964f3da-0376-4b53-b64e-c9652c324aa3
2024-07-28 22:20:23 +08:00
Jason Lee
79958fc95c
Add to support Table column resizing. ( #75 )
...
https://github.com/user-attachments/assets/d56f2cd7-df08-437b-9eea-849d68094e1f
2024-07-28 00:51:37 +08:00
Floyd Wang
11034ec2ac
Improve dropdown render_empty builder result from AnyElement to impl IntoElement for better usage
2024-07-26 17:26:58 +08:00
Floyd Wang
55822144c4
Rename InputOtp to OTPInput ( #74 )
2024-07-26 17:12:23 +08:00
Floyd Wang
d278d85058
Imporve dropdown ( #73 )
...
* Remove min-height
* Provide `render_empty` for custom empty view
* Fix crash when delegate is empty
2024-07-26 14:31:47 +08:00
Jason Lee
2396c918f2
Hide scrollbar when scroll are is small than container. ( #71 )
2024-07-25 15:53:57 +08:00
Floyd Wang
f02c2a82b1
Do not preset padding when input with affix ( #70 )
2024-07-25 11:02:04 +08:00
尹吉峰
7489a4ffdd
Update WebView to pass wry::WebView instance ( #69 )
...
It's much prefer to use `WebViewBuilder` instead of
[WebView::new](https://docs.rs/wry/latest/wry/struct.WebView.html#method.new )
2024-07-24 19:32:05 +08:00
Jason Lee
4c81977639
Fix Label text_align again.
2024-07-24 19:01:43 +08:00
Jason Lee
ed132ad55e
Add more example to Label.
2024-07-24 18:56:32 +08:00
Jason Lee
6b019e3954
Impl InteractiveElement, StatefulInteractiveElement for Scrollable.
2024-07-24 17:59:44 +08:00
Jason Lee
030a706a4c
Refactor ScrollView into scrollable fluent method. ( #68 )
2024-07-24 17:50:50 +08:00
Jason Lee
22a15c7dcc
Update scroll view ( #66 )
2024-07-24 15:41:20 +08:00
Jason Lee
e0103d1d58
Add CI ( #62 )
2024-07-24 10:39:19 +08:00
Floyd Wang
764e7486e7
Set the default cleanable to false for new dropdown ( #63 )
2024-07-24 10:07:11 +08:00
Jason Lee
b4862082f1
Improve list item ( #61 )
2024-07-23 22:08:21 +08:00
Jason Lee
db14f0a2e5
Add pattern and validate to Input for limit input format. ( #59 )
2024-07-23 15:36:08 +08:00
Jason Lee
30f34dc780
Fix button icon color support ( #57 )
2024-07-23 13:45:34 +08:00
Jason Lee
652efd187c
Update list to save the task on the struct.
2024-07-23 10:51:11 +08:00
Jason Lee
faa16fb660
Add ScrollView ( #56 )
2024-07-23 09:38:23 +08:00
Jason Lee
5034152f21
Improved Input prefix, suffix with a builder to support Element. ( #54 )
...
- Add loading to List query input and changed perform_search now return
a Task.
2024-07-22 15:30:07 +08:00
Jason Lee
ca08be7038
Fix Popup modal mouse move crossed to back layer. ( #51 )
2024-07-20 02:39:27 +08:00
Jason Lee
e54d1f600b
Add to masked Label and support children to Button ( #50 )
...
https://github.com/user-attachments/assets/9583ce15-b801-45f9-aafb-54f0ecdf7dc9
- Add masked mode to Label.
- Add to support any children to Button.
- Fix Popover to support selected state style.
2024-07-19 18:54:16 +08:00
Floyd Wang
653222db73
dropdown: Use event instead of callback ( #46 )
...
* Rule: use event for `Render`, use callback for `RenderOnce`
2024-07-18 18:40:32 +08:00
Jason Lee
bac5392e0a
Refactor Slider, Input, InputOtp to use EventEmiter to emit change ( #45 )
2024-07-18 18:38:58 +08:00
Jason Lee
f6146220e4
Add WebView ( #2 )
...
- https://github.com/huacnlee/zed/pull/6
- https://github.com/zed-industries/zed/pull/13730
2024-07-18 18:00:23 +08:00
Floyd Wang
91e123e942
input: TextEvent Add Focus & Blur events
2024-07-18 17:48:57 +08:00
Floyd Wang
07a1f3099e
dropdown: Add on change callback
2024-07-18 16:50:30 +08:00
尹吉峰
4ccbe9bd71
Update Dropdown ( #42 )
2024-07-18 16:12:12 +08:00
Jason Lee
b8a7d6a2dd
Change InputOpt default masked: false and publish masked method.
2024-07-17 18:57:19 +08:00
Jason Lee
c7336fd5ea
Add InputOtp ( #40 )
...
https://github.com/user-attachments/assets/c92da4e7-21de-436f-968d-7cb47fa31aed
2024-07-17 18:49:41 +08:00
Jason Lee
d71b697f41
Add Slider ( #39 )
...
https://github.com/user-attachments/assets/a1799cd9-45af-413c-b32b-c60fb1b8d586
2024-07-17 16:01:27 +08:00
Jason Lee
3aaa348fbb
Add label support to horizontal Divider.
2024-07-17 14:11:17 +08:00
Jason Lee
ac3d6760ed
Fix vertical Divider
2024-07-17 13:59:20 +08:00
Jason Lee
702863eb83
Add overflow scroll support to Input. ( #37 )
...
Continue #27
- Fix cut and paste invalid replace range.
- Add `Shift-Home`, `Shift-End` for select to home or end.
## Show case
https://github.com/user-attachments/assets/d99c56e3-5241-46e2-b3ac-f72ef962b0b5
2024-07-17 10:31:17 +08:00
Jason Lee
07e1296916
Add cleanable to Input ( #36 )
2024-07-16 19:44:16 +08:00
Jason Lee
ce7c1a3a34
Add Small, Large size support to Input and Dropdown and let them use same height. ( #35 )
...
- Add `Dropdown::string_list` to use `Vec<SharedString>` to create
dropdown for easy use.
- Add `input_px`, `input_py`, `input_h` trait methods to `Styled`
element.
2024-07-16 15:14:12 +08:00
Jason Lee
2b184ca8d5
New Scrollbar ( #33 )
...
https://github.com/user-attachments/assets/30d890bc-49cc-4abe-8652-387ddbb73198
2024-07-16 12:00:51 +08:00
Floyd Wang
b1bb22fd1d
Fix clippy warning
2024-07-15 11:42:14 +08:00
Jason Lee
4ca98029dd
Fix placeholder style for Input ( #32 )
...
https://github.com/huacnlee/gpui-component/issues/27
2024-07-13 09:53:03 +08:00
Jason Lee
0d6d1c95d0
Fix ProgressBar example to avoid over the range.
2024-07-12 23:27:37 +08:00
Jason Lee
7c99584862
Add Indicator ( #25 )
...
https://github.com/user-attachments/assets/cd6410ca-e1c7-459e-8455-d76506b6d305
2024-07-12 17:33:05 +08:00
Floyd Wang
58dbf88af7
Add Radio ( #24 )
2024-07-12 16:37:31 +08:00
Jason Lee
2401d5d5a4
Add ResizablePanel ( #22 )
...
https://github.com/user-attachments/assets/b4067c1d-0ef0-4de4-bd7a-55f446d35ff0
2024-07-12 15:24:54 +08:00
Jason Lee
9e935bed56
Change switch use mouse_down to handle event fix Windows switch theme support.
2024-07-11 21:52:07 +08:00
Floyd Wang
e1aed0a03d
Add Progress ( #21 )
2024-07-11 19:10:46 +08:00
Jason Lee
eb43c78cea
Add to support open Popover as a child window. ( #18 )
...
## Goal
Change to let Popup elements open into a window, to make sure the Popup
windows, panels, menus render top than the WebView.
Then we can embed wry or other webview into GPUI.
https://github.com/huacnlee/gpui-component/assets/5518/ce005456-088f-4298-bf5d-2642cf96faff
----
This is also like other software, they are also used in child window to
render the menus, popups.
- https://github.com/huacnlee/gpui-component/pull/2
- https://github.com/zed-industries/zed/pull/13730
## Todos
- [x] Multiple display window position.
- [x] Windows transparent background. (No transparent, just render a
correct window border)
- [x] Disable window resize on Windows.
- [ ] Handle Menu action.
- [x] Provided `popover` or `window` two mode to uses.
2024-07-11 16:20:26 +08:00
Jason Lee
310e5e3cde
Avoid PickerStory clone vec.
2024-07-08 23:22:08 +08:00
Jason Lee
9b51a5b998
Remove picker, add list instead. ( #17 )
2024-07-07 02:07:17 +08:00
Jason Lee
ac789b2379
Add Table ( #16 )
...
https://github.com/huacnlee/gpui-component/assets/5518/8603cbcc-c416-4d10-84a0-8cfe2e021e1a
2024-07-06 21:01:16 +08:00
Jason Lee
c925a6aa61
Add ButtonStyle::Outline, ButtonStyle::Glost
2024-07-05 00:18:36 +08:00
Jason Lee
acbc029eed
Add PopupMenu ( #15 )
...

2024-07-05 00:04:34 +08:00
Jason Lee
3ccadf6cc3
Improve focus ( #14 )
...
- Add `FocusableCycle` trait to help impl cycle focus.
- Add `outline` style to StyledExt.
2024-07-04 14:05:14 +08:00
Jason Lee
f78d50b5e9
Update dock layout
2024-07-04 01:05:32 +08:00
Jason Lee
19930e46db
Add SvgImg to render svg, and with a Chart example ( #13 )
...
https://github.com/huacnlee/gpui-component/assets/5518/576da9f9-4bff-4faf-a17e-19860cf6f948
2024-07-03 19:09:59 +08:00
Floyd Wang
b8ffa12a90
Fix typo
2024-07-03 16:56:41 +08:00
Jason Lee
88dcca590d
Simple Tooltip usage.
2024-07-02 00:13:07 +08:00
Jason Lee
f2703122b8
Move title_bar, util into workspace.
2024-07-01 23:51:47 +08:00