mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-25 16:55:59 +03:00
[GH-ISSUE #1110] Collapsed Editor can be resized and dragging down doesn't increase code view #390
Labels
No labels
CodeDay
a11y
browser limited
bug
bug fix
cli
core
critical
design
desktop
discussion
docker
documentation
duplicate
enterprise
feature
feature
fosshack
future
good first issue
hacktoberfest
help wanted
i18n
invalid
major
minor
need information
need testing
not applicable to hoppscotch
not reproducible
pull-request
question
refactor
resolved
sandbox
self-host
spam
stale
testmu
wip
wont fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hoppscotch#390
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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:
Expected behavior
I expected the code to resize as I drag down the button.
Screenshots

If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Additional context
When I press the expand button, it works though.
@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
@AndrewBastin commented on GitHub (Aug 26, 2020):
I played around a bit to see what is causing it and found that the
maxLinesproperty might be relevantHere is a snippet from JSON Lens Renderer:
github.com/hoppscotch/hoppscotch@3cd2a2a0f9/components/lenses/renderers/JSONLensRenderer.vue (L43-L57)@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
@liyasthomas commented on GitHub (Aug 30, 2020):
Let me check.
@LeoMartinDev commented on GitHub (Oct 4, 2020):
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
@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.
@LeoMartinDev commented on GitHub (Oct 4, 2020):
Indeed, from their Readme :
@AndrewBastin commented on GitHub (Oct 4, 2020):
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.