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

Language editor tweaks #1803

Merged
merged 27 commits into from Dec 13, 2023
Merged

Language editor tweaks #1803

merged 27 commits into from Dec 13, 2023

Conversation

rathboma
Copy link
Collaborator

@rathboma rathboma commented Nov 30, 2023

Minor tweaks to the excellent PR #1769

TODO:

  • Instead of showing errors when clicking 'done'. Debounce the error check and have it be at the bottom right of the editor all the time
  • Editing an array does not work. It should open it as a JSON array
  • There are two scrollbars (both x and y). I don't know why
  • If it can't open a column for some reason (eg binary data), it should not just open a blank editor window
  • Make sure the editor modal is always a good vertical size, even when resizing

@rathboma
Copy link
Collaborator Author

rathboma commented Dec 6, 2023

@azmy60 Looking nice! Great style update.

Some stuff that still needs fixing:

  • I accidentally killed my code to add a Wrap Text checkbox to the header. This should be checked by default for text and markdown types, but unchecked for others. I implemented it by adding a wrapTextByDefault to the LanguageData, Codemirror has a setting to Wrap Text. Can you add this?

  • When editing a long string, it goes off the right side of the editor modal, but you can't scroll to the end
    image

  • Is there a way to make the height dynamic to the content but give it a max height? For example this JSON object isn't very big, so we could display the whole thing easily if the modal were bigger initially (rather than having to manually resize it every time:
    image
    image

  • There is no horizontal scrollbar

@azmy60
Copy link
Contributor

azmy60 commented Dec 6, 2023

There's def a way to make the height dynamic. Also, for some reason, making the vertical scrollbar to work with codemirror was a headache 💀. I'll look into that.

- add format and minify as options instead of applying them
  automatically
- vim mode didn't work
- make scrollbars not transparent but colored properly.
Especially when we're typing in the editor. There are keybindings that
conflict with the TableTable keyboard shortcuts. E.g. Ctrl+Right,
Ctrl+D (in vim mode).
@azmy60
Copy link
Contributor

azmy60 commented Dec 7, 2023

Added action menu:

image

@rathboma rathboma merged commit 64feac0 into master Dec 13, 2023
4 checks passed
@rathboma rathboma deleted the language-editor branch December 13, 2023 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants