props.theme.bg};
+ color: ${(props) => props.theme.text};
+ border: solid 1px ${(props) => props.theme.modal.input.border};
+ padding: 1em;
+ resize: none;
+
+ &:focus,
+ &:active,
+ &:focus-within,
+ &:focus-visible,
+ &:target {
+ border: solid 1px ${(props) => props.theme.modal.input.focusBorder} !important;
+ outline: ${(props) => props.theme.modal.input.focusBorder} !important;
+ }
+
+ ::-webkit-scrollbar {
+ width: 0px;
+ }
+
+ ::-webkit-scrollbar-button {
+ display: none;
+ }
+`;
+
+export default StyledTextarea;
diff --git a/packages/bruno-app/src/components/TextareaEditor/index.js b/packages/bruno-app/src/components/TextareaEditor/index.js
new file mode 100644
index 00000000..19c4c2ee
--- /dev/null
+++ b/packages/bruno-app/src/components/TextareaEditor/index.js
@@ -0,0 +1,7 @@
+import StyledTextarea from './StyledTextarea';
+
+const TextareaEditor = (props) => {
+ return
;
+};
+
+export default TextareaEditor;
diff --git a/packages/bruno-app/src/pageComponents/Index/index.js b/packages/bruno-app/src/pageComponents/Index/index.js
index 9f4de243..76484993 100644
--- a/packages/bruno-app/src/pageComponents/Index/index.js
+++ b/packages/bruno-app/src/pageComponents/Index/index.js
@@ -9,6 +9,7 @@ import StyledWrapper from './StyledWrapper';
import 'codemirror/theme/material.css';
import 'codemirror/theme/monokai.css';
import 'codemirror/addon/scroll/simplescrollbars.css';
+import Documentation from 'components/Documentation';
const SERVER_RENDERED = typeof navigator === 'undefined' || global['PREVENT_CODEMIRROR_RENDER'] === true;
if (!SERVER_RENDERED) {
@@ -56,7 +57,7 @@ export default function Main() {
-
+
{showHomePage ? (
) : (
diff --git a/packages/bruno-app/src/providers/ReduxStore/slices/collections/index.js b/packages/bruno-app/src/providers/ReduxStore/slices/collections/index.js
index 8140dcf7..5d6baa9d 100644
--- a/packages/bruno-app/src/providers/ReduxStore/slices/collections/index.js
+++ b/packages/bruno-app/src/providers/ReduxStore/slices/collections/index.js
@@ -1337,6 +1337,20 @@ export const collectionsSlice = createSlice({
if (collection) {
collection.runnerResult = null;
}
+ },
+ updateRequestDocs: (state, action) => {
+ const collection = findCollectionByUid(state.collections, action.payload.collectionUid);
+
+ if (collection) {
+ const item = findItemInCollection(collection, action.payload.itemUid);
+
+ if (item && isItemARequest(item)) {
+ if (!item.draft) {
+ item.draft = cloneDeep(item);
+ }
+ item.draft.request.docs = action.payload.docs;
+ }
+ }
}
}
});
@@ -1413,7 +1427,8 @@ export const {
resetRunResults,
runRequestEvent,
runFolderEvent,
- resetCollectionRunner
+ resetCollectionRunner,
+ updateRequestDocs
} = collectionsSlice.actions;
export default collectionsSlice.reducer;
diff --git a/packages/bruno-app/src/themes/dark.js b/packages/bruno-app/src/themes/dark.js
index 3dda2505..9ad9d6d8 100644
--- a/packages/bruno-app/src/themes/dark.js
+++ b/packages/bruno-app/src/themes/dark.js
@@ -223,6 +223,7 @@ const darkTheme = {
table: {
border: '#333',
thead: {
+ bg: '#4d4d4d',
color: 'rgb(204, 204, 204)'
},
striped: '#2A2D2F',
@@ -233,6 +234,11 @@ const darkTheme = {
plainGrid: {
hoverBg: '#3D3D3D'
+ },
+
+ rightPane: {
+ bg: '#1e1e1e',
+ border: '#4f4f4f'
}
};
diff --git a/packages/bruno-app/src/themes/light.js b/packages/bruno-app/src/themes/light.js
index 5b9f1a8b..f4fe9f4d 100644
--- a/packages/bruno-app/src/themes/light.js
+++ b/packages/bruno-app/src/themes/light.js
@@ -227,6 +227,7 @@ const lightTheme = {
table: {
border: '#efefef',
thead: {
+ bg: '#f4f4f4',
color: '#616161'
},
striped: '#f3f3f3',
@@ -237,6 +238,11 @@ const lightTheme = {
plainGrid: {
hoverBg: '#f4f4f4'
+ },
+
+ rightPane: {
+ bg: '#fff',
+ border: '#e1e1e1'
}
};
diff --git a/packages/bruno-app/src/utils/collections/index.js b/packages/bruno-app/src/utils/collections/index.js
index e4532b7e..0b98fbc2 100644
--- a/packages/bruno-app/src/utils/collections/index.js
+++ b/packages/bruno-app/src/utils/collections/index.js
@@ -384,7 +384,8 @@ export const transformRequestToSaveToFilesystem = (item) => {
script: _item.request.script,
vars: _item.request.vars,
assertions: _item.request.assertions,
- tests: _item.request.tests
+ tests: _item.request.tests,
+ docs: _item.request.docs
}
};
diff --git a/packages/bruno-electron/src/bru/index.js b/packages/bruno-electron/src/bru/index.js
index 18f739f5..342e1b49 100644
--- a/packages/bruno-electron/src/bru/index.js
+++ b/packages/bruno-electron/src/bru/index.js
@@ -116,7 +116,8 @@ const bruToJson = (bru) => {
script: _.get(json, 'script', {}),
vars: _.get(json, 'vars', {}),
assertions: _.get(json, 'assertions', []),
- tests: _.get(json, 'tests', '')
+ tests: _.get(json, 'tests', ''),
+ docs: _.get(json, 'docs', '')
}
};
@@ -169,7 +170,8 @@ const jsonToBru = (json) => {
res: _.get(json, 'request.vars.res', [])
},
assertions: _.get(json, 'request.assertions', []),
- tests: _.get(json, 'request.tests', '')
+ tests: _.get(json, 'request.tests', ''),
+ docs: _.get(json, 'request.docs', '')
};
return jsonToBruV2(bruJson);
diff --git a/packages/bruno-schema/src/collections/index.js b/packages/bruno-schema/src/collections/index.js
index 1721d386..e63d8c3d 100644
--- a/packages/bruno-schema/src/collections/index.js
+++ b/packages/bruno-schema/src/collections/index.js
@@ -127,7 +127,8 @@ const requestSchema = Yup.object({
.strict()
.nullable(),
assertions: Yup.array().of(keyValueSchema).nullable(),
- tests: Yup.string().nullable()
+ tests: Yup.string().nullable(),
+ docs: Yup.string().nullable()
})
.noUnknown(true)
.strict();