From 3948520eaa8a627653e0d9bc24f54f862179bb77 Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Mon, 1 Apr 2019 17:39:12 +0100 Subject: [PATCH] Use Field component in bug report dialog This uses the field component in the bug report dialog, which generally improves the styling to fit in more naturally with the rest of the app so that it feels more trustworthy. Fixes https://github.com/vector-im/riot-web/issues/9343 --- res/css/views/dialogs/_BugReportDialog.scss | 37 ++----------- .../views/dialogs/BugReportDialog.js | 54 +++++++++---------- src/i18n/strings/en_EN.json | 5 +- 3 files changed, 32 insertions(+), 64 deletions(-) diff --git a/res/css/views/dialogs/_BugReportDialog.scss b/res/css/views/dialogs/_BugReportDialog.scss index e00d446eda..90ef55b945 100644 --- a/res/css/views/dialogs/_BugReportDialog.scss +++ b/res/css/views/dialogs/_BugReportDialog.scss @@ -14,39 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. */ -.mx_BugReportDialog_field_container { - display: flex; -} - -.mx_BugReportDialog_field_label { - flex-basis: 150px; - - text-align: right; - - padding-top: 9px; - padding-right: 4px; - - line-height: 18px; +.mx_BugReportDialog .mx_Field { + flex: 1; } .mx_BugReportDialog_field_input { - flex-grow: 1; - - /* taken from mx_ChatInviteDialog_inputContainer */ - border-radius: 3px; - border: solid 1px $input-border-color; - - font-size: 14px; - - padding-left: 4px; - padding-right: 4px; - padding-top: 7px; - padding-bottom: 7px; - - margin-bottom: 4px; -} - -.mx_BugReportDialog_field_input[type="text" i] { - padding-top: 9px; - padding-bottom: 9px; + // TODO: We should really apply this to all .mx_Field inputs. + // See https://github.com/vector-im/riot-web/issues/9344. + flex: 1; } diff --git a/src/components/views/dialogs/BugReportDialog.js b/src/components/views/dialogs/BugReportDialog.js index c874049cc6..4f9b592691 100644 --- a/src/components/views/dialogs/BugReportDialog.js +++ b/src/components/views/dialogs/BugReportDialog.js @@ -108,6 +108,7 @@ export default class BugReportDialog extends React.Component { const Loader = sdk.getComponent("elements.Spinner"); const BaseDialog = sdk.getComponent('views.dialogs.BaseDialog'); const DialogButtons = sdk.getComponent('views.elements.DialogButtons'); + const Field = sdk.getComponent('elements.Field'); let error = null; if (this.state.err) { @@ -154,36 +155,29 @@ export default class BugReportDialog extends React.Component { }, ) }

-
- - -
-
- -