]> source.dussan.org Git - sonarqube.git/commitdiff
[NO-JIRA] Fix layout project nav height value & Remove magic numbers
author7PH <benjamin.raymond@sonarsource.com>
Wed, 24 May 2023 09:46:00 +0000 (11:46 +0200)
committersonartech <sonartech@sonarsource.com>
Wed, 24 May 2023 20:03:14 +0000 (20:03 +0000)
server/sonar-web/design-system/src/helpers/constants.ts
server/sonar-web/src/main/js/apps/security-hotspots/SecurityHotspotsAppRenderer.tsx
server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotHeader.tsx

index 4dd84f2c2cf5528fa849eaba0b215ff42fb37c6c..9b40d9577f92498522380e977304d2e6142aeba6 100644 (file)
@@ -60,7 +60,7 @@ export const LAYOUT_BANNER_HEIGHT = 44;
 export const LAYOUT_BRANDING_ICON_WIDTH = 198;
 export const LAYOUT_FILTERBAR_HEADER = 56;
 export const LAYOUT_GLOBAL_NAV_HEIGHT = 52;
-export const LAYOUT_PROJECT_NAV_HEIGHT = 110;
+export const LAYOUT_PROJECT_NAV_HEIGHT = 108;
 export const LAYOUT_LOGO_MARGIN_RIGHT = 45;
 export const LAYOUT_LOGO_MAX_HEIGHT = 40;
 export const LAYOUT_LOGO_MAX_WIDTH = 150;
index 7dbc385acad01d27676b117f56295ebbe028e2f0..2950a28090e6f55e0fc1d6793371264798f323af 100644 (file)
@@ -141,7 +141,7 @@ export default function SecurityHotspotsAppRenderer(props: SecurityHotspotsAppRe
                 className="sw-p-4 it__hotspot-list"
                 style={{
                   top: `${
-                    LAYOUT_GLOBAL_NAV_HEIGHT + LAYOUT_PROJECT_NAV_HEIGHT + STICKY_HEADER_HEIGHT - 2
+                    LAYOUT_GLOBAL_NAV_HEIGHT + LAYOUT_PROJECT_NAV_HEIGHT + STICKY_HEADER_HEIGHT
                   }px`,
                   height: `calc(
                   100vh - ${
@@ -249,7 +249,7 @@ const StyledSidebarHeader = withTheme(styled.div`
   border-bottom: ${themeBorder('default')};
   z-index: 1;
   height: ${STICKY_HEADER_HEIGHT}px;
-  top: ${LAYOUT_GLOBAL_NAV_HEIGHT + LAYOUT_PROJECT_NAV_HEIGHT - 2}px;
+  top: ${LAYOUT_GLOBAL_NAV_HEIGHT + LAYOUT_PROJECT_NAV_HEIGHT}px;
 `);
 
 const StyledMain = styled.main`
index 7b8094d136dfbdf99b254f4c7dd48031f2bbc0a1..b8d331c8263fd8d3a246ab96286bc6f23f1a1a4f 100644 (file)
@@ -140,5 +140,5 @@ export function HotspotHeader(props: HotspotHeaderProps) {
 const Header = withTheme(styled.div<StyledHeaderProps>`
   background-color: ${themeColor('pageBlock')};
   box-shadow: ${({ isScrolled }: StyledHeaderProps) => (isScrolled ? themeShadow('sm') : 'none')};
-  top: ${LAYOUT_GLOBAL_NAV_HEIGHT + LAYOUT_PROJECT_NAV_HEIGHT - 2}px;
+  top: ${LAYOUT_GLOBAL_NAV_HEIGHT + LAYOUT_PROJECT_NAV_HEIGHT}px;
 `);