Commit Graph
22567 Commits
Author SHA1 Message Date
Nate Butler b125cc279f Simplify toggle, do some reorganization 2023-11-04 11:24:31 -04:00
Antonio Scandurra 86d1defda2 Fix compile errors, now lines are being laid out 2023-11-04 14:37:57 +01:00
Kirill Bulatov ac9efaebb7 Suppress unused vars warning generated by gpui macro (#3233) 2023-11-04 14:06:42 +02:00
Kirill Bulatov 9f40a5c53f Suppress unused vars warning generated by gpui macro 2023-11-04 13:54:37 +02:00
Conrad Irwin de5458cfe0 Update tooltip code a bit
This fixes a tiny UX bug where the tooltip would appear to move if you
hovered over an element, then moved your mouse out and back within
500ms.

The fix is to retain the task, so we can drop it to cancel it when the
mouse leaves.

Also changes the time we construct the tooltip to the time it first
shows.
2023-11-03 21:40:28 -06:00
Mikayla Maki 123439adc2 Merge branch 'main' into add-collab-tests 2023-11-03 18:06:08 -07:00
Mikayla e1525e2b47 Get collab2 green 2023-11-03 18:01:06 -07:00
Max Brunsfeld 436dc93441 WIP2000 2023-11-03 16:40:37 -07:00
Max Brunsfeld 42409528af Allow language injection in markdown code blocks in channel notes (#3231)
Release Notes:

- Fixed an issue where markdown code blocks were not syntax-highlighted
in channel notes editors.
2023-11-03 16:12:02 -07:00
Max Brunsfeld 2dd32dbe87 Allow language injection in markdown code blocks in channel notes 2023-11-03 15:53:54 -07:00
JuliaandConrad Irwin 4725cd2cd6 Move more tooltip logic into gpui2 & fix tooltip moving on paint
Co-Authored-By: Conrad Irwin <conrad@zed.dev>
2023-11-03 18:37:15 -04:00
Nate Butler 4cce6ae212 Add UI docs (#3230)
Not as exciting as it sounds - Just starting to scaffold out some UI
docs and want to get feedback.

Release Notes:

- N/A
2023-11-03 18:25:08 -04:00
Nate Butler b0d202ba5e Merge branch 'main' into add-ui-docs 2023-11-03 18:20:17 -04:00
Nate Butler 9ce7199d2d Add some initial docs 2023-11-03 18:19:54 -04: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
JuliaandConrad Irwin 3834e26f71 Tooltips in mouse event handler & fix executor timer
Co-Authored-By: Conrad Irwin <conrad@zed.dev>
2023-11-03 18:02:58 -04:00
Marshall Bowers 6abdab7735 Remove theme.txt 2023-11-03 17:52:19 -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
Marshall Bowers 287ea0a6e4 Allow deriving Serialize and Deserialize on generated refinement (#3227)
This PR adds support for deriving `Serialize` and `Deserialize` on the
refinement type generated by `#[derive(Refineable)]`.

Release Notes:

- N/A
2023-11-03 17:21:00 -04:00
Marshall Bowers b5224bdafd Remove unneeded type qualification 2023-11-03 16:40:46 -04:00
Nate ButlerandMarshall Bowers d500b01aed Add docs burndown list
Co-Authored-By: Marshall Bowers <1486634+maxdeviant@users.noreply.github.com>
2023-11-03 16:37:22 -04:00
Marshall Bowers 1361b61708 Use an IconButton for the tab close button 2023-11-03 16:36:02 -04:00
Nate ButlerandMarshall Bowers 740e2cc5bf Start on ui root doc
Co-Authored-By: Marshall Bowers <1486634+maxdeviant@users.noreply.github.com>
2023-11-03 16:28:54 -04:00
Conrad Irwin f97046b86f MOAR TOOLTIPS 2023-11-03 14:15:32 -06:00
Kirill Bulatov edacffab58 Refresh diagnostics inside the tab (#3225)
r-a now has 2 different types of diagnostics: 
* "disk-based" ones that come from `cargo check` and related, that emit
`project::Event::DiskBasedDiagnosticsStarted` and
`DiskBasedDiagnosticsFinished`
* "flycheck" diagnostics from r-a itself, that it tries to dynamically
apply to every buffer open, that come with `DiagnosticsUpdated` event.

Latter diagnostics update frequently, on every file close and open, but
`diagnostics.rs` logic had never polled for new diagnostics after
registering the `DiagnosticsUpdated` event, so the only way we could
have newer diagnostics was to re-open the whole panel.
The PR fixes that, and also adds more debug logging to the module.
The logic of the fix looks very familiar to previous related fix:
https://github.com/zed-industries/zed/pull/3128

One notable thing after the fix: "flycheck" diagnostics stay forever if
the diagnostics panel is opened: excerpts in that panel do not allow the
buffer to get dropped (hence, closed in terms of r-a) and get the
updated, zero diagnostics.
If the diagnostics panel is opened and closed multiple times, those
errors gradually disappear.

Release Notes:

- Fixed diagnostics panel not refreshing its contents properly
2023-11-03 22:03:05 +02:00
Conrad IrwinandJulia 33245d119e Tooltip on tabs
Co-Authored-By: Julia <julia@zed.dev>
2023-11-03 14:02:46 -06:00
Kirill Bulatov 918d123284 Fix the test 2023-11-03 21:51:12 +02:00
Kirill Bulatov 6f8947a3d3 Fix a compilation error 2023-11-03 21:51:12 +02:00
Kirill Bulatov 9cb8ce172d Refresh diagnostics inside the tab 2023-11-03 21:51:12 +02:00
Marshall Bowers 12500364b4 Merge branch 'main' into import-theme 2023-11-03 15:41:12 -04:00
Marshall Bowers fa7d6c0e70 Remove Default impl for ThemeColors` (#3226)
This PR removes the `Default` impl for `ThemeColors`.

Since we need default light and dark variants for `ThemeColors`, we
can't use a single `Default` impl.

Release Notes:

- N/A
2023-11-03 15:40:50 -04:00
Mikayla Maki c529343ba1 WIP: Port channel crate to gpui2 (#3192) 2023-11-03 12:32:47 -07:00
66499f60ee Fix double borrow in synchronous tests that take AppContext
Co-authored-by: Mikayla <mikayla@zed.dev>
Co-authored-by: Antonio <antonio@zed.dev>
2023-11-03 12:10:11 -07:00
Mikayla 2b883bf32e WIP 2023-11-03 12:04:24 -07:00
Conrad Irwin 26e64fb843 gpui2: Add on_hover events 2023-11-03 12:51:38 -06:00
Antonio Scandurra 2a672e2126 WIP 2023-11-03 18:55:20 +01:00
Mikayla 6a1fb18334 Update to latest patterns for porting work 2023-11-03 10:46:47 -07:00
Max BrunsfeldandMarshall b085569b46 Add channel2 crate
Co-authored-by: Marshall <marshall@zed.dev>
2023-11-03 10:41:41 -07:00
Conrad Irwin d73c54f604 Add PointingHand on tabs 2023-11-03 11:30:15 -06:00
c604a2e34e Add hover behaviour to tabs
Co-Authored-By: Marshall <marshall@zed.dev>
Co-Authored-By: Nathan <nathan@zed.dev>
2023-11-03 10:55:07 -06:00
KCaverly a65c1776d8 port rope2 to zed2 2023-11-03 12:15:23 -04:00
Antonio Scandurra d3b02c4de4 WIP: start on editor element 2023-11-03 17:14:17 +01:00
Conrad IrwinandJulia 580694dbda Fix bug when unsubscribe called after remove
Co-Authored-By: Julia <julia@zed.dev>
2023-11-03 09:56:35 -06:00
Conrad Irwin 920ea1bf0a Make the close button close 2023-11-03 09:20:27 -06:00
Antonio Scandurra b5c2cf371a Ensure panes cover the available space 2023-11-03 16:14:03 +01:00
Conrad Irwin 0edcec7c4e Fix tab text colors 2023-11-03 09:12:12 -06:00
Marshall Bowers 363d7c6634 Exclude source themes from Zed2 binary 2023-11-03 11:11:10 -04:00
Kyle Caverly 343525d77b added workspace event for WorkspaceCreated (#3222)
added workspace2 event for WorkspaceCreated

Release Notes:

- NA
2023-11-03 11:06:11 -04:00
Marshall Bowers acc36e6dab Update emitted module import 2023-11-03 10:58:06 -04:00
Marshall Bowers 293fbe4c75 Account for colors in VS Code theme being optional 2023-11-03 10:54:12 -04:00