Commit Graph

197 Commits

Author SHA1 Message Date
Julia
643146d768 Re-introduce a macro for defining actions for ease of use
Co-Authored-By: Piotr Osiewicz <piotr@zed.dev>
Co-Authored-By: Conrad Irwin <conrad@zed.dev>
2023-11-07 11:30:58 -05:00
Conrad Irwin
496518f3e8 Use gpui instead of gpui2 consistenytly 2023-11-06 11:50:33 -07:00
Nate Butler
1bce5dcc69 Add checkboxes and their stories 2023-11-05 01:06:41 -05:00
Marshall Bowers
5d36331942
storybook2: Remove unreferenced components module (#3229)
This PR removes the `components` module from `storybook2` as it was
dead, unreferenced code.

Release Notes:

- N/A
2023-11-03 18:12:21 -04:00
Marshall Bowers
76db100d11
ui2: Reorganize components (#3228)
This PR reorganizes the components in the `ui2` crate.

The distinction between "elements" and "components" is now gone, with
all of the reusable components living under `components/`.

The components that we built while prototyping but will eventually live
in other crates currently reside in the `to_extract/` module.

Release Notes:

- N/A
2023-11-03 17:34:11 -04:00
Conrad Irwin
0bab1a92df Merge remote-tracking branch 'origin/main' into zed2-workspace 2023-11-02 09:44:38 -06:00
Nathan Sobo
3e7df82977 WIP: Merge branch 'main' into zed2-workspace 2023-11-01 22:35:02 -06:00
Marshall Bowers
bd4bff47a0 Merge branch 'main' into n/t2 2023-11-01 21:54:10 -04:00
Marshall Bowers
72d060108d
Make indexing into ColorScales safe (#3205)
This PR makes indexing into `ColorScale`s safe by constraining the
`ColorScaleStep`s to a set of known values.

Release Notes:

- N/A
2023-11-01 21:52:42 -04:00
Nate Butler
d0975aacac Merge branch 'main' into n/t2 2023-11-01 16:52:43 -04:00
Mikayla
6f38eb3252
Finish main merge 2023-11-01 11:52:14 -07:00
Marshall Bowers
b910bbf002
Add ui_font_size setting (#3199)
This PR adds a new `ui_font_size` setting that can be used to control
the scale of the entire UI.

We use the value in this setting to set the base rem size of the window.

Release Notes:

- N/A
2023-11-01 13:11:12 -04:00
Nate Butler
bfb1f5ecf0 Continue refining theme, update tabs & tab bar 2023-11-01 01:41:33 -04:00
Marshall Bowers
36a73d657a
Remove old Theme definition (#3195)
This PR removes the old `Theme` definition in favor of the new
`ThemeVariant`s.

The new `SyntaxStyles` have been reverted to the old `SyntaxTheme` that
operates by storing the syntax styles as a vector of
`gpui2::HighlightStyle`s.

This is necessary for the intended usage by `language2`, where we find
the longest key in the theme's syntax styles that matches the capture
name:

18431051d9/crates/language2/src/highlight_map.rs (L15-L41)
2023-10-31 23:05:50 -04:00
Marshall Bowers
18431051d9
Rework theme2 with new theme structure (#3194)
This PR reworks the theme definition in the `theme2` crate to be based
off of the new theme work that @iamnbutler has been working on.

We're still developing the new theme system, but it is complete enough
that we can now load the default theme and use it to theme the storybook
(albeit with some further refining of the color palette required).

---------

Co-authored-by: Nate Butler <iamnbutler@gmail.com>
Co-authored-by: Marshall Bowers <marshall@zed.dev>
2023-10-31 22:23:00 -04:00
Antonio Scandurra
7b6514b178 Simplify AnyView
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2023-10-31 16:16:30 +01:00
Max Brunsfeld
58446c2715 Merge branch 'zed2-render' into zed2 2023-10-30 15:37:00 -07:00
Max Brunsfeld
30dffbb409 Introduce a Render trait, make views implement it
Don't pass a render function separately from the view.

Co-authored-by: Nathan Sobo <nathan@zed.dev>
Co-authored-by: Mikayla <mikayla@zed.dev>
Co-authored-by: Antonio <as-cii@zed.dev>
2023-10-30 15:19:40 -07:00
Marshall Bowers
607813e646 Tweak style for color scale story 2023-10-30 17:45:37 -04:00
Marshall Bowers
a02d806715 Add a story showcasing the color scales 2023-10-30 17:31:15 -04:00
Marshall Bowers
ba789fc0c4 Remove old theme constructs 2023-10-30 14:47:44 -04:00
Antonio Scandurra
1a54ac0d69 Rename Handle to Model 2023-10-30 19:44:01 +01:00
Marshall Bowers
7b4e699d0e Remove themed wrapper 2023-10-30 14:28:25 -04:00
Conrad Irwin
c1904b493b Fix cargo fmt 2023-10-27 10:44:57 +02:00
Nathan Sobo
a1c3826858 Add View::update which provides a ViewContext 2023-10-26 19:41:42 +02:00
Marshall Bowers
61694bba6a Remove unneeded constructors for stories 2023-10-26 16:46:49 +02:00
Marshall Bowers
1887f3b594 Rename S type to V 2023-10-26 15:54:43 +02:00
Marshall Bowers
88ef74ec8f Checkpoint: Compiling after view type removal 2023-10-26 15:20:38 +02:00
Nathan Sobo
0285284ae1 Rename IntoAnyElement trait to Component 2023-10-26 12:46:52 +02:00
Nathan Sobo
8ecfea55cd Replace derive Element with derive IntoAnyElement everywhere 2023-10-26 12:38:23 +02:00
Nathan Sobo
927278e20d Remove IntoAnyElement bound from Element trait 2023-10-26 11:49:36 +02:00
Marshall Bowers
9fb9885931 Checkpoint: Compiling 2023-10-26 10:08:39 +02:00
Marshall Bowers
e67048ee7b Load themes from settings and rework Settings trait 2023-10-25 20:37:55 +02:00
Marshall Bowers
dd34bb273e Load Theme from theme2 into the storybook 2023-10-25 15:50:50 +02:00
Marshall Bowers
d6bd000aa8 Rename cx.global_default_mut to cx.global_default 2023-10-24 17:58:14 +02:00
Marshall Bowers
4ca7ddfc42 Finish up ThemeRegistry and remove AnyAssetSource 2023-10-24 17:47:41 +02:00
Marshall Bowers
9f8aaa4cdb Add AnyAssetSource 2023-10-24 16:59:01 +02:00
Marshall Bowers
bb35583998 Merge branch 'gpui2' into zed2 2023-10-24 14:11:13 +02:00
Marshall Bowers
23ad0a2c58 Return a Result from load_embedded_fonts 2023-10-24 13:31:01 +02:00
Marshall Bowers
785901c75e Load embedded fonts 2023-10-24 12:32:30 +02:00
Nate Butler
cc445f7cef Start scaffolding out the Copilot Modal UI
Co-Authored-By: Mikayla Maki <mikayla.c.maki@gmail.com>
2023-10-23 10:00:02 -04:00
Nathan Sobo
da8919002f Fix runtime errors 2023-10-23 11:34:35 +02:00
Antonio Scandurra
a0b667a2ca WIP 2023-10-22 19:56:25 +02:00
Antonio Scandurra
ce75be91e1 Checkpoint 2023-10-22 18:25:24 +02:00
Antonio Scandurra
b7d30fca2b WIP 2023-10-21 17:52:47 +02:00
Antonio Scandurra
e4fe9538d7 Checkpoint 2023-10-21 16:01:47 +02:00
Marshall Bowers
080638216a Wire up NotificationsPanel story 2023-10-20 16:30:45 -04:00
Antonio Scandurra
825c352b6a Checkpoint 2023-10-20 17:58:37 +02:00
Antonio Scandurra
1409fc0da3 Checkpoint 2023-10-20 17:31:47 +02:00
Antonio Scandurra
a3dcaf21cb Checkpoint 2023-10-20 16:31:03 +02:00