From b4bf0be089d3704b54747eed6a6b1a7e64467891 Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Mon, 20 Oct 2025 16:33:55 +0200 Subject: [PATCH] Fix duplicate height properties in styled components (#15200) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Overview This PR fixes instances where `height` properties were incorrectly defined multiple times within the same styled component definitions across the codebase. ## Problem Several styled components had duplicate `height` CSS properties where the exact same property was declared twice in the same selector, causing confusion and reducing code maintainability. The second declaration would override the first, making the first one dead code. ## Changes Fixed 4 files across the codebase: ### Duplicate `height: 100%` Removed **StyledShowPageRightContainer** in twenty-front: - `PageLayoutRendererContent.tsx` - `ShowPageSubContainer.tsx` - `PageLayoutRecordPageRenderer.tsx` Each had `height: 100%` declared twice in the same component definition (strict duplicates). ### Duplicate `height` with Different Values Removed **StyledCommandKey** in twenty-ui: - `MenuItemHotKeys.tsx` - Had both `height: ${({ theme }) => theme.spacing(5)}` and `height: 18px` declared. Removed the first declaration as the second was overriding it. ## Testing - ✅ ESLint checks pass - ✅ TypeScript compilation successful - ✅ CodeQL security analysis - no issues - ✅ Comprehensive codebase scan confirms no remaining strict height duplicates ## Impact - **Visual Changes**: None - purely cleanup refactoring - **Performance**: No runtime impact - **Breaking Changes**: None - **Code Quality**: Improved CSS maintainability by removing dead code --- **Total:** 4 files modified, 5 lines removed Created from VS Code via the GitHub Pull Request extension.
Original prompt > Hi! It seems that a few styled components in the #codebase are defined with duplicate `height: 100%`, like in #file:PageLayoutRendererContent.tsx:27-36. > > Your job is to find all the places where we defined `height: 100%` incorrectly several times and to keep only one `height` property.
Created from VS Code via the [GitHub Pull Request](https://marketplace.visualstudio.com/items?itemName=GitHub.vscode-pull-request-github) extension. --- 💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more [Copilot coding agent tips](https://gh.io/copilot-coding-agent-tips) in the docs. --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Devessier <29370468+Devessier@users.noreply.github.com> Co-authored-by: Baptiste Devessier --- .../record-show/components/PageLayoutRecordPageRenderer.tsx | 1 - .../page-layout/components/PageLayoutRendererContent.tsx | 1 - .../ui/layout/show-page/components/ShowPageSubContainer.tsx | 1 - .../navigation/menu/menu-item/components/MenuItemHotKeys.tsx | 2 -- 4 files changed, 5 deletions(-) diff --git a/packages/twenty-front/src/modules/object-record/record-show/components/PageLayoutRecordPageRenderer.tsx b/packages/twenty-front/src/modules/object-record/record-show/components/PageLayoutRecordPageRenderer.tsx index 4c835d3fa6..bdf62929e3 100644 --- a/packages/twenty-front/src/modules/object-record/record-show/components/PageLayoutRecordPageRenderer.tsx +++ b/packages/twenty-front/src/modules/object-record/record-show/components/PageLayoutRecordPageRenderer.tsx @@ -25,7 +25,6 @@ const StyledShowPageRightContainer = styled.div` height: 100%; justify-content: start; width: 100%; - height: 100%; overflow: auto; `; diff --git a/packages/twenty-front/src/modules/page-layout/components/PageLayoutRendererContent.tsx b/packages/twenty-front/src/modules/page-layout/components/PageLayoutRendererContent.tsx index d081d833ad..0773d3931c 100644 --- a/packages/twenty-front/src/modules/page-layout/components/PageLayoutRendererContent.tsx +++ b/packages/twenty-front/src/modules/page-layout/components/PageLayoutRendererContent.tsx @@ -30,7 +30,6 @@ const StyledShowPageRightContainer = styled.div` height: 100%; justify-content: start; width: 100%; - height: 100%; overflow: auto; `; diff --git a/packages/twenty-front/src/modules/ui/layout/show-page/components/ShowPageSubContainer.tsx b/packages/twenty-front/src/modules/ui/layout/show-page/components/ShowPageSubContainer.tsx index 1f52b5e3ca..2f5b510891 100644 --- a/packages/twenty-front/src/modules/ui/layout/show-page/components/ShowPageSubContainer.tsx +++ b/packages/twenty-front/src/modules/ui/layout/show-page/components/ShowPageSubContainer.tsx @@ -27,7 +27,6 @@ const StyledShowPageRightContainer = styled.div` height: 100%; justify-content: start; width: 100%; - height: 100%; overflow: auto; `; diff --git a/packages/twenty-ui/src/navigation/menu/menu-item/components/MenuItemHotKeys.tsx b/packages/twenty-ui/src/navigation/menu/menu-item/components/MenuItemHotKeys.tsx index 7922315b18..a3ba70e539 100644 --- a/packages/twenty-ui/src/navigation/menu/menu-item/components/MenuItemHotKeys.tsx +++ b/packages/twenty-ui/src/navigation/menu/menu-item/components/MenuItemHotKeys.tsx @@ -23,8 +23,6 @@ const StyledCommandKey = styled.div` box-shadow: ${({ theme }) => theme.boxShadow.underline}; display: flex; flex-direction: column; - - height: ${({ theme }) => theme.spacing(5)}; height: 18px; justify-content: center; text-align: center;