Nathan Sobo
2701be91e3
Add negative style helpers
2023-09-18 20:47:40 -06:00
Nathan Sobo
f2e87a3429
Add Element::when method
2023-09-18 20:25:12 -06:00
Nathan Sobo
c7a3186d08
Checkpoint
2023-09-18 20:17:27 -06:00
Nathan Sobo
a5e4ceb735
Checkpoint: Add methods for setting arbitrary lengths
2023-09-18 19:48:22 -06:00
Nathan Sobo
fe6f0a253b
Merge remote-tracking branch 'origin/main' into chat-again
2023-09-11 12:08:01 -06:00
Nathan Sobo
c3a3543ebb
Introduce gpui2 and storybook crates ( #2919 )
...
This PR splits `crates/gpui/playground` with two new crates: `gpui2` and
`storybook`.
GPUI 2 re-exports most of `gpui`, but makes some adjustments. I want to
keep the scope focused. This isn't literally version 2.0 of GPUI or
anything. It's just a convenient way to make a create with fewer
dependencies where we can iterate quickly on aspects of GPUI's design.
Most of the focus is on improving our approach to element layout and
styling.
The `storybook` crate is pretty empty for now, but it's where I intend
to start rebuilding interfaces. I welcome anyone else to join me in
this, though until I get one interface fully built, buyer beware. You
may need to pair on it with me.
2023-09-11 09:19:43 -06:00
Nathan Sobo
15ea4af5e7
Merge branch 'main' into storybook
2023-09-11 09:13:46 -06:00
Nathan Sobo
e0fdc7d0aa
Eliminate PaintContext
2023-09-11 09:00:59 -06:00
Nathan Sobo
a24d94cfda
Eliminate LayoutContext
2023-09-11 08:47:00 -06:00
Nathan Sobo
ebf8b32811
Checkpoint
2023-09-08 16:25:10 -06:00
Nathan Sobo
6b23f74636
Checkpoint
2023-09-08 16:08:31 -06:00
Nathan Sobo
362b1a44be
Merge branch 'main' into storybook
2023-09-08 14:18:44 -06:00
Nathan Sobo
c3b1264c05
Checkpoint
2023-09-08 14:09:29 -06:00
Nathan Sobo
14fc386dc8
Checkpoint
2023-09-08 13:54:15 -06:00
Nathan Sobo
53a50b8df4
Move refreshing to window
2023-09-08 13:27:29 -06:00
Nathan Sobo
21d390fa4a
Support overflow scroll
2023-09-08 10:20:45 -06:00
Nathan Sobo
713d72942d
Fix bounds calculations
2023-09-08 06:45:23 -06:00
Nathan Sobo
7738867639
Always pass parent origin when painting elements
2023-09-08 06:32:20 -06:00
Nathan Sobo
d311bd04ff
Add basic inspector
2023-09-07 22:24:02 -06:00
Nathan Sobo
4307a06073
WIP
2023-09-07 14:16:44 -06:00
Nathan Sobo
37ef28a3bf
Merge branch 'main' into storybook
2023-09-07 07:56:57 -06:00
Nathan Sobo
a8d5d93757
Max out corner radii to half the smaller dimension of the parent box
2023-09-06 17:21:05 -06:00
Nathan Sobo
99ad60460a
Add support for fetching/rendering images
2023-09-06 17:13:43 -06:00
Nathan Sobo
6d4dd0e7a4
Checkpoint
2023-09-06 15:22:35 -06:00
Nathan Sobo
46451f2a8b
Render borders in gpui2 divs
2023-09-06 14:31:44 -06:00
Nathan Sobo
5a778fbde6
Checkpoint
2023-09-06 14:16:15 -06:00
Nathan Sobo
707427d9f5
Select caret based on expanded boolean
2023-09-06 10:24:22 -06:00
Nathan Sobo
a2e91e45d9
Use preview server when not on stable ( #2909 )
...
This PR updates our client code to connect to preview whenever we're not
on stable. This will make it more likely that we'll be able to
collaborate on a dev build, but obviously won't work if there's a
protocol change on main that hasn't made its way to preview yet.
2023-09-06 10:09:08 -06:00
Nathan Sobo
de77e56dc6
Checkpoint
2023-09-05 18:53:25 -06:00
Nathan Sobo
85aedf9bed
WIP: Icons not yet rendering
2023-09-05 16:40:52 -06:00
Nathan Sobo
5a9c76e080
Fix hoverable elements moving on hover
2023-09-05 15:17:09 -06:00
Nathan Sobo
e08c0fc4ce
Checkpoint
2023-09-05 12:50:07 -06:00
Nathan Sobo
9ec7569e09
Checkpoint
2023-09-05 12:16:21 -06:00
Nathan Sobo and Nate Butler
0307cb8a88
Start sketching a collab panel in storybook
...
Co-Authored-By: Nate Butler <nate@zed.dev >
2023-09-05 10:02:36 -06:00
Nathan Sobo
2fa9c037c8
Merge remote-tracking branch 'origin' into storybook
2023-09-01 10:08:48 -06:00
Nathan Sobo
6275c560e7
Fix warnings for a clean build
2023-09-01 10:08:41 -06:00
Nathan Sobo
3b5ee59273
Split playground into gpui2 and storybook
2023-08-30 16:12:14 -06:00
Nathan Sobo
ee11be98e5
Add gpui2 crate
2023-08-30 15:00:11 -06:00
Nathan Sobo
746f77bf7c
Checkpoint
2023-08-30 14:40:57 -06:00
Nathan Sobo
1d491fcd78
Get playground rendering with backward compatible theming
2023-08-30 11:09:34 -06:00
Nathan Sobo
d763946b18
Checkpoint: Working toward compatibility with themes
2023-08-30 10:11:00 -06:00
Nathan Sobo
48d3e2d9b9
Move views_to_notify_if_ancestors_change to Window
2023-08-29 21:58:44 -06:00
Nathan Sobo
2e7356a53e
Store new_parents on Window instead of layout context
2023-08-29 21:43:48 -06:00
Nathan Sobo
42cd257287
Remove text style stack from LayoutContext
2023-08-29 21:33:08 -06:00
Nathan Sobo
81957c49d5
Merge remote-tracking branch 'origin' into divs
2023-08-29 21:14:14 -06:00
Nathan Sobo
a0b6e500cf
WIP
2023-08-29 18:40:24 -06:00
Nathan Sobo
a56fab8c11
Remove unused proc macro
2023-08-29 18:30:57 -06:00
Nathan Sobo
84b9c22170
Merge branch 'main' into ai-refactoring
2023-08-29 10:17:01 -06:00
Nathan Sobo
2d411303bb
Use preview server when not on stable
2023-08-29 10:07:22 -06:00
Nathan Sobo
396558755e
Testing: Update build script to make local testing easier ( #2903 )
...
* `script/bundle -l` will only build for the current architecture and
skip DMG creation. It will also copy to `/Applications`.
* `script/bundle -l "My Bundle"` will name the bundle after your
provided name.
* Passing `-f` will overwrite. Passing `-o` will also open the
application.
2023-08-29 07:07:35 -06:00
Nathan Sobo and Mikayla Maki
9371754942
Provide themes to subtrees via context
...
Co-Authored-By: Mikayla Maki <mikayla@zed.dev >
2023-08-28 16:07:26 -06:00
Nathan Sobo and Mikayla Maki
fd1633ac4b
Render a titlebar you can barely see
...
Co-Authored-By: Mikayla Maki <mikayla@zed.dev >
2023-08-28 14:24:27 -06:00
Nathan Sobo and Mikayla Maki
b5aedc144d
Allow layout to be called on element in any phase of its lifecyle.
...
Co-Authored-By: Mikayla Maki <mikayla@zed.dev >
2023-08-28 14:23:16 -06:00
Nathan Sobo
a1d2ae3095
Add -l option to build script
...
When you pass -l, we build for the local architecture only and copy the
resulting app bundle to /Applications. You can provide a bundle name as
an optional argument.
2023-08-28 13:32:30 -06:00
Nathan Sobo
5bb780073e
Relativize child layouts to their parent origin
2023-08-25 23:22:53 -06:00
Nathan Sobo
3bebfbcd50
Checkpoint
2023-08-25 23:15:58 -06:00
Nathan Sobo
8ad736da8d
WIP
2023-08-25 22:19:49 -06:00
Nathan Sobo
7cd416c63e
Always log panics
2023-08-25 21:42:18 -06:00
Nathan Sobo
147aa0f695
WIP
2023-08-25 21:41:21 -06:00
Nathan Sobo
cf007a3d3b
Start working on restoring button
2023-08-23 16:17:45 -06:00
Nathan Sobo
4c000379d2
Click events, children
2023-08-23 16:02:56 -06:00
Nathan Sobo and Conrad Irwin
8e3b23e510
Rename Window::mouse_position to last_mouse_position
...
We want to encourage people to use WindowContext::mouse_position, which
requests the position from the platform.
Co-Authored-By: Conrad Irwin <conrad@zed.dev >
2023-08-23 13:28:22 -06:00
Nathan Sobo and Conrad Irwin
684db11afd
Use platform API to request mouse position
...
Co-Authored-By: Conrad Irwin <conrad@zed.dev >
2023-08-23 13:10:41 -06:00
Nathan Sobo and Conrad Irwin
5996b6b46b
Use RefinementCascade to compose pressability and hoverability
...
Co-Authored-By: Conrad Irwin <conrad@zed.dev >
2023-08-23 12:18:12 -06:00
Nathan Sobo
569d99a5a1
Add hover styling support
2023-08-23 09:08:05 -06:00
Nathan Sobo
1bc4f22373
Rework element system, phase 1 ( #2881 )
...
This is a deep cut. There's still more work to do until we start
building UI with this. I've approached this as additively as possible,
but I've made a few changes to the rest of the code that I think would
be good to upstream before proceeding too much further.
Most of the interesting pieces are in gpui/playground, which is a
standalone binary that opens a single window and renders a new kind of
element. The layout of these new elements is provided by the taffy
layout engine crate, which conforms to web conventions. The idea is that
playground is relatively cheap to build and work on. As concepts
coalesce in playground, we can drop them into gpui and start
transitioning.
2023-08-23 08:26:38 -06:00
Nathan Sobo
cd72a42bd4
Mark new crates as publish = false
2023-08-22 20:47:05 -06:00
Nathan Sobo
d375f7992d
Merge branch 'main' into divs
2023-08-22 16:35:56 -06:00
Nathan Sobo and Antonio Scandurra
733df38f9b
Checkpoint
...
Co-Authored-By: Antonio Scandurra <antonio@zed.dev >
2023-08-22 11:34:06 -06:00
Nathan Sobo
3921278319
Add more style helpers
2023-08-22 09:16:05 -06:00
Nathan Sobo
53679ce045
Checkpoint
2023-08-22 09:07:45 -06:00
Nathan Sobo
ff7b25c538
Checkpoint
2023-08-21 16:14:59 -06:00
Nathan Sobo
f4d8763d2b
WIP
2023-08-19 23:16:20 -06:00
Nathan Sobo
6663d3f8eb
Checkpoint
2023-08-19 22:33:28 -06:00
Nathan Sobo
afff46b335
Checkpoint
2023-08-19 21:24:28 -06:00
Nathan Sobo
2c6f692c56
Checkpoint
2023-08-19 20:29:55 -06:00
Nathan Sobo
0747131bd4
Compiling checkpoint
2023-08-19 19:51:22 -06:00
Nathan Sobo
76993f6b57
WIP: Trying to find a composable approach to styling that plays nice with layout engine
2023-08-18 20:08:29 -06:00
Nathan Sobo
eec39dc23c
WIP
2023-08-18 17:14:29 -06:00
Nathan Sobo
b910c85f7f
Still need to wire up MouseMove with the new regions
2023-08-18 02:23:06 -06:00
Nathan Sobo
3709eff34b
Compiling
2023-08-18 01:59:21 -06:00
Nathan Sobo
9b74dc196e
Introduce Refinement trait and derive macro
2023-08-18 01:03:46 -06:00
Nathan Sobo
19ccb19c96
Compiling
2023-08-17 18:37:54 -06:00
Nathan Sobo
24d19deb0b
Compiling checkpoint
2023-08-17 14:05:18 -06:00
Nathan Sobo
f3a275d339
Revert "Add a proc macro for deriving override structs with optional fields"
...
This reverts commit ab9356e9d8 .
2023-08-17 13:48:46 -06:00
Nathan Sobo
ab9356e9d8
Add a proc macro for deriving override structs with optional fields
2023-08-17 09:39:23 -06:00
Nathan Sobo
b95b2af3e0
Store generic mouse regions on window that contain their event type id
2023-08-17 08:37:55 -06:00
Nathan Sobo
812d3f6af6
Get basic mouse_down and mouse_up working
2023-08-16 22:21:27 -06:00
Nathan Sobo
187d78011c
WIP
2023-08-16 13:52:42 -06:00
Nathan Sobo and Antonio Scandurra
f1aafab61d
Get text rendering
...
Co-Authored-By: Antonio Scandurra <antonio@zed.dev >
2023-08-16 12:50:35 -06:00
Nathan Sobo
fea987b459
WIP
2023-08-16 06:22:47 -06:00
Nathan Sobo
a8ecc1a643
Add support for a measure function to the layout engine facade
2023-08-15 22:02:56 -06:00
Nathan Sobo
4efc46c763
Add derive macro now new elements
2023-08-15 21:04:48 -06:00
Nathan Sobo
77bc682a69
Render a component
2023-08-15 19:46:07 -06:00
Nathan Sobo
65a5c54a2c
Compiling checkpoint
2023-08-15 19:29:57 -06:00
Nathan Sobo
e7489bd4c9
Compiling checkpoint
2023-08-15 09:33:59 -06:00
Nathan Sobo
0fe457020b
WIP
2023-08-15 09:26:16 -06:00
Nathan Sobo and Mikayla Maki
f9858445b8
Get a 50% colored box rendering
...
Co-Authored-By: Mikayla Maki <mikayla@zed.dev >
2023-08-14 14:46:09 -06:00
Nathan Sobo and Mikayla Maki
740b105330
Merge branch 'main' into taffy
...
Co-Authored-By: Mikayla Maki <mikayla@zed.dev >
2023-08-14 13:50:21 -06:00
Nathan Sobo
7756497933
Simplify adapter
2023-08-14 09:26:35 -06:00