Commit Graph
51 Commits
Author SHA1 Message Date
Nathan Sobo 6b14f2fd08 Rename build_view to new_view and build_model to new_model (#3823)
The word "new" is shorter and blends in with `new` constructors that are
common in Rust. Been meaning to do this for a while.

Release Notes:

- N/A
2024-01-02 08:11:53 -07:00
Piotr Osiewicz 1c20a7fc37 search: Add "Error" borders for query editors with malformed content. (#3824)
This commit also changes the way search queries are built (we do not bail early anymore if include/exclude editor queries are malformed) to propagate error status of the panel.
Release Notes:

- N/A
2024-01-02 10:43:50 +01:00
Nathan Sobo db1cf8f6e1 Rename build_view to new_view and build_model to new_model
The word "new" is shorter and blends in with `new` constructors that are common
in Rust. Been meaning to do this for a while.
2024-01-01 17:42:01 -07:00
Nathan Sobo 51d1d92d66 Attempt to return impl Element from render. 3 errors. 2024-01-01 14:23:02 +01:00
Nathan Sobo 4680aad885 Correctly compute placeholder text for buffer search query editor (#3749)
Rather than relying on the focused element, instead explicitly pass the
focus handle for the query editor when determining the prev/next
bindings. Only compute these values once.

Release Notes:

- N/A
2023-12-20 20:48:31 -07:00
Marshall Bowers 11807bb82d Add large variant for buttons 2023-12-20 18:47:22 -05:00
Marshall Bowers 93c8bee747 Use ToggleButtons for search mode in buffer search 2023-12-20 18:32:12 -05:00
Marshall Bowers e5e8e8882f Inline toggle replace button 2023-12-20 17:34:08 -05:00
Marshall Bowers 2ac472e0e0 Inline buttons 2023-12-20 17:31:36 -05:00
Marshall Bowers 8a8b498ee1 Style replace input 2023-12-20 17:25:38 -05:00
Marshall Bowers b493d8f6c0 Improve spacing of items in buffer search bar 2023-12-20 17:10:27 -05:00
Nathan Sobo d499cccebb Only compute placeholder text once 2023-12-20 14:47:56 -07:00
Nathan Sobo 9acb5825e6 Compute the query editor placeholder text with a focus handle
So we're not beholden to the current focus.
2023-12-20 13:00:52 -07:00
Marshall Bowers 7bc9319871 Apply padding at the toolbar level (#3720)
This PR adjusts the padding in the toolbar to be applied within the
toolbar itself.

Previously the different elements within the toolbar were applying their
own padding, which led to inconsistencies.

Release Notes:

- N/A
2023-12-19 16:01:03 -05:00
Marshall Bowers 616ea131af Style buffer search input (#3713)
This PR styles the text input for the buffer search.

Release Notes:

- N/A
2023-12-19 12:11:06 -05:00
Kirill Bulatov 4bfe46f53a Restore zed1 behavior for buffer search deploy 2023-12-15 12:23:03 +02:00
Marshall Bowers 61ab1834c7 Deploy the buffer search in a second row in the toolbar (#3630)
This PR updates the buffer search to deploy to a second row in the
toolbar, instead of trying to deploy into the initial row.

This is the same way it works in Zed1.

Release Notes:

- N/A
2023-12-13 13:06:53 -05:00
Piotr Osiewicz 13f9fec0bd fixup! Move away from using cx.dispatch_action in buffer search 2023-12-12 16:38:58 +01:00
Piotr Osiewicz be57059195 Move away from using cx.dispatch_action in buffer search 2023-12-12 16:36:00 +01:00
Piotr Osiewicz 1c437a2b92 Register buffer search listener on new workspaces and not editors 2023-12-12 14:23:52 +01:00
Conrad Irwin 9ce7395b74 Restore impl_actions! and remove derive(Action) 2023-12-10 19:33:38 -07:00
Conrad Irwin 4290c67b6a Restore namespace parameter to actions!
This does not yet fix `derive(Action)`, but will conflict with a lot so
wanted to merge quickly.
2023-12-09 15:18:31 -07:00
Piotr Osiewicz d0a673ec62 buffer_search: Add tooltips, polish keybinds 2023-12-08 12:37:20 +01:00
Piotr Osiewicz 8839bfa1df Remove unused import 2023-12-07 13:54:51 +01:00
Piotr Osiewicz 18393d1fac fixup! buffer search: Fix up rough edges 2023-12-07 13:13:38 +01:00
Piotr Osiewicz 45f7ab876f buffer search: Fix up rough edges
Focus query editor when Deploy::focused is true, add missing bindings
2023-12-07 12:52:34 +01:00
Antonio ScandurraandMarshall cc9eff89f5 Use a handler instead of an action for clicks
This prevents dispatching actions on buttons that were not the target of the click.

Co-Authored-By: Marshall <marshall@zed.dev>
2023-12-06 19:12:01 +01:00
Antonio Scandurra b29cea287b WIP 2023-12-06 12:12:28 +01:00
Marshall Bowers b357ae4dc3 Add new Button and IconButton components (#3448)
This PR adds new `Button` and `IconButton` components built on top of
our new button abstractions.

Both of these buttons are built from the common `ButtonLike` base, and
implement the `ButtonCommon` (name TBD) trait in order to provide a
common interface.

There are still some visual tweaks that we'll need to make to the new
buttons, but those should be straightforward to make after we land this.

Release Notes:

- N/A
2023-11-29 17:41:44 -05:00
Conrad Irwin 107c3d7f67 Fix esc in command palette
Also: add editor.register_action
2023-11-27 14:32:22 -07:00
Nathan Sobo c23f17ee0b Reorganize element-related traits 2023-11-22 11:19:43 -07:00
Piotr OsiewiczandMikayla 3e329861f9 Brave new world awaits
Co-authored-by: Mikayla <mikayla@zed.dev>
2023-11-21 00:47:47 +01:00
Piotr Osiewicz fe0a8b4be2 Fix warnings in tests 2023-11-20 19:25:14 +01:00
Piotr Osiewicz d60855b06d Merge branch 'main' into search2 2023-11-20 19:23:35 +01:00
Piotr Osiewicz 99ef8ccd3f fixup dismissing of search bar 2023-11-20 19:07:37 +01:00
Piotr Osiewicz fa8cd843ca fixup! Merge branch 'main' into search2 2023-11-20 18:42:15 +01:00
Piotr Osiewicz ad38708ede Remove dbg statements 2023-11-20 18:31:30 +01:00
Piotr Osiewicz c1f0ac30a0 Fix up tests once and for good 2023-11-20 18:24:37 +01:00
Piotr Osiewicz 8d4828a2e8 Circumvent part of the tests 2023-11-20 13:43:56 +01:00
Piotr Osiewicz 3b5754a77e Clean up tests (they compile now) 2023-11-17 17:23:47 +01:00
Piotr Osiewicz 27600b6b8d Remove dead code (for now).
Ensure actions are registed just once (previously some were registered on both Workspace and search bar itself).
2023-11-17 14:42:20 +01:00
Piotr Osiewicz 741e11cc11 Fix up action derive 2023-11-17 13:27:33 +01:00
Piotr Osiewicz 8845f5a183 Clean up warnings 2023-11-17 13:22:07 +01:00
Piotr Osiewicz f8b91bd0f0 Fix some of the warnings 2023-11-16 18:36:19 +01:00
Piotr Osiewicz 69e01e67dc Bind cycle_mode action 2023-11-15 15:22:35 +01:00
Piotr Osiewicz c37faf0ab3 Add query history and replace buttons 2023-11-15 15:05:48 +01:00
Piotr Osiewicz b11bfa8821 Merge branch 'main' into search2 2023-11-15 12:54:26 +01:00
Piotr OsiewiczandNate c14efb74d7 Finish up touchups for search UI.
Co-authored-by: Nate <nate@zed.dev>
2023-11-14 18:18:52 +01:00
Piotr OsiewiczandNate 08dde94299 WIP styling
Co-authored-by: Nate <nate@zed.dev>
2023-11-14 17:59:53 +01:00
Piotr Osiewicz 6c69e40e5c WIP 2023-11-14 16:56:31 +01:00