mirror of
https://github.com/usebruno/bruno.git
synced 2024-11-25 01:14:23 +01:00
* fix(#2605): fix editor view height * chore: disabled prettier on github actions
This commit is contained in:
parent
adb843faa7
commit
4598bb1bdd
12
.github/workflows/tests.yml
vendored
12
.github/workflows/tests.yml
vendored
@ -71,15 +71,3 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
files: packages/bruno-tests/collection/junit.xml
|
files: packages/bruno-tests/collection/junit.xml
|
||||||
comment_mode: always
|
comment_mode: always
|
||||||
prettier:
|
|
||||||
name: Prettier
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version-file: '.nvmrc'
|
|
||||||
- name: Install dependencies
|
|
||||||
run: npm ci --legacy-peer-deps
|
|
||||||
- name: Run Prettier
|
|
||||||
run: npm run test:prettier:web
|
|
||||||
|
2
package-lock.json
generated
2
package-lock.json
generated
@ -19668,7 +19668,7 @@
|
|||||||
},
|
},
|
||||||
"packages/bruno-electron": {
|
"packages/bruno-electron": {
|
||||||
"name": "bruno",
|
"name": "bruno",
|
||||||
"version": "v1.21.0",
|
"version": "v1.23.1",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@aws-sdk/credential-providers": "3.525.0",
|
"@aws-sdk/credential-providers": "3.525.0",
|
||||||
"@usebruno/common": "0.1.0",
|
"@usebruno/common": "0.1.0",
|
||||||
|
@ -6,6 +6,7 @@ const StyledWrapper = styled.div`
|
|||||||
border: solid 1px ${(props) => props.theme.codemirror.border};
|
border: solid 1px ${(props) => props.theme.codemirror.border};
|
||||||
font-family: ${(props) => (props.font ? props.font : 'default')};
|
font-family: ${(props) => (props.font ? props.font : 'default')};
|
||||||
line-break: anywhere;
|
line-break: anywhere;
|
||||||
|
flex: 1 1 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.CodeMirror-overlayscroll-horizontal div,
|
.CodeMirror-overlayscroll-horizontal div,
|
||||||
|
@ -289,7 +289,7 @@ export default class CodeEditor extends React.Component {
|
|||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<StyledWrapper
|
<StyledWrapper
|
||||||
className="h-full w-full"
|
className="h-full w-full flex flex-col relative"
|
||||||
aria-label="Code Editor"
|
aria-label="Code Editor"
|
||||||
font={this.props.font}
|
font={this.props.font}
|
||||||
ref={(node) => {
|
ref={(node) => {
|
||||||
|
@ -1,14 +1,6 @@
|
|||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
|
|
||||||
const StyledWrapper = styled.div`
|
const StyledWrapper = styled.div`
|
||||||
div.CodeMirror {
|
|
||||||
/* todo: find a better way */
|
|
||||||
height: calc(100vh - 240px);
|
|
||||||
|
|
||||||
.CodeMirror-scroll {
|
|
||||||
padding-bottom: 0px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.editing-mode {
|
.editing-mode {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
color: ${(props) => props.theme.colors.text.yellow};
|
color: ${(props) => props.theme.colors.text.yellow};
|
||||||
|
@ -37,8 +37,8 @@ const Documentation = ({ item, collection }) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<StyledWrapper className="mt-1 h-full w-full relative">
|
<StyledWrapper className="flex flex-col gap-y-1 h-full w-full relative">
|
||||||
<div className="editing-mode mb-2" role="tab" onClick={toggleViewMode}>
|
<div className="editing-mode" role="tab" onClick={toggleViewMode}>
|
||||||
{isEditing ? 'Preview' : 'Edit'}
|
{isEditing ? 'Preview' : 'Edit'}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -2,7 +2,6 @@ import styled from 'styled-components';
|
|||||||
|
|
||||||
const StyledMarkdownBodyWrapper = styled.div`
|
const StyledMarkdownBodyWrapper = styled.div`
|
||||||
background: transparent;
|
background: transparent;
|
||||||
height: inherit;
|
|
||||||
.markdown-body {
|
.markdown-body {
|
||||||
background: transparent;
|
background: transparent;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
|
@ -137,7 +137,7 @@ const HttpRequestPane = ({ item, collection, leftPaneWidth }) => {
|
|||||||
) : null}
|
) : null}
|
||||||
</div>
|
</div>
|
||||||
<section
|
<section
|
||||||
className={classnames('flex w-full', {
|
className={classnames('flex w-full flex-1', {
|
||||||
'mt-5': !isMultipleContentTab
|
'mt-5': !isMultipleContentTab
|
||||||
})}
|
})}
|
||||||
>
|
>
|
||||||
|
@ -4,6 +4,7 @@ const StyledWrapper = styled.div`
|
|||||||
div.CodeMirror {
|
div.CodeMirror {
|
||||||
background: ${(props) => props.theme.codemirror.bg};
|
background: ${(props) => props.theme.codemirror.bg};
|
||||||
border: solid 1px ${(props) => props.theme.codemirror.border};
|
border: solid 1px ${(props) => props.theme.codemirror.border};
|
||||||
|
flex: 1 1 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
textarea.cm-editor {
|
textarea.cm-editor {
|
||||||
|
@ -1,10 +1,6 @@
|
|||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
|
|
||||||
const Wrapper = styled.div`
|
const Wrapper = styled.div`
|
||||||
div.CodeMirror {
|
|
||||||
/* todo: find a better way */
|
|
||||||
height: calc(100vh - 220px);
|
|
||||||
}
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export default Wrapper;
|
export default Wrapper;
|
||||||
|
@ -40,8 +40,8 @@ const Script = ({ item, collection }) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<StyledWrapper className="w-full flex flex-col">
|
<StyledWrapper className="w-full flex flex-col">
|
||||||
<div className="flex-1 mt-2">
|
<div className="flex flex-col flex-1 mt-2 gap-y-2">
|
||||||
<div className="mb-1 title text-xs">Pre Request</div>
|
<div className="title text-xs">Pre Request</div>
|
||||||
<CodeEditor
|
<CodeEditor
|
||||||
collection={collection}
|
collection={collection}
|
||||||
value={requestScript || ''}
|
value={requestScript || ''}
|
||||||
@ -53,8 +53,8 @@ const Script = ({ item, collection }) => {
|
|||||||
onSave={onSave}
|
onSave={onSave}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex-1 mt-6">
|
<div className="flex flex-col flex-1 mt-2 gap-y-2">
|
||||||
<div className="mt-1 mb-1 title text-xs">Post Response</div>
|
<div className="title text-xs">Post Response</div>
|
||||||
<CodeEditor
|
<CodeEditor
|
||||||
collection={collection}
|
collection={collection}
|
||||||
value={responseScript || ''}
|
value={responseScript || ''}
|
||||||
|
@ -9,11 +9,11 @@ const Vars = ({ item, collection }) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<StyledWrapper className="w-full flex flex-col">
|
<StyledWrapper className="w-full flex flex-col">
|
||||||
<div className="flex-1 mt-2">
|
<div className="mt-2">
|
||||||
<div className="mb-1 title text-xs">Pre Request</div>
|
<div className="mb-1 title text-xs">Pre Request</div>
|
||||||
<VarsTable item={item} collection={collection} vars={requestVars} varType="request" />
|
<VarsTable item={item} collection={collection} vars={requestVars} varType="request" />
|
||||||
</div>
|
</div>
|
||||||
<div className="flex-1">
|
<div>
|
||||||
<div className="mt-1 mb-1 title text-xs">Post Response</div>
|
<div className="mt-1 mb-1 title text-xs">Post Response</div>
|
||||||
<VarsTable item={item} collection={collection} vars={responseVars} varType="response" />
|
<VarsTable item={item} collection={collection} vars={responseVars} varType="response" />
|
||||||
</div>
|
</div>
|
||||||
|
@ -158,10 +158,9 @@ const RequestTabPanel = () => {
|
|||||||
<section className="main flex flex-grow pb-4 relative">
|
<section className="main flex flex-grow pb-4 relative">
|
||||||
<section className="request-pane">
|
<section className="request-pane">
|
||||||
<div
|
<div
|
||||||
className="px-4"
|
className="px-4 h-full"
|
||||||
style={{
|
style={{
|
||||||
width: `${Math.max(leftPaneWidth, MIN_LEFT_PANE_WIDTH)}px`,
|
width: `${Math.max(leftPaneWidth, MIN_LEFT_PANE_WIDTH)}px`
|
||||||
height: `calc(100% - ${DEFAULT_PADDING}px)`
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{item.type === 'graphql-request' ? (
|
{item.type === 'graphql-request' ? (
|
||||||
|
@ -14,6 +14,8 @@ const Wrapper = styled.div`
|
|||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
scrollbar-width: none;
|
||||||
|
|
||||||
li {
|
li {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
max-width: 150px;
|
max-width: 150px;
|
||||||
|
@ -58,6 +58,12 @@ body::-webkit-scrollbar-thumb,
|
|||||||
border-radius: 5rem;
|
border-radius: 5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
* {
|
||||||
|
/* This ensures that scrollbars are only visible when the user starts to scroll,
|
||||||
|
providing a cleaner and more minimalistic appearance. */
|
||||||
|
scrollbar-width: thin;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* todo: this will be supported in the future to be changed via applying a theme
|
* todo: this will be supported in the future to be changed via applying a theme
|
||||||
* making all the checkboxes and radios bigger
|
* making all the checkboxes and radios bigger
|
||||||
|
Loading…
Reference in New Issue
Block a user