Skip to content

style(frontend): resolve logo height, gate project defaults, and update back buttons responsively#602

Open
dembrane-sam-bot wants to merge 3 commits into
mainfrom
sam/styling-and-auth-page-feedback-fixes
Open

style(frontend): resolve logo height, gate project defaults, and update back buttons responsively#602
dembrane-sam-bot wants to merge 3 commits into
mainfrom
sam/styling-and-auth-page-feedback-fixes

Conversation

@dembrane-sam-bot
Copy link
Copy Markdown
Contributor

@dembrane-sam-bot dembrane-sam-bot commented May 27, 2026

Page Feedback Adjustments

  • Logo & Header Height: Reduced logo height to 32px and set header (SidebarHeader) and AppBreadcrumbs height to 57px. Applied mathematical even padding (12.5px) on the top, bottom, and left of the logo, and centered breadcrumbs vertically.
  • Gated Project Defaults: Modified LegalBasisSettingsCard to query cached workspaces data and restrict editing to organisation administrators (owner / admin). Added a read-only Alert banner and disabled controls for non-admin users.
  • Responsive Back Button: Updated UserSettingsRoute to wrap the back button in a hidden md:flex w-[57px] margin container. Hover opacity effects (opacity-40 hover:opacity-100) and a reserved 32px size are applied to the ActionIcon.
  • My Access Page Feedback (Staging):
    • Removed "New organisation workspace" button from MyAccessCard.tsx as requested.
    • Removed "What you can reach" heading from MyAccessCard.tsx.
    • Added a descriptive subtitle below the "My access" title: "This is a map of every organisation and workspace you are a member of." in UserSettingsRoute.tsx.
    • Styled all role highlight pills/badges to have charcoal #2D2D2C text for consistent contrast.

Confidence: High. Fully aligned with the page feedback and responsive design guidelines.

Summary by CodeRabbit

Release Notes

  • New Features

    • Organization administrators now have exclusive access to edit legal basis settings; non-administrators see a read-only view.
  • Style

    • Refined layout spacing and height adjustments across navigation, sidebar, and header elements.
    • Updated badge styling in the access management interface.
    • Improved settings page header layout.

@github-actions
Copy link
Copy Markdown

Hi @dembrane-sam-bot!

Thank you for contributing to Dembrane ECHO! Before we consider your Pull Request, we ask that you sign our Contributor License Agreement (CLA). This is only required for your first Pull Request.

Please review the CLA, and sign it by adding your GitHub username to the contributors.yml file. Thanks!

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 27, 2026

Review Change Stack

Walkthrough

Legal-basis settings are now read-only for non-org-admins (fetches roles, derives isOrgAdmin, disables inputs and Save). Header/breadcrumb/sidebar/logo heights were standardized; settings header switched to a responsive flex layout; My Access card layout/imports adjusted and the “New organisation workspace” action removed. LGTM.

Changes

Organisation Admin Gating

Layer / File(s) Summary
Org role fetching and admin flag derivation
echo/frontend/src/components/settings/LegalBasisSettingsCard.tsx
useQuery hook loads workspace/organisation roles and isAdminRole import derives isOrgAdmin for permission checks.
Read-only UI and form disabling
echo/frontend/src/components/settings/LegalBasisSettingsCard.tsx
Non-admin users see a “Read-only” alert; Radio.Group and consent TextInput are disabled when !isOrgAdmin; Save requires hasChanges && isOrgAdmin.

UI Layout Height Standardization & Settings UI

Layer / File(s) Summary
Sidebar and breadcrumb height alignment
echo/frontend/src/features/sidebar/shell/SidebarHeader.tsx, echo/frontend/src/features/sidebar/breadcrumbs/AppBreadcrumbs.tsx, echo/frontend/src/components/common/Logo.tsx
SidebarHeader height changed to h-[57px] with padding tweak; AppBreadcrumbs nav set to h-[57px]; LogoDembrane Group height set to 32px.
Settings header responsive layout
echo/frontend/src/routes/settings/UserSettingsRoute.tsx
Header converted from centered Group to a flex row; back ActionIcon moved to a hidden md:flex container with opacity transitions; title preserved and descriptive Text added under “My access”.
My Access card and imports
echo/frontend/src/components/settings/MyAccessCard.tsx
Mantine/Tabler imports reorganized; header/Card nesting adjusted; “New organisation workspace” button removed; organisation and workspace role Badge text color set to #2D2C2C.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • Dembrane/echo#583: Also modifies MyAccessCard.tsx around workspace creation gating and related UI.
  • Dembrane/echo#473: Touches LegalBasisSettingsCard.tsx (GDPR/legal-basis text updates) and is related to settings UI changes.
  • Dembrane/echo#594: Also updates AppBreadcrumbs.tsx; this PR adjusts breadcrumb height styling while that one changes breadcrumb generation/visibility.

Speak like a true SF 100x engineer. LGTM.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the three main changes: logo height adjustments, legal basis gating for admins, and responsive back button styling.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch sam/styling-and-auth-page-feedback-fixes

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@echo/frontend/src/components/settings/LegalBasisSettingsCard.tsx`:
- Around line 113-120: The Alert in LegalBasisSettingsCard is using an off-brand
color prop (color="blue"); update the Alert within the LegalBasisSettingsCard
component (the JSX block that renders Alert when !isOrgAdmin) to use the brand
token by changing color="blue" to color="primary" or removing the color prop
entirely so it falls back to the theme default; ensure only the Alert element
inside the !isOrgAdmin conditional is modified.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 7ba8e78f-1fb3-4ccb-96d4-634e902f40a4

📥 Commits

Reviewing files that changed from the base of the PR and between b12baf5 and 1a61307.

📒 Files selected for processing (5)
  • echo/frontend/src/components/common/Logo.tsx
  • echo/frontend/src/components/settings/LegalBasisSettingsCard.tsx
  • echo/frontend/src/features/sidebar/breadcrumbs/AppBreadcrumbs.tsx
  • echo/frontend/src/features/sidebar/shell/SidebarHeader.tsx
  • echo/frontend/src/routes/settings/UserSettingsRoute.tsx

Comment on lines +113 to +120
{!isOrgAdmin && (
<Alert variant="light" color="blue" title={t`Read-only`}>
<Text size="sm">
<Trans>
These settings are read-only. Only organisation administrators can modify project defaults.
</Trans>
</Text>
</Alert>
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.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Use the brand color token on this alert.

color="blue" is off-brand in this repo. Swap it to color="primary" or omit the prop.

As per coding guidelines "Never pass color="blue" on Mantine components; use color="primary" instead or omit (primary is the theme default)".

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@echo/frontend/src/components/settings/LegalBasisSettingsCard.tsx` around
lines 113 - 120, The Alert in LegalBasisSettingsCard is using an off-brand color
prop (color="blue"); update the Alert within the LegalBasisSettingsCard
component (the JSX block that renders Alert when !isOrgAdmin) to use the brand
token by changing color="blue" to color="primary" or removing the color prop
entirely so it falls back to the theme default; ensure only the Alert element
inside the !isOrgAdmin conditional is modified.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
echo/frontend/src/routes/settings/UserSettingsRoute.tsx (1)

69-74: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Use Mantine layout primitives here and keep ActionIcon on brand.

Line 69/70 swaps to raw <div> wrappers, and Line 73 sets color="gray" on ActionIcon; both drift from the UI guidelines for this surface.

Proposed patch
-				<div className="flex items-center">
-					<div className="hidden md:flex w-[57px] shrink-0 items-center">
+				<Group align="center" gap={0} className="flex">
+					<Box className="hidden md:flex w-[57px] shrink-0 items-center">
 						<ActionIcon
 							variant="subtle"
-							color="gray"
+							color="primary"
 							onClick={() => navigate("..")}
 							aria-label={t`Go back`}
 							size={32}
 							className="opacity-40 hover:opacity-100 transition-opacity"
 						>
 							<IconArrowLeft size={18} />
 						</ActionIcon>
-					</div>
+					</Box>
 					<Title order={2}>
 						<Trans>Settings</Trans>
 					</Title>
-				</div>
+				</Group>

As per coding guidelines: “Compose with Mantine primitives (Stack, Group, ActionIcon)…” and “Allowed colors for Button / ActionIcon: primary… Never use blue,” with brand defaults centered on primary for this UI system.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@echo/frontend/src/routes/settings/UserSettingsRoute.tsx` around lines 69 -
74, The header layout uses raw divs and a gray ActionIcon which violates our UI
guidelines; update the wrapper divs in UserSettingsRoute to use Mantine
primitives (e.g., Group or Stack) instead of the raw <div> around the icon and
replace the ActionIcon color="gray" with the brand color (color="primary"),
preserving the existing layout behavior (hidden on small screens, fixed
width/shrink behavior) via Mantine props or sx styles and keep the onClick={()
=> navigate("..")} handler on the same ActionIcon.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@echo/frontend/src/components/settings/MyAccessCard.tsx`:
- Line 149: In MyAccessCard.tsx replace the two hardcoded badge color attributes
c="`#2D2D2C`" (occurring in the component MyAccessCard around the badge/Icon
usages) with a Mantine theme token or CSS variable instead of a hex literal; use
useMantineTheme() (or the project’s theme token helper) to pick the appropriate
token (for example theme.colors.gray[9] or the matching design token/CSS var)
and update both occurrences (the c prop at the two spots) so the Badge/Icon
color follows theming rather than a hardcoded value.

---

Outside diff comments:
In `@echo/frontend/src/routes/settings/UserSettingsRoute.tsx`:
- Around line 69-74: The header layout uses raw divs and a gray ActionIcon which
violates our UI guidelines; update the wrapper divs in UserSettingsRoute to use
Mantine primitives (e.g., Group or Stack) instead of the raw <div> around the
icon and replace the ActionIcon color="gray" with the brand color
(color="primary"), preserving the existing layout behavior (hidden on small
screens, fixed width/shrink behavior) via Mantine props or sx styles and keep
the onClick={() => navigate("..")} handler on the same ActionIcon.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: cb6074b1-8f3e-4c3c-ae74-655f2c95c512

📥 Commits

Reviewing files that changed from the base of the PR and between 1a61307 and 8a34ea7.

📒 Files selected for processing (2)
  • echo/frontend/src/components/settings/MyAccessCard.tsx
  • echo/frontend/src/routes/settings/UserSettingsRoute.tsx

size="xs"
variant="light"
color={roleColor(organisation.role)}
c="#2D2D2C"
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.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Replace hardcoded badge text hex with theme token.

Line 149 and Line 192 hardcode #2D2D2C; use a theme color token/CSS variable so this stays consistent with theming and branding.

Proposed patch
-													c="`#2D2D2C`"
+													c="var(--mantine-color-graphite-9)"
...
-														c="`#2D2D2C`"
+														c="var(--mantine-color-graphite-9)"

As per coding guidelines: “Use Mantine color tokens… instead of hardcoding hex colors in components” and “Don't hardcode hex colors in components.”

Also applies to: 192-192

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@echo/frontend/src/components/settings/MyAccessCard.tsx` at line 149, In
MyAccessCard.tsx replace the two hardcoded badge color attributes c="`#2D2D2C`"
(occurring in the component MyAccessCard around the badge/Icon usages) with a
Mantine theme token or CSS variable instead of a hex literal; use
useMantineTheme() (or the project’s theme token helper) to pick the appropriate
token (for example theme.colors.gray[9] or the matching design token/CSS var)
and update both occurrences (the c prop at the two spots) so the Badge/Icon
color follows theming rather than a hardcoded value.

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