Skip to content

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

Open
dembrane-sam-bot wants to merge 2 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 2 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.

@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

Walkthrough

This PR introduces organisation admin permission gating for legal-basis settings and standardizes header/breadcrumb layout heights across the sidebar. Non-admin users now see read-only alerts and cannot edit legal-basis configuration; the settings header adopts responsive flex-based layout styling aligned with breadcrumb and sidebar height normalization.

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; isAdminRole helper derives isOrgAdmin boolean flag for downstream permission checks.
Read-only UI and form disabling
echo/frontend/src/components/settings/LegalBasisSettingsCard.tsx
Conditional read-only alert rendered for non-admins; legal-basis Radio.Group and consent-dependent privacy-policy TextInput disabled based on isOrgAdmin; save button requires both hasChanges and isOrgAdmin.

UI Layout Height Standardization

Layer / File(s) Summary
Sidebar and breadcrumb height alignment
echo/frontend/src/components/common/Logo.tsx, echo/frontend/src/features/sidebar/breadcrumbs/AppBreadcrumbs.tsx, echo/frontend/src/features/sidebar/shell/SidebarHeader.tsx
Logo height set to 32px; SidebarHeader height increased to h-[57px] with adjusted padding (pl-[12.5px] pr-3); AppBreadcrumbs nav height updated to h-[57px] for visual alignment.
Settings header responsive layout
echo/frontend/src/routes/settings/UserSettingsRoute.tsx
Header layout converted from centered Group wrapper to responsive flex container; back ActionIcon wrapped in hidden md:flex region with opacity transitions; navigation behavior and title text preserved.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • Dembrane/echo#594: Both PRs modify AppBreadcrumbs.tsx—this PR adjusts breadcrumb nav height styling while the other changes breadcrumb generation/visibility rules.
  • Dembrane/echo#597: Both PRs add isAdminRole-based permission gating to restrict non-admin user actions in settings and project components.

Suggested labels

improvement

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately captures the three main changes: logo/header height adjustments, permission gating for legal basis settings, 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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ 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.

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.

1 participant