Commit Graph
14133 Commits
Author SHA1 Message Date
Joseph T. LyonsandPiotr Osiewicz 33b5e84df2 Improve get preview channel changes script
- Filter out N/As
- Identify missing release note lines

Co-Authored-By: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
2023-11-08 11:40:53 -05:00
Joseph T. Lyons 3ffe1f8323 v0.113.x dev 2023-11-08 10:53:37 -05:00
Antonio Scandurra fafc884460 Wire up mouse interaction in editor2 (#3267)
Release Notes:

- N/A
2023-11-08 15:36:47 +01:00
Antonio Scandurra ef746a7850 💄 2023-11-08 15:33:11 +01:00
Antonio Scandurra cdf34d6847 Determine whether the gutter was hovered 2023-11-08 15:30:41 +01:00
Antonio Scandurra 67587e1c9f Handle MouseUpEvent in editor2 2023-11-08 15:17:30 +01:00
Antonio Scandurra 679a424cfa Move building of key listeners outside of EditorElement::initialize 2023-11-08 15:12:54 +01:00
Antonio ScandurraandPiotr 80153eac26 Clear hover background highlights
Co-Authored-By: Piotr <piotr@zed.dev>
2023-11-08 15:08:54 +01:00
Piotr OsiewiczandAntonio 5aca7c134f Uncomment mouse_dragged event
Co-authored-by: Antonio <antonio@zed.dev>
2023-11-08 15:02:35 +01:00
Piotr OsiewiczandAntonio e51bbf5e31 Extract mouse event handlers into paint_mouse_listeners
Co-authored-by: Antonio <antonio@zed.dev>
2023-11-08 14:40:08 +01:00
Piotr OsiewiczandAntonio 88292143b6 Hook up mouse_down function handler
Co-authored-by: Antonio <antonio@zed.dev>
2023-11-08 14:36:05 +01:00
Piotr OsiewiczandAntonio cf2db788b3 Pass text_bounds instead of full editor bounds into mouse_moved.
Co-authored-by: Antonio <antonio@zed.dev>
2023-11-08 14:28:16 +01:00
Piotr Osiewicz 5c2b0222b8 uncomment show_hover 2023-11-08 14:24:28 +01:00
Piotr Osiewicz 3172fe1347 uncomment mouse moved 2023-11-08 14:24:28 +01:00
Antonio Scandurra 3761ddc44e gpui2: Type-erase futures. (#3266)
Project2's LLVM IR size is ~33-44% bigger than project1 due to the fact
that in gpui2 we call async_task::spawn(_local) with impl Future instead
of dyn Future, which leads to quite a few more instantiations of
RawTask.

LLVM-IR size for project2:
|  build_type  |  main   |  this branch  | project1 |
|  debug       | 2617795 |    2022814    | 1817866  |
|  release     | 4439033 |    3715086    | 3314489  |

Note that this PR is in line with what was done in GPUI1 (we've also
boxed futures there).
Release Notes:

- N/A
2023-11-08 14:21:40 +01:00
Antonio Scandurra 60a32d15e2 Re-enable most of the features in editor2 (#3265)
Release Notes:

- N/A
2023-11-08 14:20:09 +01:00
Piotr Osiewicz afd33a5881 gpui2: Type-erase futures.
Project2's LLVM IR size is ~20-25% bigger than project1 due to the fact that in gpui2 we call async_task::spawn(_local) with impl Future instead of dyn Future, which leads to quite a few more instantiations of RawTask.

LLVM-IR size for project2:
|  build_type  |  main   |  this branch  | project1 |
|  debug       | 2617795 |    2022814    | 1817866  |
|  release     | 4439033 |    3715086    | 3314489  |
2023-11-08 13:06:28 +01:00
Antonio ScandurraandPiotr 9e4ecdadc0 Fix warnings when generating function name for ctor
Co-Authored-By: Piotr <piotr@zed.dev>
2023-11-08 12:31:35 +01:00
Antonio ScandurraandPiotr 7fe0dda068 Don't alpha blend when rasterizing paths
Co-Authored-By: Piotr <piotr@zed.dev>
2023-11-08 12:04:25 +01:00
Antonio Scandurra 00932568f2 Re-enable most of the functionalities in editor2 2023-11-08 11:30:32 +01:00
Nathan Sobo 9892022d9d Register actions statically / globally (#3264)
This updates our approach to action registration to make it
static/global.

There are 3 different approaches to creating an action, depending on the
complexity of your action's implementation. All of them involve defining
a data type with the correct trait implementations and registering it,
each a bit more powerful / verbose.

* Define a simple list of unit structs that implement `Action` -
`actions!(Foo, Bar, Baz)`
* Make a more complex data type into an action with `#[action]`. This
derives all the necessary traits and registers the action.
  ```rs
  #[action]
  struct MoveLeft {
    word: true
  }
  ```
* Implement all traits yourself and just register the action with
`#[register_action]`.

Release Notes:

N/A
2023-11-07 22:05:59 -07:00
Nathan Sobo 1907b5e5f4 Remove call to removed method 2023-11-07 21:58:46 -07:00
Nathan Sobo 513c56ca34 Merge remote-tracking branch 'origin/main' into register-actions 2023-11-07 21:56:08 -07:00
Nathan Sobo f5930b86ae Simplify actions macro. 2023-11-07 21:48:47 -07:00
Nathan Sobo bcf8a98ff7 Docs and cleanup 2023-11-07 21:26:51 -07:00
Nathan Sobo a2fac01ccf Register actions globally before main 2023-11-07 20:58:37 -07:00
Nathan Sobo e6128e3c91 WIP 2023-11-07 20:23:02 -07:00
Nate Butler d92ff9e291 Update default theme player colors and add players story (#3263)
[[PR Description]]

- Update the default theme player colors for `Zed Pro Moonlight` and
`Zed Pro Daylight`
- Adds the ability to create stories in the `theme2` crate


![image](https://github.com/zed-industries/zed/assets/1714999/61fca222-1512-43b1-a229-fae1080d07fa)

You can see them by running:
- `cargo run -p storybook2 -- components/players --theme "Zed Pro
Daylight"`
- `cargo run -p storybook2 -- components/players --theme`

The player colors crisscross back and forth on the color wheel so that
the colors are as distinct as possible.


![image](https://github.com/zed-industries/zed/assets/1714999/255c9fd2-34da-4f75-9aad-0dd02f7009bf)

We do have room to add additional players if needed. Just let me know if
we feel like the default 8 aren't cutting it.


Release Notes:

- N/A
2023-11-07 22:00:49 -05:00
Nate Butler bbabbb2860 Add new default player colors and the players story. 2023-11-07 21:51:12 -05:00
Nate Butler 0817153b76 Extend the theme crate to enable stories, add players story 2023-11-07 21:08:33 -05:00
Nate Butler 26f779d477 Update default player colors 2023-11-07 20:27:00 -05:00
Max Brunsfeld 609b886917 Implement basic text input handling (#3262)
This PR adds basic text input to Editors in zed2.

Note that we have *not* yet implemented the
`InputHandler::bounds_for_range` method on `Editor`, so the composition
and emoji picker windows are not yet positioned correctly.
2023-11-07 16:57:26 -08:00
Max BrunsfeldandMarshall 60c1d02011 Get basic text input working
Co-authored-by: Marshall <marshall@zed.dev>
2023-11-07 16:33:02 -08:00
Max BrunsfeldandMarshall 136c115219 Assign editors as text input handlers
Co-authored-by: Marshall <marshall@zed.dev>
2023-11-07 15:44:00 -08:00
4a89dcfdfc Implement an InputHandler trait for gpui2
Co-Authored-By: Marshall <marshall@zed.dev>
Co-Authored-By: Max <max@zed.dev>
Co-Authored-By: Julia <julia@zed.dev>
2023-11-07 16:30:04 -07:00
Conrad Irwin ae6c4f16be Make it possible to render a single line editor (#3259)
[[PR Description]]

Release Notes:

- (Added|Fixed|Improved) ...
([#<public_issue_number_if_exists>](https://github.com/zed-industries/community/issues/<public_issue_number_if_exists>)).
2023-11-07 14:26:10 -07:00
Conrad Irwin e2c4392dbf Add text and focus to editor 2023-11-07 14:19:15 -07:00
Conrad Irwin 01143d7c0e Make it possible to render a single line editor 2023-11-07 14:05:23 -07:00
Mikayla Maki fb65fad22b editor singleline (#3257)
- Implement Editor::single_line
- Fix confusing error message
- Fix loading keyfiles
- Wire up GoToLine modal
2023-11-07 11:41:33 -08:00
Nate Butler 88b5dda755 Start documenting ThemeColors (#3258)
[[PR Description]]
- Adds doc comments for most fields on ThemeColors
- Scaffolds out some upcoming additional fields (Will add in a later PR)
- Renames a few fields:
    - `element_placeholder` -> `element_placeholder_text`
    - `element_drop_target` -> `drop_target_background`
- Removes the redundant `element_placeholder_text` (This should be set
using `text_placeholder`

Release Notes:

- N/A
2023-11-07 14:14:56 -05:00
Conrad Irwin 43f553a161 Wire up GoToLine modal 2023-11-07 12:12:05 -07:00
Conrad Irwin 315859be63 Fix loading keyfiles 2023-11-07 12:04:37 -07:00
Conrad Irwin ba346432e8 Fix confusing error message 2023-11-07 12:04:21 -07:00
Nate Butler a5eb90dc5e Continue documenting theme colors 2023-11-07 14:04:09 -05:00
Nate Butler 0b0195f75e Merge branch 'main' into document-theme 2023-11-07 13:36:08 -05:00
Nate Butler 723ac00cbf Begin documenting theme colors 2023-11-07 13:36:01 -05:00
Conrad Irwin 2d9315082c Implement Editor::single_line 2023-11-07 11:12:36 -07:00
Antonio Scandurra 7426071844 Implement movement in editor2 (#3256)
Release Notes:

- N/A
2023-11-07 19:12:09 +01:00
Conrad Irwin 7caf684353 modals2 (#3247)
New Modal implementation for gpui2

Release Notes:

N/A
2023-11-07 10:56:46 -07:00
Antonio Scandurra 61a5f961ec Merge remote-tracking branch 'origin/main' into editor-movement 2023-11-07 18:50:43 +01:00