-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Feature/monaco #1450
base: main
Are you sure you want to change the base?
Feature/monaco #1450
Conversation
…hortcuts and add style
Merging changes from 1.5.1
…s, a little bit of styling
…ce all existing CodeEditors
…ultiple IDE instances
…lement bru commands autocompletion
Please don't merge it now, it's almost ready. |
|
||
export const AppContext = React.createContext(); | ||
|
||
export const AppProvider = (props) => { | ||
useTelemetry(); | ||
useIpcEvents(); | ||
|
||
// useCollectionNextAction(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove if not needed
@@ -165,7 +164,7 @@ class SingleLineEditor extends Component { | |||
let variables = getAllVariables(this.props.collection); | |||
this.variables = variables; | |||
|
|||
defineCodeMirrorBrunoVariablesMode(variables, 'text/plain'); | |||
// defineCodeMirrorBrunoVariablesMode(variables, 'text/plain'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove if not needed
@@ -41,26 +41,28 @@ const Script = ({ item, collection }) => { | |||
return ( | |||
<StyledWrapper className="w-full flex flex-col"> | |||
<div className="flex-1 mt-2"> | |||
<div className="mb-1 title text-xs">Pre Request</div> | |||
<CodeEditor | |||
<h3 className="title text-xs mb-2">Pre Request</h3> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed to h3, but the same Pre request
title is also at least on request Vars tab. So would leave it as it was or change it everywhere to look the same.
<div className="mt-1 mb-1 title text-xs">Post Response</div> | ||
<CodeEditor | ||
<div className="flex-1 pb-6 mt-2"> | ||
<h3 className="mb-2 title text-xs">Post Response</h3> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed to h3, but the same Post response
title is also at least on request Vars tab. So would leave it as it was or change it everywhere to look the same.
@@ -5,22 +5,14 @@ | |||
* LICENSE file in the root directory of this source tree. | |||
*/ | |||
|
|||
import React from 'react'; | |||
/* import React from 'react'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove code (in whole file) if not needed instead of putting it in the comments.
@@ -18,6 +17,7 @@ import { sendRequest, saveRequest } from 'providers/ReduxStore/slices/collection | |||
import StyledWrapper from './StyledWrapper'; | |||
import Documentation from 'components/Documentation/index'; | |||
import GraphQLSchemaActions from '../GraphQLSchemaActions/index'; | |||
import { MonacoEditor } from 'components/MonacoEditor'; | |||
|
|||
const GraphQLRequestPane = ({ item, collection, leftPaneWidth, onSchemaLoad, toggleDocs, handleGqlClickReference }) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess handleGqlClickReference
could be removed if not needed anymore.
Thanks for your feedback @martinsefcik , yes indeed i still have some fixes to do regarding the {{..}} syntax, i got it to work, my only issue is with the tooltip. I solved the single line issue and the background color, the border is a bit more difficult, i wanted to do it with pure tailwind classes but we're still in tailwind v2, we don't have child selectors enabled. |
… variables in json not working, tooltip infinite re render
Well i fixed a lot of stuff there but there are two things i can't make function properly :
|
@helloanoop i added the changes you required, we can now switch between Monaco and Codemirror (codemirror is on by default) |
…d remove word highlight onBlur
- Better styling for singleline editor - Multiline singleline editor - Improved hover Ref: usebruno#1450
I was thinking of submitting a PR with the monaco editor, glad I checked first! Any progress on this recently? Think it's something we'll see in the near future? |
Hi @andrew-telus i'm no longer working on the Bruno project and this PR will be converted to draft. |
Description
Integration of the Monaco Editor (same one that's powering Visual Studio Code)
This integration will provide a more user-friendly code editor for all of those used to Vs Code or IntelliJ.
It will also help us enhance the coding experience and make it easier to add our own custom commands later on.
Major benefits :
Veed.Create.Edit.mp4
Closing issue #1339
Contribution Checklist:
Note: Keeping the PR small and focused helps make it easier to review and merge. If you have multiple changes you want to make, please consider submitting them as separate pull requests.
Publishing to New Package Managers
Please see here for more information.