Skip to content

Commit aa4844e

Browse files
committed
Improve editor styling
1 parent 6dee1e9 commit aa4844e

File tree

2 files changed

+15
-8
lines changed

2 files changed

+15
-8
lines changed

src/components/ExperimentalEditor.tsx

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,17 @@ export const ExperimentalEditor = ({ query, onChange, onRunQuery, editorContext
5757

5858
return (
5959
<>
60-
<InfoBox severity="warning">
61-
{`The features listed here are experimental. They might change or be removed without notice. In the tooltip for each feature, there's a link to a pull request where you can submit feedback for that feature.`}
60+
<InfoBox severity="warning" style={{ maxWidth: '700px', whiteSpace: 'normal' }}>
61+
<p>
62+
The features listed here are experimental. They might change or be removed without notice. In the tooltip for
63+
each feature, there's a link to a pull request where you can submit feedback for that feature.
64+
</p>
6265
</InfoBox>
6366
{editorContext === 'default' && (
6467
<>
6568
<InlineFieldRow>
6669
<InlineField
70+
labelWidth={12}
6771
label="Group by"
6872
tooltip={
6973
<>
@@ -84,7 +88,7 @@ export const ExperimentalEditor = ({ query, onChange, onRunQuery, editorContext
8488
>
8589
<Select
8690
placeholder={'Field'}
87-
width={12}
91+
width={20}
8892
isClearable={true}
8993
value={fieldNames.find((v) => v.value === groupByField)}
9094
options={fieldNames}
@@ -94,6 +98,7 @@ export const ExperimentalEditor = ({ query, onChange, onRunQuery, editorContext
9498
</InlineFieldRow>
9599
<InlineFieldRow>
96100
<InlineField
101+
labelWidth={12}
97102
label="Metric"
98103
tooltip={
99104
<>
@@ -110,7 +115,7 @@ export const ExperimentalEditor = ({ query, onChange, onRunQuery, editorContext
110115
>
111116
<Select
112117
placeholder={'Field'}
113-
width={12}
118+
width={20}
114119
isClearable={true}
115120
value={fieldNames.find((v) => v.value === metricField)}
116121
options={fieldNames}
@@ -124,6 +129,7 @@ export const ExperimentalEditor = ({ query, onChange, onRunQuery, editorContext
124129
<>
125130
<InlineFieldRow>
126131
<InlineField
132+
labelWidth={15}
127133
label="Variable text"
128134
tooltip={
129135
<>
@@ -140,7 +146,7 @@ export const ExperimentalEditor = ({ query, onChange, onRunQuery, editorContext
140146
>
141147
<Select
142148
placeholder={'Field'}
143-
width={12}
149+
width={20}
144150
isClearable={true}
145151
value={fieldNames.find((v) => v.value === variableTextField)}
146152
options={fieldNames}
@@ -150,6 +156,7 @@ export const ExperimentalEditor = ({ query, onChange, onRunQuery, editorContext
150156
</InlineFieldRow>
151157
<InlineFieldRow>
152158
<InlineField
159+
labelWidth={15}
153160
label="Variable value"
154161
tooltip={
155162
<>
@@ -166,7 +173,7 @@ export const ExperimentalEditor = ({ query, onChange, onRunQuery, editorContext
166173
>
167174
<Select
168175
placeholder={'Field'}
169-
width={12}
176+
width={20}
170177
isClearable={true}
171178
value={fieldNames.find((v) => v.value === variableValueField)}
172179
options={fieldNames}

src/components/QueryEditor.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,12 +185,12 @@ export const QueryEditor: React.FC<Props> = ({
185185
</InlineField>
186186
</InlineFieldRow>
187187
{query.method === 'GET' && query.body && (
188-
<InfoBox severity="warning">
188+
<InfoBox severity="warning" style={{ maxWidth: '700px', whiteSpace: 'normal' }}>
189189
{"GET requests can't have a body. The body you've defined will be ignored."}
190190
</InfoBox>
191191
)}
192192
{(query.headers ?? []).map(([key, _]) => key.toLowerCase()).find((_) => sensitiveHeaders.includes(_)) && (
193-
<InfoBox severity="warning">
193+
<InfoBox severity="warning" style={{ maxWidth: '700px', whiteSpace: 'normal' }}>
194194
{
195195
"It looks like you're adding credentials in the header. Since queries are stored unencrypted, it's strongly recommended that you add any secrets to the data source config instead."
196196
}

0 commit comments

Comments
 (0)