Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 6288e9b

Browse files
authored
Merge pull request #1923 from matrix-org/rxl881/devTools
Make devTools styling more consistent and easier to edit event data.
2 parents ab98bae + 7da51f2 commit 6288e9b

File tree

2 files changed

+20
-9
lines changed

2 files changed

+20
-9
lines changed

res/css/views/dialogs/_DevtoolsDialog.scss

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,13 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17+
.mx_DevTools_content {
18+
margin: 10px 0;
19+
}
20+
1721
.mx_DevTools_RoomStateExplorer_button, .mx_DevTools_RoomStateExplorer_query {
1822
margin-bottom: 10px;
23+
width: 100%;
1924
}
2025

2126
.mx_DevTools_label_left {
@@ -38,15 +43,13 @@ limitations under the License.
3843

3944
.mx_DevTools_inputLabelCell
4045
{
41-
padding-bottom: 21px;
4246
display: table-cell;
4347
font-weight: bold;
4448
padding-right: 24px;
4549
}
4650

4751
.mx_DevTools_inputCell {
4852
display: table-cell;
49-
padding-bottom: 21px;
5053
width: 240px;
5154
}
5255

@@ -62,6 +65,14 @@ limitations under the License.
6265
font-size: 16px;
6366
}
6467

68+
.mx_DevTools_textarea {
69+
font-size: 12px;
70+
max-width: 624px;
71+
min-height: 250px;
72+
padding: 10px;
73+
width: 100%;
74+
}
75+
6576
.mx_DevTools_tgl {
6677
display: none;
6778

src/components/views/dialogs/DevtoolsDialog.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -132,17 +132,17 @@ class SendCustomEvent extends GenericEditor {
132132
}
133133

134134
return <div>
135-
<div className="mx_Dialog_content">
135+
<div className="mx_DevTools_content">
136136
{ this.textInput('eventType', _t('Event Type')) }
137137
{ this.state.isStateEvent && this.textInput('stateKey', _t('State Key')) }
138138

139139
<br />
140140

141-
<div className="mx_UserSettings_profileLabelCell">
141+
<div className="mx_DevTools_inputLabelCell">
142142
<label htmlFor="evContent"> { _t('Event Content') } </label>
143143
</div>
144144
<div>
145-
<textarea id="evContent" onChange={this._onChange} value={this.state.evContent} className="mx_TextInputDialog_input" cols="63" rows="5" />
145+
<textarea id="evContent" onChange={this._onChange} value={this.state.evContent} className="mx_DevTools_textarea" />
146146
</div>
147147
</div>
148148
<div className="mx_Dialog_buttons">
@@ -219,15 +219,15 @@ class SendAccountData extends GenericEditor {
219219
}
220220

221221
return <div>
222-
<div className="mx_Dialog_content">
222+
<div className="mx_DevTools_content">
223223
{ this.textInput('eventType', _t('Event Type')) }
224224
<br />
225225

226-
<div className="mx_UserSettings_profileLabelCell">
226+
<div className="mx_DevTools_inputLabelCell">
227227
<label htmlFor="evContent"> { _t('Event Content') } </label>
228228
</div>
229229
<div>
230-
<textarea id="evContent" onChange={this._onChange} value={this.state.evContent} className="mx_TextInputDialog_input" cols="63" rows="5" />
230+
<textarea id="evContent" onChange={this._onChange} value={this.state.evContent} className="mx_DevTools_textarea" />
231231
</div>
232232
</div>
233233
<div className="mx_Dialog_buttons">
@@ -485,7 +485,7 @@ class AccountDataExplorer extends DevtoolsComponent {
485485
}
486486

487487
return <div className="mx_ViewSource">
488-
<div className="mx_Dialog_content">
488+
<div className="mx_DevTools_content">
489489
<SyntaxHighlight className="json">
490490
{ JSON.stringify(this.state.event.event, null, 2) }
491491
</SyntaxHighlight>

0 commit comments

Comments
 (0)