From 43536a7dfc6bf81eda2cf132245fdf6dcb53f2a4 Mon Sep 17 00:00:00 2001 From: AhmadHddad Date: Fri, 24 Sep 2021 14:50:13 +0300 Subject: [PATCH 1/6] adding workspace to gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 0b60dfa..192f67e 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ dist node_modules .vscode-test/ *.vsix +postCode.code-workspace From f9173dad7e372f25110e74f2fa4a4775dd5bb724 Mon Sep 17 00:00:00 2001 From: AhmadHddad Date: Sat, 25 Sep 2021 13:15:07 +0300 Subject: [PATCH 2/6] request-options-window-wrapper overflow auto --- webview/components/RequestOptionsWindow/styles.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webview/components/RequestOptionsWindow/styles.css b/webview/components/RequestOptionsWindow/styles.css index f3770f6..3ba9184 100644 --- a/webview/components/RequestOptionsWindow/styles.css +++ b/webview/components/RequestOptionsWindow/styles.css @@ -1,5 +1,5 @@ .request-options-window-wrapper { flex: 1; padding: 5px 20px 10px 20px; - overflow: scroll; + overflow: auto; } From ec5fefdff68a30d3d7cd8e6aa3699662155db035 Mon Sep 17 00:00:00 2001 From: AhmadHddad Date: Sat, 25 Sep 2021 13:15:36 +0300 Subject: [PATCH 3/6] passing new option to manco editor to layout --- webview/shared/Editor/index.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/webview/shared/Editor/index.tsx b/webview/shared/Editor/index.tsx index 491f84d..1df96ae 100644 --- a/webview/shared/Editor/index.tsx +++ b/webview/shared/Editor/index.tsx @@ -20,6 +20,7 @@ const Editor = (props) => { minimap: { enabled: false }, scrollBeyondLastLine: false, theme: "vs-dark", + automaticLayout: true, value, language, readOnly, From 79926ea40e6cf1801c10810e7ceea0b25e05626f Mon Sep 17 00:00:00 2001 From: AhmadHddad Date: Sat, 25 Sep 2021 13:15:56 +0300 Subject: [PATCH 4/6] request-options-wrapper resizable --- webview/pages/Postcode/styles.css | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/webview/pages/Postcode/styles.css b/webview/pages/Postcode/styles.css index 6489a9f..87da55f 100644 --- a/webview/pages/Postcode/styles.css +++ b/webview/pages/Postcode/styles.css @@ -7,11 +7,13 @@ .request-options-wrapper { display: flex; flex-direction: column; - min-height: 50%; + height: inherit; + resize: vertical; + overflow: auto; } .response-wrapper { display: flex; flex-direction: column; - height: 50%; + height: inherit; } From f2edac200995eac083eac11bba9e1d1bc8c534af Mon Sep 17 00:00:00 2001 From: AhmadHddad Date: Mon, 27 Sep 2021 20:45:27 +0300 Subject: [PATCH 5/6] automaticLayout as prop and passing it to monaco --- webview/shared/Editor/index.tsx | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/webview/shared/Editor/index.tsx b/webview/shared/Editor/index.tsx index 1df96ae..3ee63b0 100644 --- a/webview/shared/Editor/index.tsx +++ b/webview/shared/Editor/index.tsx @@ -6,8 +6,16 @@ import { useAppDispatch } from "../../redux/hooks"; import { requestBodyRawFormatUpdated } from "../../features/requestBody/requestBodySlice"; const Editor = (props) => { - const { value, language, onChange, readOnly, className, copyButton, format } = - props; + const { + value, + language, + onChange, + readOnly, + className, + copyButton, + format, + automaticLayout, + } = props; const divEl = React.useRef(null); const [editor, setEditor] = React.useState(undefined); @@ -20,7 +28,7 @@ const Editor = (props) => { minimap: { enabled: false }, scrollBeyondLastLine: false, theme: "vs-dark", - automaticLayout: true, + automaticLayout, value, language, readOnly, @@ -94,6 +102,7 @@ Editor.propTypes = { readOnly: propTypes.bool, copyButton: propTypes.bool, format: propTypes.bool, + automaticLayout: propTypes.bool, }; export default Editor; From 9eb1657a65666053028091864bea10414a12d816 Mon Sep 17 00:00:00 2001 From: AhmadHddad Date: Mon, 27 Sep 2021 20:45:46 +0300 Subject: [PATCH 6/6] passing automaticLayout as true to editor --- webview/features/response/ResponseBody/index.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/webview/features/response/ResponseBody/index.tsx b/webview/features/response/ResponseBody/index.tsx index 1b3f268..875bb61 100644 --- a/webview/features/response/ResponseBody/index.tsx +++ b/webview/features/response/ResponseBody/index.tsx @@ -14,6 +14,7 @@ export const ResponseBody = (props) => {
loading
}>