From 95f4894fdddaaddd04bd11cbbedda56698d4cc0c Mon Sep 17 00:00:00 2001 From: Keith Cirkel Date: Tue, 3 Dec 2024 17:16:53 +0000 Subject: [PATCH] remove redundant code from action-bar-element --- app/components/primer/alpha/action_bar_element.ts | 8 -------- 1 file changed, 8 deletions(-) diff --git a/app/components/primer/alpha/action_bar_element.ts b/app/components/primer/alpha/action_bar_element.ts index d5d76f7ad0..e59e722c44 100644 --- a/app/components/primer/alpha/action_bar_element.ts +++ b/app/components/primer/alpha/action_bar_element.ts @@ -36,14 +36,6 @@ class ActionBarElement extends HTMLElement { #focusZoneAbortController: AbortController | null = null connectedCallback() { - // Calculate the width of all the items before hiding anything - for (const item of this.items) { - const width = item.getBoundingClientRect().width - const marginLeft = parseInt(window.getComputedStyle(item)?.marginLeft, 10) - const marginRight = parseInt(window.getComputedStyle(item)?.marginRight, 10) - item.setAttribute('data-offset-width', `${width + marginLeft + marginRight}`) - } - resizeObserver.observe(this) instersectionObserver.observe(this)