Jason Lee
41663ca030
chore: Update GPUI and fix FocusableWrapper removed error. ( #1026 )
...
Close #1024
Ref https://github.com/zed-industries/zed/pull/32436
2025-07-02 11:06:04 +08:00
Sunli
b70b229370
wef: Added a new WebView component named "Wef" based on CEF. ( #877 )
...
Wef is a Rust library for embedding WebView functionality using Chromium
Embedded Framework (CEF3) with offscreen rendering support.
2025-06-17 18:57:44 +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
901312bc5a
chore: Switch gpui to depends on Zed official. ( #912 )
...
Now, GPUI have merged `window_handle` support for all platforms.
- https://github.com/zed-industries/zed/pull/24327
- https://github.com/zed-industries/zed/pull/24545
- https://github.com/zed-industries/zed/pull/28152
It's time to depends on Zed official main branch.
2025-06-02 10:05:45 +08:00
Jason Lee
38d9c24af5
chore: Update getter method to return reference to view components. ( #827 )
2025-04-30 17:18:44 +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
9dade704fb
webview: Let webview as a feature and not default enable. ( #648 )
...
Close #646
2025-02-24 14:24:22 +08:00
Floyd Wang
abb3de013e
Rename package from ui to gpui-component ( #606 )
...
## 🚨 Break Change
Update dependencies from `ui` to `gpui-component`.
2025-02-06 17:21:46 +08:00
Jason Lee
99a4c793c5
chore: Update crate name to gpui-component for publish crate to hold the name. ( #603 )
2025-02-06 11:57:34 +08:00
Jason Lee
327d40e0e0
chore: Upgrade GPUI 3 ( #587 )
...
The pervious version has keep on
[gpui2](https://github.com/longbridge/gpui-component/tree/gpui2 ) branch,
if there need to use.
Ref https://github.com/zed-industries/zed/pull/22632
## Prepare
### Generate index.scip
```bash
rust-analyzer scip ./ > index.scip
```
### Get [refactor](https://github.com/zed-industries/refactor )
```bash
https://github.com/zed-industries/refactor.git
```
## Refactor exist code
```bash
cd refactor
cargo run -- ~/work/gpui-component
```
Then will get result if successed:
```
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.03s
Running `target/debug/refactor /Users/jason/work/gpui-component`
Loaded 115 SCIP documents
Processing files starting with focus path: ""
Changed 90 files
```
-------------
## Changes
```diff
- View<T>
- Model<T>
+ Entity<T>
- WeakView<T>
+ WeakEntity<T>
- FocusableView
+ Focusable
- cx.bounds()
+ window.bounds()
- cx.refresh()
+ window.refresh()
- cx.focused()
+ window.focused(cx)
- cx.with_optional_element_state
- window.with_optional_element_state
```
```diff
- &mut WindowContext
+ &mut Window, &mut App
- cx: &mut WindowContext
+ window: &mut Window, cx: &mut App
- &mut ViewContext<
+ &mut Window, &mut Context<
- cx: &mut ViewContext<
+ window: &mut Window, cx: &mut Context<
```
```diff
- cx.spawn(|_, mut cx| async move {
+ cx.spawn_in(window, |_, mut cx| async move {
- cx.dispatch_action(Box::new(...))
+ window.dispatch_action(Box::new(...), cx)
```
`cx.spawn`
```diff
- cx.spawn(|view, mut cx| async move {
+ cx.spawn_in(window, |view, mut window| async move {
+ _ = view.update_in(&mut window, move |view, window, cx| {
```
2025-01-27 03:58:48 +08:00
xda
5874c6974f
tiles: Add Tiles ( #435 )
...
## Break Changes
- Renamed `DockItemState` to `PanelState`.
- Renamed `DockItemInfo` to `PanelInfo`.
- Update `cx` type from `WindowContext` to `AppContext` for Panel trait
`panel_name` method.
## TODO
- [ ] Support merge panels into TabPanel.
- [ ] Support split panels into Tile.
---------
Co-authored-by: Jason Lee <huacnlee@gmail.com>
2024-12-16 20:33:14 +08:00
Floyd Wang
6d0b332071
svg_img: Render SVGs with text tags ( #390 )
...
<img width="620" alt="image"
src="https://github.com/user-attachments/assets/61f2a1f8-6926-484d-bcb8-076a9d85e89c ">
2024-11-07 11:39:06 +08:00
Jason Lee
fdca75d5a7
title_bar: Add a new TitleBar, remove the old version. ( #348 )
...
- Removed old workspace crate, moved out to
[gpui-workspace](https://github.com/huacnlee/gpui-workspace )
<img width="491" alt="image"
src="https://github.com/user-attachments/assets/5048491c-9b98-4af5-9f0f-9a0f20c2308f ">
Icons for Windows and Linux use by SVG icon, it based on:
-
https://learn.microsoft.com/en-us/windows/apps/design/style/segoe-fluent-icons-font
- Download Font: [Segoe Fluent
Icons](https://learn.microsoft.com/en-us/windows/apps/design/downloads/#fonts )
2024-10-16 16:22:17 +08:00
Jason Lee
33200aa685
webview: Blur WebView when clicked out to fix IME cannot input bug. ( #320 )
...
- Closes #316
- Ref https://github.com/tauri-apps/wry/pull/1385
## Before
https://github.com/user-attachments/assets/cc614334-47fe-4722-8745-aea783fbab4a
## After
On macOS, now the IME bug is gone.
https://github.com/user-attachments/assets/363bb016-229f-4766-84f7-6a4838e490bf
https://github.com/user-attachments/assets/320c5c1c-cfac-4165-af8a-bc9708952460
2024-10-08 17:01:52 +08:00
Jason Lee
9bc4887d55
Update dependencies.
2024-09-09 22:33:41 +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
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
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
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
f2703122b8
Move title_bar, util into workspace.
2024-07-01 23:51:47 +08:00
Jason Lee
502d4df135
Add Dock & Panel ( #10 )
...
https://github.com/huacnlee/gpui-component/assets/5518/51622a5e-f51d-4ede-8cae-04cae703f8aa
2024-07-01 14:20:56 +08:00
Jason Lee
3288270b49
Add Popover ( #6 )
2024-06-29 10:03:59 +08:00
Jason Lee
1f21469e7b
Split story into a crate.
2024-06-26 14:38:06 +08:00
Jason Lee
94cb714ebf
Update to use shadcn ui theme
2024-06-24 15:39:26 +08:00
Jason Lee
9ffea5798e
First commit, with Button UI.
2024-06-13 21:46:28 +08:00