Commit Graph

228 Commits

Author SHA1 Message Date
Nathan Sobo
adc355a1e6 Element refinement passing on ui2 2023-11-18 20:05:47 -07:00
Nathan Sobo
23ffce9fbe WIP: Work toward eliminating Component trait
This refactor enhances the overall design by promoting reusable and composable UI component structures within the Zed project codebase.
2023-11-18 00:03:23 -07:00
Conrad Irwin
6d4276ea5f Merge branch 'main' into collab_ui2 2023-11-16 22:08:42 -07:00
Conrad Irwin
547888942f Add storybook3 2023-11-16 19:42:25 -07:00
Marshall Bowers
b559bfd80f
Parameterize theme2::init to allow loading just the base theme (#3345)
This PR adds a parameter to the `theme2::init` method to indicate what
the theme-loading behavior should be.

This allows us to indicate when we want to load all of the additional
built-in user themes (like in the Zed binary and in the storybook), and
when we don't want to load the user themes (like in tests).

We're using an enum over just a `bool` here for clarity at the call
site.

Release Notes:

- N/A
2023-11-16 13:03:30 -05:00
Conrad Irwin
74afa62a55 Add Overlay component to gpui2 2023-11-15 23:00:36 -07:00
Nathan Sobo
4f09633379 Remove focus_in styling helper 2023-11-15 14:17:49 -07:00
Nathan Sobo
6abaacc457 Fix formatting 2023-11-14 01:58:10 -07:00
Nathan Sobo
364e3e7de5 Merge remote-tracking branch 'origin/main' into element-types 2023-11-14 01:55:58 -07:00
Nathan Sobo
c6e8a097a3 Rename back to div 2023-11-14 01:41:55 -07:00
Nathan Sobo
27fb381cca Checkpoint 2023-11-14 01:15:48 -07:00
Marshall Bowers
0430e8fbf2 Use "One Dark" as default theme 2023-11-13 18:44:17 -05:00
Conrad Irwin
f464d69ff8 Merge branch 'main' into dispatch-tree 2023-11-13 13:21:57 -07:00
Nate Butler
8432b713cc Resolve errors
Co-Authored-By: Marshall Bowers <1486634+maxdeviant@users.noreply.github.com>
2023-11-13 13:16:05 -05:00
Antonio Scandurra
26d26fadb3 Fix focus story 2023-11-13 14:35:49 +01:00
Antonio Scandurra
9c18253863 Register key and action listeners using Interactive::initialize
Co-Authored-By: Thorsten <mrnugget@gmail.com>
2023-11-13 11:37:57 +01:00
Nathan Sobo
7eaba8fabc WIP 2023-11-10 14:47:45 -07:00
Marshall Bowers
761d4fcd49
Port the picker and uniform list (#3248)
This adds a `UniformList` element and partially implements `Picker` as a
component, using `UniformList`. Because editor2 isn't fully implemented
yet, the picker doesn't have filtering logic yet. We want to merge this
for now though, to make the UniformList element available for other
crates.

Release Notes:

- N/A
2023-11-08 17:45:23 +01:00
Marshall Bowers
b6766ba39a
Replace GitStatusColors with StatusColors (#3268)
This PR removes `GitStatusColors` in favor of just using `StatusColors`
instead.

Release Notes:

- N/A
2023-11-08 11:32:32 -05:00
Marshall Bowers
fe28d8faea Merge branch 'main' into picker 2023-11-08 11:18:54 -05:00
Nathan Sobo
1949fa5147 Merge remote-tracking branch 'origin/main' into register-actions 2023-11-07 21:56:08 -07:00
Nathan Sobo
814e62050c Register actions globally before main 2023-11-07 20:58:37 -07:00
Nate Butler
79b4f78cb3 Extend the theme crate to enable stories, add players story 2023-11-07 21:08:33 -05:00
Max Brunsfeld
06960df287 Implement basic fuzzy filtering in picker 2023-11-07 17:24:04 -08:00
Max Brunsfeld
ea603401e2 Get actions + focus working on picker, now that it's a view
Co-authored-by: Marshall <marshall@zed.dev>
2023-11-07 13:48:32 -08:00
Max Brunsfeld
b9d051eae7 Start work on adding a filter editor to the picker
Implement picker as a view instead of as a component

Co-authored-by: Mikayla <mikayla@zed.dev>
Co-authored-by: Marshall <marshall@zed.dev>
2023-11-07 13:37:10 -08:00
Max Brunsfeld
2412873719 Remove commented-out code in picker2
Co-authored-by: Mikayla <mikayla@zed.dev>
2023-11-07 10:53:59 -08:00
Max Brunsfeld
1d34b7b9fe Implement picker actions
Co-authored-by: Mikayla <mikayla@zed.dev>
2023-11-07 09:46:41 -08:00
Max Brunsfeld
69eb49a2ed Merge branch 'main' into picker 2023-11-07 09:34:57 -08:00
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
Mikayla
85000eba81
wip: picker
co-authored-by: nathan <nathan@zed.dev>
co-authored-by: max <max@zed.dev>
2023-11-06 17:09:38 -08:00
Mikayla
3c93b585ab
Checkpoint 2023-11-06 15:11:22 -08:00
Mikayla
ea6755b1ca
Checkpoint 2023-11-06 14:26:10 -08: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