Skip to content

connections: surface Edit schema as a text row on each card#1788

Open
karinakharchenko wants to merge 1 commit into
rocket-admin:mainfrom
karinakharchenko:connection-card-schema-edit-button
Open

connections: surface Edit schema as a text row on each card#1788
karinakharchenko wants to merge 1 commit into
rocket-admin:mainfrom
karinakharchenko:connection-card-schema-edit-button

Conversation

@karinakharchenko
Copy link
Copy Markdown
Contributor

@karinakharchenko karinakharchenko commented May 20, 2026

Summary

  • Move the per-connection "Edit schema" link out of the dark logo banner. It now sits as a full-width text row below the banner with a auto_awesome sparkle and the label "Edit schema".
  • A trailing arrow_forward icon fades in on hover (positioned absolutely so the label stays centered when the arrow appears/disappears).
  • The row's label uses a subtly blue-tinted slate via --mdc-text-button-label-text-color so it's calm at rest and lights up to the accent blue on hover — the sparkle is always blue.
  • The card-level hover highlight (primary border + shadow) is now scoped via :has(.connectionLogoPreview:hover), so only the dark banner triggers it. Hovering the schema row no longer pulses the whole card.

Test plan

  • In the connections list, every editable connection shows a third row "✨ Edit schema" under the dark banner
  • Hovering the dark banner highlights the whole card (border + shadow)
  • Hovering the "Edit schema" row tints just the row blue and slides in the arrow on the right; clicking it stops propagation and navigates to /edit-database-schema/<id> (does not also open the dashboard)
  • Connections without edit access do not show the row
  • Dark mode reads naturally: row text is a light blue-tinted slate at rest, accent blue on hover

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Style
    • Improved spacing and layout of connection cards for better visual organization and clarity.
    • Enhanced hover interactions that now trigger specifically when hovering over logo preview areas.
    • Redesigned the Edit schema button with improved visibility and interactive hover feedback.
    • Updated dark mode styling for connection cards and schema buttons.

Review Change Stack

Move the per-connection "Edit schema" affordance out of the dark logo
banner: it now sits as a third row below the banner as a full-width
text button labeled "Edit schema" with an `auto_awesome` sparkle in the
accented blue. A trailing `arrow_forward` icon fades in on hover. The
text uses a subtly blue-tinted slate via --mdc-text-button-label-text-color
so it doesn't compete with the banner at rest but lights up on hover.

The card itself no longer highlights on any hover — the primary border /
shadow are scoped via :has(.connectionLogoPreview:hover) so only the dark
banner triggers the card-level highlight, leaving the schema row to
react independently.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 20, 2026 09:45
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 20, 2026

📝 Walkthrough

Walkthrough

The Edit schema button in the connections list is redesigned from an icon-only Material button to a full-featured Material button with label and icons. The connection card container is refined with flex gap spacing and hover behavior triggered only when the logo preview is hovered, with matching dark-mode styling.

Changes

Schema button redesign

Layer / File(s) Summary
Connection card layout and hover behavior
frontend/src/app/components/connections-list/own-connections/own-connections.component.css
The .connection flex container gains gap: 10px for internal spacing. Hover styling trigger changes from .connection:hover to .connection:has(.connectionLogoPreview:hover) in both normal and dark modes, so the border and box-shadow emphasis appear only when the logo preview is hovered.
Edit schema button styling and template
frontend/src/app/components/connections-list/own-connections/own-connections.component.css, frontend/src/app/components/connections-list/own-connections/own-connections.component.html
New .connectionSchemaButton CSS styling sets button layout, text color via --mdc-text-button-label-text-color, icon sizing, and hover effects including arrow opacity and translate transitions with dark-mode label color overrides. The HTML template replaces the icon-only mat-icon-button with a full mat-button displaying "Edit schema" label, auto_awesome icon, and an animated arrow, conditionally shown when connectionItem.accessLevel === 'edit'.

🎯 2 (Simple) | ⏱️ ~8 minutes

Suggested reviewers

  • lyubov-voloshko

Poem

🐰 A button gets dressed in its Sunday best,
With labels and arrows, it stands out from the rest,
The hover now whispers where logos do glow,
Schema edits await—watch the arrow flow! ✨

🚥 Pre-merge checks | ✅ 6
✅ Passed checks (6 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: surfacing the 'Edit schema' action as a text row on connection cards, which aligns with the primary objective of redesigning this UI element.
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.
Security Check ✅ Passed Frontend shows "Edit schema" button conditionally when accessLevel==='edit'. Backend protects API with ConnectionEditGuard. No XSS, CSRF, or access control vulnerabilities found.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint skipped: no ESLint configuration detected in root package.json. To enable, add eslint to devDependencies.


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.

@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@coderabbitai coderabbitai Bot requested a review from lyubov-voloshko May 20, 2026 09:46
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Updates the “Edit schema” affordance in the connections list card to a full-width text button and refines hover styling/spacing for the connection card.

Changes:

  • Replaced the icon-only schema edit control with a text button containing leading/trailing icons.
  • Updated card layout spacing and changed hover styling to trigger only when hovering the logo preview area.
  • Added new button styling (including dark-mode tweaks and hover arrow animation).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
frontend/src/app/components/connections-list/own-connections/own-connections.component.html Reworks the “Edit schema” control markup into a larger button with icons and label.
frontend/src/app/components/connections-list/own-connections/own-connections.component.css Adjusts card spacing/hover behavior and adds styling for the new schema button presentation.
Comments suppressed due to low confidence (1)

frontend/src/app/components/connections-list/own-connections/own-connections.component.css:1

  • Using the relational selector :has(...) can be problematic in production: it has historically had browser support gaps and may be disabled/unsupported in some embedded/enterprise environments; it can also be more expensive for style recalculation on large lists. If you need the parent highlight only when hovering the logo area, consider an alternative that doesn’t rely on :has, such as applying the hover visuals to .connectionLogoPreview itself (or to an overlay element), or toggling a class on the parent via pointerenter/pointerleave in the component.
:host {

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +35 to 44
<a mat-button
class="connectionSchemaButton"
routerLink="/edit-database-schema/{{connectionItem.connection.id}}"
(click)="$event.stopPropagation()">
<mat-icon class="connectionSchemaButton__ai">auto_awesome</mat-icon>
<span>Edit schema</span>
<mat-icon iconPositionEnd class="connectionSchemaButton__arrow">arrow_forward</mat-icon>
</a>
}
</a>
Comment on lines 374 to +383
.connectionSchemaButton:hover {
color: #fff;
--mdc-text-button-label-text-color: var(--color-accentedPalette-500);
color: var(--color-accentedPalette-500) !important;
background-color: color-mix(in srgb, var(--color-accentedPalette-500), transparent 92%);
}

.connectionSchemaButton:hover .connectionSchemaButton__arrow {
opacity: 1;
transform: translate(0, -50%);
}
Copy link
Copy Markdown

@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)
frontend/src/app/components/connections-list/own-connections/own-connections.component.html (1)

15-15: ⚠️ Potential issue | 🟠 Major | 🏗️ Heavy lift

Remove nested anchor: current markup is invalid and risks broken navigation/focus.

Line 35 introduces an <a> inside the card <a> from Line 15. That’s invalid interactive nesting and can produce inconsistent browser behavior for click, keyboard, and routing.

Suggested structure (split dashboard link and schema action into siblings)
-            <li class="connectionItem">
-                <a routerLink="/dashboard/{{connectionItem.connection.id}}" class="connection"
-                    angulartics2On="click"
-                    angularticsAction="Connections: open own db is clicked"
-                    (click)="posthog.capture('Connections: open own db is clicked')">
+            <li class="connectionItem">
+                <div class="connection">
+                    <a routerLink="/dashboard/{{connectionItem.connection.id}}"
+                        class="connectionDashboardLink"
+                        angulartics2On="click"
+                        angularticsAction="Connections: open own db is clicked"
+                        (click)="posthog.capture('Connections: open own db is clicked')">
                     <div class="connectionLogoPreview">
                         ...
                     </div>
-                    `@if` (connectionItem.accessLevel === 'edit') {
-                        <a mat-button
-                            class="connectionSchemaButton"
-                            routerLink="/edit-database-schema/{{connectionItem.connection.id}}"
-                            (click)="$event.stopPropagation()">
-                            <mat-icon class="connectionSchemaButton__ai">auto_awesome</mat-icon>
-                            <span>Edit schema</span>
-                            <mat-icon iconPositionEnd class="connectionSchemaButton__arrow">arrow_forward</mat-icon>
-                        </a>
-                    }
-                </a>
+                    </a>
+                    `@if` (connectionItem.accessLevel === 'edit') {
+                        <a mat-button
+                            class="connectionSchemaButton"
+                            routerLink="/edit-database-schema/{{connectionItem.connection.id}}">
+                            <mat-icon class="connectionSchemaButton__ai">auto_awesome</mat-icon>
+                            <span>Edit schema</span>
+                            <mat-icon iconPositionEnd class="connectionSchemaButton__arrow">arrow_forward</mat-icon>
+                        </a>
+                    }
+                </div>
             </li>

Also applies to: 35-43

🤖 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
`@frontend/src/app/components/connections-list/own-connections/own-connections.component.html`
at line 15, The markup nests an <a> for the dashboard link around the whole card
and another <a> for the schema action (using connectionItem.connection.id),
which is invalid; remove the nested anchor by keeping the outer
routerLink="/dashboard/{{connectionItem.connection.id}}" on the card root and
convert the inner schema action anchor into a non-anchor interactive element
(e.g., a button or span with a click handler) or move the schema action out as a
sibling element so both the dashboard routerLink and the schema action are
separate, non-nested interactive controls (update any (click) handlers or
routerLink usage accordingly in own-connections.component.html).
🤖 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
`@frontend/src/app/components/connections-list/own-connections/own-connections.component.css`:
- Line 344: The stylelint rule 'declaration-empty-line-before' is being violated
for the declaration "color: var(--mdc-text-button-label-text-color)
!important;"; open the CSS blocks containing that exact declaration (both
occurrences) and adjust the blank line immediately before the declaration to
match the project's stylelint setting (add a single empty line if rule requires
one, or remove the empty line if rule forbids it) so that the
declaration-empty-line-before rule is satisfied.

---

Outside diff comments:
In
`@frontend/src/app/components/connections-list/own-connections/own-connections.component.html`:
- Line 15: The markup nests an <a> for the dashboard link around the whole card
and another <a> for the schema action (using connectionItem.connection.id),
which is invalid; remove the nested anchor by keeping the outer
routerLink="/dashboard/{{connectionItem.connection.id}}" on the card root and
convert the inner schema action anchor into a non-anchor interactive element
(e.g., a button or span with a click handler) or move the schema action out as a
sibling element so both the dashboard routerLink and the schema action are
separate, non-nested interactive controls (update any (click) handlers or
routerLink usage accordingly in own-connections.component.html).
🪄 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: CHILL

Plan: Pro

Run ID: 1ff9767c-6f48-4e59-b168-0916e7045482

📥 Commits

Reviewing files that changed from the base of the PR and between ab511ab and d5881dc.

📒 Files selected for processing (2)
  • frontend/src/app/components/connections-list/own-connections/own-connections.component.css
  • frontend/src/app/components/connections-list/own-connections/own-connections.component.html

align-self: stretch;
justify-content: center;
--mdc-text-button-label-text-color: color-mix(in srgb, var(--color-accentedPalette-500) 18%, #1f2937 82%);
color: var(--mdc-text-button-label-text-color) !important;
Copy link
Copy Markdown

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

Fix stylelint declaration-empty-line-before violations.

Line 344 and Line 376 currently violate the configured stylelint rule and should be adjusted to keep lint clean.

Proposed lint-only formatting fix
 .connectionSchemaButton {
 	position: relative;
 	align-self: stretch;
 	justify-content: center;
 	--mdc-text-button-label-text-color: color-mix(in srgb, var(--color-accentedPalette-500) 18%, `#1f2937` 82%);
+
 	color: var(--mdc-text-button-label-text-color) !important;
 	font-size: 13px;
@@
 .connectionSchemaButton:hover {
 	--mdc-text-button-label-text-color: var(--color-accentedPalette-500);
+
 	color: var(--color-accentedPalette-500) !important;
 	background-color: color-mix(in srgb, var(--color-accentedPalette-500), transparent 92%);
 }

Also applies to: 376-376

🧰 Tools
🪛 Stylelint (17.11.1)

[error] 344-344: Expected empty line before declaration (declaration-empty-line-before)

(declaration-empty-line-before)

🤖 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
`@frontend/src/app/components/connections-list/own-connections/own-connections.component.css`
at line 344, The stylelint rule 'declaration-empty-line-before' is being
violated for the declaration "color: var(--mdc-text-button-label-text-color)
!important;"; open the CSS blocks containing that exact declaration (both
occurrences) and adjust the blank line immediately before the declaration to
match the project's stylelint setting (add a single empty line if rule requires
one, or remove the empty line if rule forbids it) so that the
declaration-empty-line-before rule is satisfied.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants