zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
48.97k stars 2.95k forks source link

Persistent Toggle Replace #15918

Open xcrap opened 2 months ago

xcrap commented 2 months ago

Check for existing issues

Describe the bug / provide steps to reproduce it

When you search for something, you click the "Toggle Replace" button that display the replace options. All good, but if you do another search it will reset the search panel and you have to click again on the "Toggle Replace" to replace again, if would be good (and I think natural) if when you click the Toggle Replace button and you keep searching this sub-panel would keep showed instead of reseting.

Environment

Zed: v0.146.5 (Zed) OS: macOS 14.6.0 Memory: 16 GiB Architecture: aarch64

If applicable, add mockups / screenshots to help explain present your vision of the feature

No response

If applicable, attach your Zed.log file to this issue.

No response

1925381584 commented 2 months ago

You can make another replace instead of another search.

xcrap commented 2 months ago

You can support making another replace instead of another search.

I do know we can go a replace directly, but in terms of UI consistency I think it makes sense if you toggle something with additional opens and you don''t close the panel next time it's open it should be open with the same settings ;)

1925381584 commented 2 months ago

Don't think in terms of UI, think in terms of commands :)

xcrap commented 2 months ago

Don't think in terms of UI, think in terms of commands :)

Of course, if you only use commands and shortcuts, it's a highly optimized and fast workflow. However, it's important to understand that some people prefer to use the UI. The UI is part of the app you use and should behave optimally. If you only use commands or shortcuts, you might as well use Vim. But since there are also UI/UX designers, the design is a crucial part of the tool.

Moreover, internationalization is vital. If you don't program in English, shortcuts are not always obvious. For example, F for "Find" and A for "All" might seem basic, but in Portuguese, it's P for "Procurar" (Find) and T for "Tudo" (All). If you don't change your keybindings, people who use other languages and multiple tools with different shortcuts for the same actions will rely more on the UI initially.

So, I believe it's all important. For me, it's all about the little details. 😊

1925381584 commented 2 months ago

Yeah, I thought about it some more. That interaction could really make more sense for someone thinking from the UI. Whether it's from the UI or from commands, for programming activities, thinking is about for not thinking. 😊