Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Select code editor component and finalize UX #2458

Closed
3 tasks done
wesbillman opened this issue Aug 20, 2024 · 1 comment · Fixed by #2477
Closed
3 tasks done

Select code editor component and finalize UX #2458

wesbillman opened this issue Aug 20, 2024 · 1 comment · Fixed by #2477
Assignees
Labels
console Web console dx

Comments

@wesbillman
Copy link
Collaborator

wesbillman commented Aug 20, 2024

We are currently using Codemirror for our editor.

In the past we have used Monaco, which was great and maybe the best option for us, but had some layout/resizing issues that need to be solved.

Another great option is Ace editor.

A good example experience we should use as inspiration is the Rust Playground. The layout and resizing is seamless and I really like the way the output window appears after a request is sent.

  • Evaluate and select a text editor component
  • Integrate and implement necessary features
    • Json Schema Validation
    • Syntax highlighting
    • Light/Dark mode switching
    • etc.
  • Layout
    • Show output only if there is something to show
    • Make output resizeable
@github-actions github-actions bot added the triage Issue needs triaging label Aug 20, 2024
@ftl-robot ftl-robot mentioned this issue Aug 20, 2024
@github-actions github-actions bot removed the triage Issue needs triaging label Aug 20, 2024
@wesbillman wesbillman added console Web console dx labels Aug 20, 2024
github-merge-queue bot pushed a commit that referenced this issue Aug 21, 2024
Issue: #2458

Changes:
* Response panel is only displayed when `Body` tab (i.e. Request tab) is
selected, instead of taking screen real estate away from the read-only
schema tabs
* Border between request and response panels is replaced with a
full-width draggable handle
* Related: fixed the existing bugs in
`components/ResizeableVerticalPanels.tsx`
* All codemirror components automatically take the full height of their
container


https://github.com/user-attachments/assets/9594c696-1ddb-4412-bd13-722c73cd7662

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@deniseli
Copy link
Contributor

deniseli commented Aug 21, 2024

  • Let's stick with codemirror6. It's a close race between that and monaco, but codemirror, esp v6, is way lighter weight and plays better with a modern js ecosystem. I messed around with fixing a few bugs to test out the dev experience and it's solid enough.
  • Core features seem pretty solid already. Main issues outstanding are:
    • It doesn't feel like a real editor. e.g. tab doesn't work. I'll pick that up next.
    • There are quite a few bugs around how we maintain the content of the request editor. I started fixing the localStorage one, but fixing that just exposes other state management bugs that are even more obvious, so I'm setting that change aside to fix it all in the redesign.
  • Layout was fixed in the PR above (fix: clean up codemirror panel resizing #2472)

github-merge-queue bot pushed a commit that referenced this issue Aug 21, 2024
Fixes #2458

Before, tabbing would change the focus to the next element on the page.
This adds the correct key binding so that hitting tab within the
codemirror editor actually inserts 2 spaces.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
console Web console dx
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants