jenkins-bot has submitted this change and it was merged.

Change subject: Use text input's setLabel functionality in find dialog
......................................................................


Use text input's setLabel functionality in find dialog

The behaviour has been upstreamed in I521b36ea42.

Change-Id: Id08671cf0d0b2ea0ec809eb546aae0ce61a762e8
---
M src/themes/apex/dialogs.css
M src/themes/mediawiki/dialogs.css
M src/ui/dialogs/ve.ui.FindAndReplaceDialog.js
M src/ui/styles/dialogs/ve.ui.FindAndReplaceDialog.css
4 files changed, 16 insertions(+), 34 deletions(-)

Approvals:
  Catrope: Looks good to me, approved
  Jforrester: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/src/themes/apex/dialogs.css b/src/themes/apex/dialogs.css
index 39acd85..6b7895c 100644
--- a/src/themes/apex/dialogs.css
+++ b/src/themes/apex/dialogs.css
@@ -4,10 +4,4 @@
  * @copyright 2011-2015 VisualEditor Team and others; see 
http://ve.mit-license.org
  */
 
-/* ve.ui.FindAndReplaceDialog */
-
-.ve-ui-findAndReplaceDialog-focusedIndexLabel {
-       padding: 0.7em 0;
-       right: 1.4em;
-       color: #888;
-}
+/* Apex only styles go here */
\ No newline at end of file
diff --git a/src/themes/mediawiki/dialogs.css b/src/themes/mediawiki/dialogs.css
index f4a0777..61598a5 100644
--- a/src/themes/mediawiki/dialogs.css
+++ b/src/themes/mediawiki/dialogs.css
@@ -9,11 +9,3 @@
 .ve-ui-toolbarDialog .oo-ui-dialog-content > .oo-ui-window-body {
        outline: none;
 }
-
-/* ve.ui.FindAndReplaceDialog */
-
-.ve-ui-findAndReplaceDialog-focusedIndexLabel {
-       padding: 0.7em 0;
-       right: 1.4em;
-       color: #888;
-}
diff --git a/src/ui/dialogs/ve.ui.FindAndReplaceDialog.js 
b/src/ui/dialogs/ve.ui.FindAndReplaceDialog.js
index 5609587..32d495f 100644
--- a/src/ui/dialogs/ve.ui.FindAndReplaceDialog.js
+++ b/src/ui/dialogs/ve.ui.FindAndReplaceDialog.js
@@ -60,7 +60,6 @@
        this.query = null;
        this.findText = new OO.ui.TextInputWidget( {
                $: this.$,
-               classes: ['ve-ui-findAndReplaceDialog-cell', 
've-ui-findAndReplaceDialog-findText'],
                placeholder: ve.msg( 'visualeditor-find-and-replace-find-text' )
        } );
        this.matchCaseToggle = new OO.ui.ToggleButtonWidget( {
@@ -72,10 +71,6 @@
                $: this.$,
                icon: 'regular-expression',
                iconTitle: ve.msg( 
'visualeditor-find-and-replace-regular-expression' )
-       } );
-       this.focusedIndexLabel = new OO.ui.LabelWidget( {
-               $: this.$,
-               classes: ['ve-ui-findAndReplaceDialog-focusedIndexLabel']
        } );
 
        this.previousButton = new OO.ui.ButtonWidget( {
@@ -92,7 +87,6 @@
        } );
        this.replaceText = new OO.ui.TextInputWidget( {
                $: this.$,
-               classes: ['ve-ui-findAndReplaceDialog-cell'],
                placeholder: ve.msg( 
'visualeditor-find-and-replace-replace-text' )
        } );
        this.replaceButton = new OO.ui.ButtonWidget( {
@@ -159,14 +153,16 @@
        this.$body
                .append(
                        $findRow.append(
-                               this.findText.$element.append(
-                                       this.focusedIndexLabel.$element
+                               this.$( '<div>' ).addClass( 
've-ui-findAndReplaceDialog-cell ve-ui-findAndReplaceDialog-cell-input' 
).append(
+                                       this.findText.$element
                                ),
                                navigateGroup.$element,
                                optionsGroup.$element
                        ),
                        $replaceRow.append(
-                               this.replaceText.$element,
+                               this.$( '<div>' ).addClass( 
've-ui-findAndReplaceDialog-cell ve-ui-findAndReplaceDialog-cell-input' 
).append(
+                                       this.replaceText.$element
+                               ),
                                replaceGroup.$element,
                                doneButton.$element
                        )
@@ -376,11 +372,11 @@
                surfaceView = this.surface.getView();
 
        if ( this.results ) {
-               this.focusedIndexLabel.setLabel(
+               this.findText.setLabel(
                        ve.msg( 'visualeditor-find-and-replace-results', 
this.focusedIndex + 1, this.results )
                );
        } else {
-               this.focusedIndexLabel.setLabel(
+               this.findText.setLabel(
                        this.invalidRegex ? ve.msg( 
'visualeditor-find-and-replace-invalid-regex' ) : ''
                );
                return;
diff --git a/src/ui/styles/dialogs/ve.ui.FindAndReplaceDialog.css 
b/src/ui/styles/dialogs/ve.ui.FindAndReplaceDialog.css
index 9e4f813..1c47c68 100644
--- a/src/ui/styles/dialogs/ve.ui.FindAndReplaceDialog.css
+++ b/src/ui/styles/dialogs/ve.ui.FindAndReplaceDialog.css
@@ -15,27 +15,27 @@
        padding-bottom: 1px;
 }
 
-.ve-ui-findAndReplaceDialog-row .ve-ui-findAndReplaceDialog-cell {
+.ve-ui-findAndReplaceDialog-cell {
        display: table-cell;
        vertical-align: middle;
        white-space: nowrap;
        padding-right: 1em;
 }
 
-.ve-ui-findAndReplaceDialog-row .ve-ui-findAndReplaceDialog-cell:last-child {
+.ve-ui-findAndReplaceDialog-cell:last-child {
        padding-right: 0;
 }
 
-.ve-ui-findAndReplaceDialog-findText input {
-       padding-right: 6em;
+.ve-ui-findAndReplaceDialog-cell-input {
+       width: 100%;
+}
+
+.ve-ui-findAndReplaceDialog-cell-input .oo-ui-textInputWidget {
+       max-width: none;
 }
 
 .ve-ui-findAndReplaceDialog-findText-error input {
        background-color: #edd;
-}
-
-.ve-ui-findAndReplaceDialog-focusedIndexLabel {
-       position: absolute;
 }
 
 /* @noflip */

-- 
To view, visit https://gerrit.wikimedia.org/r/187443
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Id08671cf0d0b2ea0ec809eb546aae0ce61a762e8
Gerrit-PatchSet: 6
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders <[email protected]>
Gerrit-Reviewer: Catrope <[email protected]>
Gerrit-Reviewer: Esanders <[email protected]>
Gerrit-Reviewer: Jforrester <[email protected]>
Gerrit-Reviewer: Krinkle <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to