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

Make devTools styling more consistent and easier to edit event data. #1923

Merged
merged 4 commits into from
May 24, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions res/css/views/dialogs/_DevtoolsDialog.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,13 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

.mx_DevTools_content {
margin: 10px 0;
}

.mx_DevTools_RoomStateExplorer_button, .mx_DevTools_RoomStateExplorer_query {
margin-bottom: 10px;
width: 100%;
}

.mx_DevTools_label_left {
Expand All @@ -38,15 +43,13 @@ limitations under the License.

.mx_DevTools_inputLabelCell
{
padding-bottom: 21px;
display: table-cell;
font-weight: bold;
padding-right: 24px;
}

.mx_DevTools_inputCell {
display: table-cell;
padding-bottom: 21px;
width: 240px;
}

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

.mx_DevTools_textarea {
font-size: 12px;
max-width: 624px;
min-height: 250px;
padding: 10px;
width: 100%;
}

.mx_DevTools_tgl {
display: none;

Expand Down
14 changes: 7 additions & 7 deletions src/components/views/dialogs/DevtoolsDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,17 +132,17 @@ class SendCustomEvent extends GenericEditor {
}

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

<br />

<div className="mx_UserSettings_profileLabelCell">
<div className="mx_DevTools_inputLabelCell">
<label htmlFor="evContent"> { _t('Event Content') } </label>
</div>
<div>
<textarea id="evContent" onChange={this._onChange} value={this.state.evContent} className="mx_TextInputDialog_input" cols="63" rows="5" />
<textarea id="evContent" onChange={this._onChange} value={this.state.evContent} className="mx_DevTools_textarea" />
</div>
</div>
<div className="mx_Dialog_buttons">
Expand Down Expand Up @@ -219,15 +219,15 @@ class SendAccountData extends GenericEditor {
}

return <div>
<div className="mx_Dialog_content">
<div className="mx_DevTools_content">
{ this.textInput('eventType', _t('Event Type')) }
<br />

<div className="mx_UserSettings_profileLabelCell">
<div className="mx_DevTools_inputLabelCell">
<label htmlFor="evContent"> { _t('Event Content') } </label>
</div>
<div>
<textarea id="evContent" onChange={this._onChange} value={this.state.evContent} className="mx_TextInputDialog_input" cols="63" rows="5" />
<textarea id="evContent" onChange={this._onChange} value={this.state.evContent} className="mx_DevTools_textarea" />
</div>
</div>
<div className="mx_Dialog_buttons">
Expand Down Expand Up @@ -485,7 +485,7 @@ class AccountDataExplorer extends DevtoolsComponent {
}

return <div className="mx_ViewSource">
<div className="mx_Dialog_content">
<div className="mx_DevTools_content">
<SyntaxHighlight className="json">
{ JSON.stringify(this.state.event.event, null, 2) }
</SyntaxHighlight>
Expand Down