Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport SchemaAlignment.resize() removal #6073

Merged
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div id="schema-alignment-tab">
<div bind="schemaHeader">
<div bind="schemaHeader" class="schema-alignment-header">
<div class="schema-alignment-save"><button class="button button-primary" bind="saveButton"></button><br /><button class="button button-primary" bind="discardButton"></button></div>
<p class="panel-explanation"><label bind="targetWikibaseLabel" for="wikibase-instance-selector"></label> <select bind="wikibaseSelect" name="wikibase-instance-selector" id="wikibase-instance-selector"></select></p>
<p class="panel-explanation" bind="dialogExplanation"></p>
Expand Down
12 changes: 0 additions & 12 deletions extensions/wikibase/module/scripts/schema-alignment.js
Original file line number Diff line number Diff line change
Expand Up @@ -315,18 +315,6 @@ SchemaAlignment.switchTab = function(targetTab) {
}
};

SchemaAlignment.resize = function() {
if (this._viewPanel) {
var panelHeight = this._viewPanel.height();
this._schemaPanel.height(panelHeight);
this._issuesPanel.height(panelHeight);
this._previewPanel.height(panelHeight);
// Resize the inside of the schema panel
var headerHeight = this._schemaElmts.schemaHeader.outerHeight();
this._schemaElmts.canvas.height(panelHeight - headerHeight - 10);
}
};

SchemaAlignment.isSetUp = function() {
return SchemaAlignment._isSetUp;
};
Expand Down
18 changes: 13 additions & 5 deletions extensions/wikibase/module/styles/schema-alignment.less
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@
height: 100%;
}

#schema-alignment-tab {
overflow: hidden;
}

.main-view-panel-tab-header {
margin-top: 9px;
margin-left: 7px;
Expand All @@ -46,8 +42,8 @@
}

.schema-alignment-dialog-canvas {
background: white;
overflow-y: auto;
margin-bottom: 3em;
}

.schema-alignment-dialog-entity-edits-area {
Expand All @@ -60,6 +56,18 @@
overflow-y: auto;
}

.schema-alignment-header {
position: sticky;
top: 0;
padding-top: 1em;
background-color: var(--background-primary);
z-index: 1;
}

.schema-alignment-header .panel-explanation:first-child {
margin-top: 0;
}

.panel-explanation {
margin: 1em;
}
Expand Down
3 changes: 0 additions & 3 deletions main/webapp/modules/core/scripts/project.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,6 @@ function resizeAll() {
ui.processPanel.resize();
ui.historyPanel.resize();
ui.dataTableView.resize();
if (SchemaAlignment) {
SchemaAlignment.resize();
}
}

function initializeUI(uiState) {
Expand Down