Commit Graph
64 Commits
Author SHA1 Message Date
Nate ButlerandMarshall Bowers a8bf0834e6 Button2 – Part1 (#3420)
## TODO

- [x] Remove `InteractionState`
- [ ] `Selectable` should use `Selection` instead of a boolean
- [x] Clean out ui2 prelude
- [ ] Build out button2 button types
- [ ] Port old buttons

Release Notes:

- N/A

---------

Co-authored-by: Marshall Bowers <1486634+maxdeviant@users.noreply.github.com>
2023-11-29 12:23:09 -05:00
Conrad Irwin 5fbc60d8da Inviting/Responding/Creating Channels... etc. 2023-11-28 22:47:04 -07:00
Conrad Irwin 0d4839b973 use the right click event for buttons 2023-11-28 21:14:48 -07:00
Conrad Irwin 8d1518d70c Fix stateful elements in Components
Previously a component assumed its element was stateless, this was
incorrect!
2023-11-28 20:47:11 -07:00
Conrad Irwin 60ce75c34a Togglable channels, the greatest since sliced bread 2023-11-28 16:52:12 -07:00
Marshall Bowers ee027bc112 Fix tooltips not showing on IconButtons (#3427)
This PR fixes tooltips not showing on `IconButton`s.

The "fix" here is the same hack that we used to fix `on_click` handlers
for `ListItem`s, where we introduce another layer of wrapping with an
element with an ID set.

This PR also adds a story for the `IconButton` so this issue can be
tested/observed in isolation.

Release Notes:

- N/A
2023-11-28 17:01:53 -05:00
Marshall Bowers 070674a4fd ui2: Unsuppress and fix warnings (#3423)
This PR unsupresses the warnings in `ui2` and summarily fixes them.

Release Notes:

- N/A
2023-11-28 14:44:19 -05:00
Nate Butler 7e61d340ce Outline some unfinished elements 2023-11-24 08:58:49 -05:00
Nathan Sobo c23f17ee0b Reorganize element-related traits 2023-11-22 11:19:43 -07:00
Nate Butler 453aa5ffd7 TextColor -> Color 2023-11-21 01:05:29 -05:00
2c4d83c9af WIP
co-authored-by: conrad <conrad@zed.dev>
co-authored-by: Nathan <nathan@zed.dev>
2023-11-20 14:46:01 -08:00
Conrad Irwin f86480ba5d Merge followup mess 2023-11-20 09:58:05 -07:00
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 c0ad15756c More attachment configuration for context menus 2023-11-16 21:59:23 -07:00
Nate Butler 9c5f580012 Use Selected for active IconButtons 2023-11-16 16:17:10 -05:00
Nate Butler 3d8e63b93b Buttons should always use cursor_pointer 2023-11-16 16:09:11 -05:00
Conrad Irwin 4540f04dbe Add more detail to panel switcher interaction 2023-11-16 09:57:59 -07:00
Conrad Irwin 0a9fb3978b Enable panel switching 2023-11-15 21:01:00 -07:00
Conrad Irwin 37d0b8424c Merge branch 'main' into element-types 2023-11-14 12:10:26 -07:00
Marshall Bowers 76c15229c1 Combine LabelColor and IconColor into TextColor 2023-11-14 13:48:01 -05:00
Conrad Irwin 5dda105182 Merge branch 'main' into element-types 2023-11-14 11:45:19 -07:00
Antonio Scandurra 40c634e056 Merge remote-tracking branch 'origin/main' into editor2-blocks 2023-11-14 17:16:58 +01:00
Antonio Scandurra fc5ec47cc8 WIP 2023-11-14 14:48:59 +01:00
Nathan Sobo 27fb381cca Checkpoint 2023-11-14 01:15:48 -07:00
Nate Butler 38888696db Allow a button to take a color 2023-11-13 19:46:15 -05:00
Antonio ScandurraandNathan 5d15886675 Render code actions indicator
Co-Authored-By: Nathan <nathan@zed.dev>
2023-11-09 18:43:26 +01:00
Nate ButlerandMarshall Bowers 9cc3ee9674 Update usages of text_size_* to text_ui in ui components
Co-Authored-By: Marshall Bowers <1486634+maxdeviant@users.noreply.github.com>
2023-11-08 15:28:38 -05:00
Conrad Irwin 496518f3e8 Use gpui instead of gpui2 consistenytly 2023-11-06 11:50:33 -07:00
bf80c1da5b Rename fields in ThemeColors (#3242)
This PR applies a number of field renames in the `ThemeColors` struct
from the `import-theme` branch.

This will help prevent this branch from diverging too far from `main`.

Release Notes:

- N/A

---------

Co-authored-by: Nate Butler <iamnbutler@gmail.com>
Co-authored-by: Marshall Bowers <1486634+maxdeviant@users.noreply.github.com>
2023-11-06 11:53:27 -05: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
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
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 e1032c5341 Remove ThemeColor in favor of theme2::Theme 2023-10-25 16:32:44 +02:00
Marshall Bowers bb35583998 Merge branch 'gpui2' into zed2 2023-10-24 14:11:13 +02:00
Marshall Bowers 6a532af1fd Swap the parameters to IconButton 2023-10-24 11:26:19 +02:00
Marshall Bowers 47f979d457 Pass IDs to IconButtons instead of generating them 2023-10-24 11:20:31 +02:00
Antonio Scandurra e4fe9538d7 Checkpoint 2023-10-21 16:01:47 +02:00
Antonio Scandurra 296fc92721 Checkpoint 2023-10-19 23:47:32 +02:00
Antonio Scandurra 21b4ae3fdc Merge 2023-10-19 23:40:38 +02:00
Antonio Scandurra dd7e1c505c Checkpoint 2023-10-19 23:00:19 +02:00
Marshall Bowers 94f0140f62 Assign each IconButton an ID based on the icon 2023-10-19 16:50:33 -04:00
Marshall Bowers 92542e6b94 Identify IconButton 2023-10-19 16:12:21 -04:00