AkshaySG14 / haystack-public

7 stars 0 forks source link

[Feature] Maximize one editor #28

Open TwentyXX opened 2 months ago

TwentyXX commented 2 months ago

I would like to be able to maximize the screen of one editor.

AkshaySG14 commented 2 months ago

Does using "pin editor" in the floating toolbar work for this? Alternatively, using alt+enter?

TwentyXX commented 2 months ago

I tried using those two, but they did not work as expected. I would like something that, once applied, would follow the size of the window in a fixed manner and resize the editor.... I think it would be easier to use if we could temporarily apply standard VSCode-like behavior within Haystack Editor when checking code with other applications open....

AkshaySG14 commented 2 months ago

What do you mean "follow the size of the window" in a fixed manner? Just to double check, this is the functionality you're seeing correct?

https://github.com/user-attachments/assets/13d44255-0a30-4f80-80af-f8a66e805c8a

TwentyXX commented 2 months ago

Yes, it is.I tried the same feature as in that video, but that is not what I want. I want the ability to resize the editor reactively when the application window is resized.When the feature is turned on, it temporarily behaves like the standard VSCode, and when it is turned off, it reverts to the Haystack Editor canvas function.

Thank you. *The text may be difficult to understand because of the DeepL translation.

AkshaySG14 commented 2 months ago

Hey @TwentyXX if it's not too much trouble could you take a video of this? If it's as easy as resizing the editor based on the window size, I can definitely do it!

TwentyXX commented 2 months ago

About the feature

When turned on, the size of one selected editor fits perfectly in the window. This is similar to the behavior of the editor in VSCode. In effect, it temporarily compacts the Haystack display. Also, if line wrapping is enabled in this state, the code is essentially not hidden by resizing the window. (unless the code is too long vertically).

If turned off, the window will revert to the standard Haystack Editor display. The positioning of the editors will not be changed, nor will the size of the editor be changed.

Necessity

Ensuring that the display areas of the window and the editor are aligned ensures that the resizing of the window does not hide part of a long line. This makes it much easier to maneuver windows when there are multiple applications in use at the same time. The screen will no longer flicker with each Alt+Tab.

Usage Examples

First, a single source can be viewed in a large display. (Like Full Screen or Zen Mode in VSCode). Other practical examples include editing code (e.g. JavaScript) in the Haystack Editor while opening another application (e.g. Chrome's DevTools), executing part of the expression you are editing, and pasting the repeated result into the editor each time, Use it to move the focus back and forth between applications.

Turning it off seamlessly returns the display to its standard state, visually organizing other code and split functions, allowing you to refocus your attention and start planning and editing again. This means you can flow back and forth between applications without having to paste data into other compact text editors such as VSCode or Notepad.

image video

I have not been able to develop the feature, nor am I confident that I could actually produce a useful scene, having only created a simple video, but here is what I imagine it would look like

https://github.com/user-attachments/assets/206c2cd4-ad88-4a5b-8ef5-fc4d414d57d6

If necessary, I will create another video similar to the application example when I have time.

In fact, it is a bad habit to write code without line breaks until one line becomes very long, and having operations across applications in the workflow is not ideal by nature. Still, I thought that this editor would gain more versatile usefulness with the implementation of this feature. Also, as it stands, this editor is not well suited for opening multiple types of applications side by side, so if you start such a task, you don't have to keep it open all the time, but it is a hassle to move from one editor to another that you like.

By the way, the Haystack Editor is a great idea and my favorite editor has easily moved from VSCode to the Haystack Editor. (I knew Cursor was talked about, but I hardly use it.) I believe that this feature will introduce a little more compactness, ease, and ease of handling to the conceptual enormity of the Haystack Editor. Frankly, the editor still doesn't seem like a stable operation, and I think it lacks some of the features that seem necessary in the expanded areas, but I continue to be impressed by the power of the concept and improvements that outweigh them. I look forward to the improvements with each update.

Thanks for the daily replies.