[GH-ISSUE #1110] Collapsed Editor can be resized and dragging down doesn't increase code view #390

Closed
opened 2026-03-16 15:02:34 +03:00 by kerem · 8 comments
Owner

Originally created by @joeljstephen on GitHub (Aug 24, 2020).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/1110

Describe the bug
When I pull the resize button of the code editor, it doesn't the resize the code in the editor.

To Reproduce
Steps to reproduce the behavior:

  1. Click the resize button on the code editor and drag it down
  2. The code doesn't resize

Expected behavior
I expected the code to resize as I drag down the button.

Screenshots
If applicable, add screenshots to help explain your problem.
Capture

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser: Firefox

Additional context
When I press the expand button, it works though.

Originally created by @joeljstephen on GitHub (Aug 24, 2020). Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/1110 **Describe the bug** When I pull the resize button of the code editor, it doesn't the resize the code in the editor. **To Reproduce** Steps to reproduce the behavior: 1. Click the resize button on the code editor and drag it down 2. The code doesn't resize **Expected behavior** I expected the code to resize as I drag down the button. **Screenshots** If applicable, add screenshots to help explain your problem. <img width="1354" alt="Capture" src="https://user-images.githubusercontent.com/70131076/91014653-67de4180-e607-11ea-948f-6c8605b774dc.PNG"> **Desktop (please complete the following information):** - OS: Windows 10 - Browser: Firefox **Additional context** When I press the expand button, it works though.
kerem 2026-03-16 15:02:34 +03:00
Author
Owner
<!-- gh-comment-id:678991757 --> @liyasthomas commented on GitHub (Aug 24, 2020): I'll look into it. refer: https://jsfiddle.net/6b2tfspe/1/ https://stackoverflow.com/questions/27534263/making-ace-editor-resizable https://stackoverflow.com/questions/28785588/how-to-get-the-ace-editor-to-adjust-to-its-parent-div
Author
Owner

@AndrewBastin commented on GitHub (Aug 26, 2020):

I played around a bit to see what is causing it and found that the maxLines property might be relevant

Here is a snippet from JSON Lens Renderer:
github.com/hoppscotch/hoppscotch@3cd2a2a0f9/components/lenses/renderers/JSONLensRenderer.vue (L43-L57)

<!-- gh-comment-id:680532612 --> @AndrewBastin commented on GitHub (Aug 26, 2020): I played around a bit to see what is causing it and found that the `maxLines` property might be relevant Here is a snippet from JSON Lens Renderer: https://github.com/hoppscotch/hoppscotch/blob/3cd2a2a0f9c9f507be6736b829f637dba336e10f/components/lenses/renderers/JSONLensRenderer.vue#L43-L57
Author
Owner

@AndrewBastin commented on GitHub (Aug 30, 2020):

Another possible option is to restart the efforts for moving to CodeMirror. I had attempted before, just that the only issue was that editor expanded the response panel.

Ace is really difficult to work with and pretty much impossible to test the functionality of due to its weird Webpack Resolution thingy and the codebase feels really legacy.

CodeMirror is pretty modern, supports mobile devices and we already have a sorta working implementation going.

You can check out the stale branch in my fork. https://github.com/AndrewBastin/hoppscotch/tree/feat/move-to-codemirror

<!-- gh-comment-id:683369146 --> @AndrewBastin commented on GitHub (Aug 30, 2020): Another possible option is to restart the efforts for moving to CodeMirror. I had attempted before, just that the only issue was that editor expanded the response panel. Ace is really difficult to work with and pretty much impossible to test the functionality of due to its weird Webpack Resolution thingy and the codebase feels really legacy. CodeMirror is pretty modern, supports mobile devices and we already have a sorta working implementation going. You can check out the stale branch in my fork. https://github.com/AndrewBastin/hoppscotch/tree/feat/move-to-codemirror
Author
Owner

@liyasthomas commented on GitHub (Aug 30, 2020):

Let me check.

<!-- gh-comment-id:683370201 --> @liyasthomas commented on GitHub (Aug 30, 2020): Let me check.
Author
Owner

@LeoMartinDev commented on GitHub (Oct 4, 2020):

Another possible option is to restart the efforts for moving to CodeMirror. I had attempted before, just that the only issue was that editor expanded the response panel.

Ace is really difficult to work with and pretty much impossible to test the functionality of due to its weird Webpack Resolution thingy and the codebase feels really legacy.

CodeMirror is pretty modern, supports mobile devices and we already have a sorta working implementation going.

You can check out the stale branch in my fork. https://github.com/AndrewBastin/hoppscotch/tree/feat/move-to-codemirror

What about monaco ? It's the VSCode editor https://github.com/egoist/vue-monaco

I can take this issue if no on is working on it

<!-- gh-comment-id:703251096 --> @LeoMartinDev commented on GitHub (Oct 4, 2020): > Another possible option is to restart the efforts for moving to CodeMirror. I had attempted before, just that the only issue was that editor expanded the response panel. > > Ace is really difficult to work with and pretty much impossible to test the functionality of due to its weird Webpack Resolution thingy and the codebase feels really legacy. > > CodeMirror is pretty modern, supports mobile devices and we already have a sorta working implementation going. > > You can check out the stale branch in my fork. https://github.com/AndrewBastin/hoppscotch/tree/feat/move-to-codemirror What about monaco ? It's the VSCode editor https://github.com/egoist/vue-monaco I can take this issue if no on is working on it
Author
Owner

@liyasthomas commented on GitHub (Oct 4, 2020):

@AndrewBastin once implemented a codemirror port. We refused monaco because it doesn't had mobile responsive support. We can consider it if it is responsive. Andrew, wdyt? It looks like now there's a monaco editor component for Vue.

<!-- gh-comment-id:703252364 --> @liyasthomas commented on GitHub (Oct 4, 2020): @AndrewBastin once implemented a [codemirror port](https://github.com/AndrewBastin/hoppscotch/tree/feat/move-to-codemirror). We refused monaco because it doesn't had mobile responsive support. We can consider it if it is responsive. Andrew, wdyt? It looks like now there's a monaco editor component for Vue.
Author
Owner

@LeoMartinDev commented on GitHub (Oct 4, 2020):

@AndrewBastin once implemented a codemirror port. We refused monaco because it doesn't had mobile responsive support. We can consider it if it is responsive. Andrew, wdyt? It looks like now there's a monaco editor component for Vue.

Indeed, from their Readme :

Is the editor supported in mobile browsers or mobile web app frameworks?
No.

<!-- gh-comment-id:703256740 --> @LeoMartinDev commented on GitHub (Oct 4, 2020): > @AndrewBastin once implemented a [codemirror port](https://github.com/AndrewBastin/hoppscotch/tree/feat/move-to-codemirror). We refused monaco because it doesn't had mobile responsive support. We can consider it if it is responsive. Andrew, wdyt? It looks like now there's a monaco editor component for Vue. Indeed, from their Readme : > ❓ Is the editor supported in mobile browsers or mobile web app frameworks? > No.
Author
Owner

@AndrewBastin commented on GitHub (Oct 4, 2020):

@AndrewBastin once implemented a codemirror port. We refused monaco because it doesn't had mobile responsive support. We can consider it if it is responsive. Andrew, wdyt? It looks like now there's a monaco editor component for Vue.

To be honest, I prefer Monaco as well as it is a lot more battle tested and advanced compared to CodeMirror, but Monaco doesn't support mobile devices as stated by @LeoMartinDev and we don't exactly have a definite plan to drop mobile devices just yet. But if that happens and we decide to drop mobile support for Hoppscotch, we can choose to move ahead with Monaco.

<!-- gh-comment-id:703285563 --> @AndrewBastin commented on GitHub (Oct 4, 2020): > @AndrewBastin once implemented a [codemirror port](https://github.com/AndrewBastin/hoppscotch/tree/feat/move-to-codemirror). We refused monaco because it doesn't had mobile responsive support. We can consider it if it is responsive. Andrew, wdyt? It looks like now there's a monaco editor component for Vue. To be honest, I prefer Monaco as well as it is a lot more battle tested and advanced compared to CodeMirror, but Monaco doesn't support mobile devices as stated by @LeoMartinDev and we don't exactly have a definite plan to drop mobile devices just yet. But if that happens and we decide to drop mobile support for Hoppscotch, we can choose to move ahead with Monaco.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#390
No description provided.