Skip to content

Put the navbar tabs and the show page header on one 40px grid - #25236

Open
FelixMalfait wants to merge 1 commit into
mainfrom
claude/nav-tabs-borders-alignment-x9ok1m
Open

Put the navbar tabs and the show page header on one 40px grid#25236
FelixMalfait wants to merge 1 commit into
mainfrom
claude/nav-tabs-borders-alignment-x9ok1m

Conversation

@FelixMalfait

@FelixMalfait FelixMalfait commented Sep 2, 2026

Copy link
Copy Markdown
Member

The mode switcher gets the top and bottom rules from the Figma component and the 40px row height that goes with them. The page card header and the record identifier bar drop from 48px to 40px so the switcher's rules land on the card header's bottom border and on the tab strip's bottom border, in the main container and in the side panel alike.

The drawer's top padding drops to 4px and its header no longer takes the section gap, which is what puts the switcher row where the card header ends.

Review in cubic

The mode switcher gets the top and bottom rules from the Figma component and
the 40px row height that goes with them. The page card header and the record
identifier bar drop from 48px to 40px so the switcher's rules land on the card
header's bottom border and on the tab strip's bottom border, in the main
container and in the side panel alike.

The drawer's top padding drops to 4px and its header no longer takes the
section gap, which is what puts the switcher row where the card header ends.
@twenty-ci-bot-public

Copy link
Copy Markdown

🚀 Preview Environment Ready!

Your preview environment is available at: https://mrna-knew-supporting-sealed.trycloudflare.com

This environment will automatically shut down after 5 hours.

@twenty-ci-bot-public

Copy link
Copy Markdown

🤖 PR Review

Check Result
🔍 Build safety ⏭️ skipped — external-only
🛡️ Security ✅ passed
🧭 Triage ⏭️ skipped — external-only
📐 Quality ✅ passed — 2 nit(s)
🚦 Auto-approve ✅ passed — complexity low

🛡️ Security Review

No high-severity vulnerabilities detected.


🚦 Auto-approve

Eligible for auto-approval — low-complexity, no high-blast-radius paths.

  • 🧠 Complexity: low
  • 📏 Size: +25 / -6 lines across 4 file(s)

View details

Automated pre-review — human approval still required.

@twenty-ci-bot-public

Copy link
Copy Markdown

🟡 Quality review · 2 findings

Safe to merge — two non-blocking comment nits

High-level — One small, self-contained Linaria layout-alignment change; no data model, migration, flag, or public-surface concerns across product/architecture/build/deploy
Low-level — Clean except for two added multi-line comments that paraphrase the CSS/pixel math they annotate, violating the Comments rule

💬 2 inline comments on the diff.


Reviewed against the pr-review standard — high-level then low-level. Advisory; human review still required. Run details.

}
`;

// 4px above the 32px header plus a 4px gap puts the mode switcher row exactly

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Nit · Low-level · comments

Comment restates the pixel arithmetic of the padding/gap tokens below it

The prose hardcodes "4px", "32px" and "40px" that merely paraphrase the spacing tokens and will silently drift if any token changes. Delete it — the layout intent is not an external constraint the code cannot express.

import { WorkspaceActivationStatus } from 'twenty-shared/workspace';
import { PermissionFlagType } from '~/generated-metadata/graphql';

// The row is as tall as the page card header row it sits next to, so its rules

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Nit · Low-level · comments

Comment paraphrases the height/border rules it precedes

It describes what the border-top/border-bottom and height:spacing[10] already say rather than a constraint from outside the file. It fails the deletion test — remove it.

@CoreTeamTwenty CoreTeamTwenty left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auto-approved — cleared automated quality and security review and is low-complexity.

  • Quality: passed — 2 nit(s)
  • Security: passed
  • Auto-approve: passed — complexity low

Automated approval — a human still merges, and this is re-evaluated on every push.

@greptile-apps

greptile-apps Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR aligns navigation tabs, record headers, and desktop side-panel headers to a 40px grid.

  • Adds a bordered 40px mode-switcher row.
  • Reduces record identifier and desktop side-panel header heights from 48px to 40px.
  • Reworks drawer spacing and introduces a flex content wrapper.
  • Leaves the mobile list-height calculation coupled to the newly reduced desktop header constant.

Confidence Score: 4/5

The mobile side-panel list-height calculation should be corrected before merging because it now reserves 40px for a top bar that remains 52px tall.

The desktop height constant is reused in the mobile list calculation, so lowering it increases the mobile viewport overrun to 12px.

Files Needing Attention: packages/twenty-front/src/modules/side-panel/constants/SidePanelTopBarHeight.ts and packages/twenty-front/src/modules/side-panel/components/SidePanelList.tsx

Important Files Changed

Filename Overview
packages/twenty-front/src/modules/navigation/components/MainNavigationDrawerModeSwitcher.tsx Adds borders and a fixed 40px height; existing 28px controls fit within the row.
packages/twenty-front/src/modules/page-layout/constants/PageLayoutRecordIdentifierBarHeight.ts Reduces the identifier row to 40px, matching the existing tab-list height.
packages/twenty-front/src/modules/side-panel/constants/SidePanelTopBarHeight.ts Reduces the desktop top bar to 40px but also worsens the mobile SidePanelList viewport calculation.
packages/twenty-front/src/modules/ui/navigation/navigation-drawer/components/NavigationDrawer.tsx Separates header spacing from child spacing while preserving the bounded flex and scrolling structure.

Reviews (1): Last reviewed commit: "Put the navbar tabs and the show page he..." | Re-trigger Greptile

@@ -1 +1 @@
export const SIDE_PANEL_TOP_BAR_HEIGHT = 48;
export const SIDE_PANEL_TOP_BAR_HEIGHT = 40;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Mobile list reserves wrong height

When a mobile side-panel list reaches its maximum height, SidePanelList subtracts this 40px desktop constant even though the rendered mobile top bar remains 52px tall, causing the list to extend 12px beyond its available viewport and clip final content or introduce unintended outer scrolling.

Knowledge Base Used: Client application shell and navigation

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 4 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="packages/twenty-front/src/modules/side-panel/constants/SidePanelTopBarHeight.ts">

<violation number="1" location="packages/twenty-front/src/modules/side-panel/constants/SidePanelTopBarHeight.ts:1">
P2: Keep the mobile list height calculation aligned with the 52px mobile top bar instead of applying this 40px desktop constant; otherwise the list can overflow the viewport and clip its final content.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

@@ -1 +1 @@
export const SIDE_PANEL_TOP_BAR_HEIGHT = 48;
export const SIDE_PANEL_TOP_BAR_HEIGHT = 40;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: Keep the mobile list height calculation aligned with the 52px mobile top bar instead of applying this 40px desktop constant; otherwise the list can overflow the viewport and clip its final content.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/twenty-front/src/modules/side-panel/constants/SidePanelTopBarHeight.ts, line 1:

<comment>Keep the mobile list height calculation aligned with the 52px mobile top bar instead of applying this 40px desktop constant; otherwise the list can overflow the viewport and clip its final content.</comment>

<file context>
@@ -1 +1 @@
-export const SIDE_PANEL_TOP_BAR_HEIGHT = 48;
+export const SIDE_PANEL_TOP_BAR_HEIGHT = 40;
</file context>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants