From 4b882e7338f9844ec66a8fd4527b470d73ef7c7b Mon Sep 17 00:00:00 2001 From: Jakob Vogelsang Date: Wed, 10 Nov 2021 08:36:07 +0100 Subject: [PATCH 1/4] fix(editor-container): missing tabindex on root editor-container --- src/editor-container.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/editor-container.ts b/src/editor-container.ts index 40f96ea24c..c06ee686dd 100644 --- a/src/editor-container.ts +++ b/src/editor-container.ts @@ -77,6 +77,8 @@ export class EditorContainer extends LitElement { async firstUpdated(): Promise { await super.updateComplete; + this.tabIndex = 0; + if (this.addMenu) this.addMenu.anchor = this.headerContainer; const parentEditorContainer = @@ -91,8 +93,6 @@ export class EditorContainer extends LitElement { ); this.contrasted = !parentEditorContainer.contrasted; - - this.tabIndex = 0; } private renderAddButtons(): TemplateResult[] { From 5dd104a83e2dee3def4d77219c756a900ec684bc Mon Sep 17 00:00:00 2001 From: Jakob Vogelsang Date: Wed, 10 Nov 2021 16:29:47 +0100 Subject: [PATCH 2/4] test: adapt snapshots --- __snapshots__/bay-editor.md | 10 ++++++++-- __snapshots__/substation-editor.md | 4 ++-- __snapshots__/voltage-level-editor.md | 14 ++++++++++---- 3 files changed, 20 insertions(+), 8 deletions(-) diff --git a/__snapshots__/bay-editor.md b/__snapshots__/bay-editor.md index f6e5987036..fa16050c56 100644 --- a/__snapshots__/bay-editor.md +++ b/__snapshots__/bay-editor.md @@ -3,7 +3,10 @@ #### `looks like the latest snapshot` ```html - + + + + + + Date: Wed, 10 Nov 2021 16:31:34 +0100 Subject: [PATCH 3/4] refactor(substation-editor): remove unused section close tag --- src/zeroline/substation-editor.ts | 88 ++++++++++++++----------------- 1 file changed, 41 insertions(+), 47 deletions(-) diff --git a/src/zeroline/substation-editor.ts b/src/zeroline/substation-editor.ts index 3a970313b7..e31616bec0 100644 --- a/src/zeroline/substation-editor.ts +++ b/src/zeroline/substation-editor.ts @@ -70,53 +70,47 @@ export class SubstationEditor extends LitElement { } render(): TemplateResult { - return html` - - ${this.renderIedContainer()} - - this.openLNodeWizard()} - > - - - cloneSubstationElement(this)} - > - - - this.openEditWizard()} - > - - - - startMove(this, SubstationEditor, SubstationEditor)} - > - - - this.remove()} - > ${Array.from( - this.element.querySelectorAll(selectors.VoltageLevel) - ).map( - voltageLevel => - html`` - )} - - `; + return html` + + this.openLNodeWizard()} + > + + + cloneSubstationElement(this)} + > + + + this.openEditWizard()} + > + + + startMove(this, SubstationEditor, SubstationEditor)} + > + + + this.remove()} + > + ${this.renderIedContainer()} + ${Array.from(this.element.querySelectorAll(selectors.VoltageLevel)).map( + voltageLevel => + html`` + )}`; } static styles = css` From 696c3d8ae1d8d2ad591d1b3ccc102c976edcb9be Mon Sep 17 00:00:00 2001 From: Jakob Vogelsang Date: Wed, 10 Nov 2021 16:34:36 +0100 Subject: [PATCH 4/4] fix(editor-container): remove overflow set padding to prevent margin collapse --- src/editor-container.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/editor-container.ts b/src/editor-container.ts index c06ee686dd..5d3633c3a0 100644 --- a/src/editor-container.ts +++ b/src/editor-container.ts @@ -199,7 +199,7 @@ export class EditorContainer extends LitElement { transition: all 200ms linear; outline-style: solid; margin: 8px 12px 16px; - overflow: hidden; + padding: 0.05px; outline-width: 0px; outline-color: var(--mdc-theme-primary); opacity: 1; @@ -219,7 +219,6 @@ export class EditorContainer extends LitElement { .nomargin { margin: 0px; - overflow: visible; } :host {