jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/361887 )

Change subject: Show query template by default on embed.html
......................................................................


Show query template by default on embed.html

If a query template is set, the Query Helper is useful enough that we
can show it immediately, without waiting for the user to click the edit
button. (The button can still be used to toggle the Helper, this just
changes the default state.)

The Query Helper is toggled after a short timeout to prevent showing the
template with unrendered variables to the user if possible.

Change-Id: Iaebe5aa7107746b0c9a9c04b36f9f2551733020f
---
M embed.html
1 file changed, 4 insertions(+), 0 deletions(-)

Approvals:
  Jonas Kress (WMDE): Looks good to me, approved
  jenkins-bot: Verified



diff --git a/embed.html b/embed.html
index c890efe..3a8c2ac 100644
--- a/embed.html
+++ b/embed.html
@@ -232,6 +232,10 @@
                                                'html': true,
                                                'content': $editor
                                        } );
+                               if ( /^#TEMPLATE=/m.test( query ) ) {
+                                       // expand query template popover after 
allowing some time for labels to load
+                                       setTimeout( function() { $( '.edit' 
).click(); }, 500 );
+                               }
                        }
 
                        function renderQuery( query ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iaebe5aa7107746b0c9a9c04b36f9f2551733020f
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/gui
Gerrit-Branch: master
Gerrit-Owner: Lucas Werkmeister (WMDE) <[email protected]>
Gerrit-Reviewer: Jonas Kress (WMDE) <[email protected]>
Gerrit-Reviewer: Lucas Werkmeister (WMDE) <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to