Skip to content

Commit 64d9544

Browse files
author
Rachit Singh
committed
Minor UI fixes
1 parent 8abc916 commit 64d9544

5 files changed

Lines changed: 26 additions & 18 deletions

File tree

src/components/atoms/Editor.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,5 +47,5 @@ export const Editor = ({ ...props }) => {
4747
};
4848
}, []);
4949

50-
return <div ref={editor} className='cm-editor cm-scroller'></div>;
50+
return <div ref={editor} className={`${props.classes} overflow-auto`}></div>;
5151
};

src/components/molecules/flow/nodes/OutputNode.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,12 @@ const OutputNode = ({ id, data }) => {
2929
)}
3030
<div className='w-full text-xs text-gray-900 border border-gray-300 rounded-lg nodrag nowheel min-w-72 bg-gray-50 outline-blue-300 focus:border-blue-100 focus:ring-blue-100'>
3131
{data.output ? (
32-
<Editor name='output-text' value={JSON.stringify(data.output, null, 2)} readOnly={true} />
32+
<Editor
33+
name='output-text'
34+
value={JSON.stringify(data.output, null, 2)}
35+
readOnly={true}
36+
classes={'w-80 h-80'}
37+
/>
3338
) : (
3439
<div className='p-2'>{'Run flow to see data'}</div>
3540
)}

src/components/molecules/flow/nodes/RequestNode.js

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -114,14 +114,14 @@ const RequestNode = ({ id, data }) => {
114114
handleRightData={{ type: 'source' }}
115115
>
116116
<div className='min-w-80'>
117-
<div className='flex'>
117+
<div className='flex items-center justify-center gap-2 py-4'>
118118
<Listbox
119119
value={data.requestType}
120120
onChange={(selectedValue) => {
121121
setRequestNodeType(id, selectedValue);
122122
}}
123123
>
124-
<div className='relative min-w-36'>
124+
<div className='relative w-36'>
125125
<Listbox.Button className='relative w-full p-2 text-left border rounded cursor-default border-cyan-950'>
126126
<span className='block truncate'>{data.requestType}</span>
127127
<span className='absolute inset-y-0 right-0 flex items-center pr-2 pointer-events-none'>
@@ -134,12 +134,12 @@ const RequestNode = ({ id, data }) => {
134134
leaveFrom='opacity-100'
135135
leaveTo='opacity-0'
136136
>
137-
<Listbox.Options className='absolute w-full py-1 mt-1 overflow-auto text-base bg-white max-h-60 focus:outline-none'>
137+
<Listbox.Options className='absolute z-50 w-full py-1 mt-1 overflow-auto text-base bg-white max-h-60 focus:outline-none'>
138138
{requestTypes.map((reqType) => (
139139
<Listbox.Option
140140
key={reqType}
141141
className={({ active }) =>
142-
`relative cursor-default select-none py-2 pl-10 pr-4 hover:font-semibold ${
142+
`relative cursor-default select-none py-2 pl-7 pr-4 hover:font-semibold ${
143143
active ? 'bg-background-light text-slate-900' : ''
144144
}`
145145
}
@@ -149,7 +149,7 @@ const RequestNode = ({ id, data }) => {
149149
<>
150150
<span className={`block`}>{reqType}</span>
151151
{selected ? (
152-
<span className='absolute inset-y-0 left-0 flex items-center pl-3 font-semibold'>
152+
<span className='absolute inset-y-0 left-0 flex items-center pl-1 font-semibold'>
153153
<CheckIcon className='w-5 h-5' aria-hidden='true' />
154154
</span>
155155
) : null}
@@ -161,14 +161,12 @@ const RequestNode = ({ id, data }) => {
161161
</Transition>
162162
</div>
163163
</Listbox>
164-
<div className='pb-4'>
165-
<TextInput
166-
placeHolder={`Enter URL for a ${data.requestType} request`}
167-
onChangeHandler={handleUrlInputChange}
168-
name={'url'}
169-
value={data.url ? data.url : ''}
170-
/>
171-
</div>
164+
<TextInput
165+
placeHolder={`Enter URL for a ${data.requestType} request`}
166+
onChangeHandler={handleUrlInputChange}
167+
name={'url'}
168+
value={data.url ? data.url : ''}
169+
/>
172170
</div>
173171
<NodeHorizontalDivider />
174172
<RequestBody nodeId={id} nodeData={data} />

src/components/molecules/modals/OutputNodeExpandedModal.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,12 @@ const OuputNodeExpandedModal = ({ closeFn = () => null, open = false, data }) =>
4747
Ouput
4848
</Dialog.Title>
4949
<div className='mt-6'>
50-
<Editor name='output-text' value={JSON.stringify(data, null, 2)} readOnly={true} />
50+
<Editor
51+
name='output-text'
52+
value={JSON.stringify(data, null, 2)}
53+
readOnly={true}
54+
classes={'w-40 h-40'}
55+
/>
5156
</div>
5257
</Dialog.Panel>
5358
</Transition.Child>

src/index.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,11 +129,11 @@ details summary::-webkit-details-marker {
129129
}
130130

131131
/* Editor related styles */
132-
.cm-editor {
132+
/* .cm-editor {
133133
max-width: 384px;
134134
max-height: 384px;
135135
overflow: auto !important;
136136
}
137137
.cm-scroller {
138138
overflow: auto;
139-
}
139+
} */

0 commit comments

Comments
 (0)