Jonas Kress (WMDE) has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/371483 )
Change subject: Update Query Helper and editor size when content changes ...................................................................... Update Query Helper and editor size when content changes When opening example query 'horses' there is a vertical scrolling bar and the editor overflows the parent div. This patch updates the size when the content changes to fix this. Change-Id: Ica096964c6eb4658e0340ac0611414a304376787 --- M wikibase/queryService/ui/App.js 1 file changed, 5 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/wikidata/query/gui refs/changes/83/371483/1 diff --git a/wikibase/queryService/ui/App.js b/wikibase/queryService/ui/App.js index 1867d68..55d6147 100644 --- a/wikibase/queryService/ui/App.js +++ b/wikibase/queryService/ui/App.js @@ -224,6 +224,11 @@ }, 1500 ) ); } + $( '.query-helper' ).bind( 'DOMSubtreeModified', _.debounce( function () { + self._updateQueryHelperMinWidth(); + self._updateQueryEditorSize(); + }, 100 ) ); + $( '.query-helper .panel-heading .close' ).click( function() { Cookies.set( cookieHide, true ); $( '.query-helper' ).addClass( 'query-helper-hidden' ); @@ -256,7 +261,6 @@ this._queryHelper.setQuery( this._editor.getValue() || DEFAULT_QUERY ); this._queryHelper.draw( $( '.query-helper .panel-body' ) ); $( '.query-helper' ).css( 'min-width', '' ); - this._updateQueryHelperMinWidth(); // TODO also do this after labels in the query helper have loaded } catch ( e ) { // Temporarily disabled due to T171935 // TODO: Re-enable when handling of WITH is fixed -- To view, visit https://gerrit.wikimedia.org/r/371483 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ica096964c6eb4658e0340ac0611414a304376787 Gerrit-PatchSet: 1 Gerrit-Project: wikidata/query/gui Gerrit-Branch: master Gerrit-Owner: Jonas Kress (WMDE) <jonas.kr...@wikimedia.de> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits