Skip to content

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

Merged
lyubov-voloshko merged 4 commits into
rocket-admin:mainfrom
karinakharchenko:connection-card-schema-edit-button
May 29, 2026
Merged

connections: surface Edit schema as a text row on each card#1788
lyubov-voloshko merged 4 commits 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 visual hierarchy in connection cards; hover emphasis now responds to logo hover and matches dark mode
    • Redesigned "Edit schema" control into a labeled button with icons for better discoverability
    • Enhanced confirmation feedback (credentials copied, apply changes) by adding icons and clearer states
    • Standardized button/icon sizing and dark-mode color consistency
  • Chores
    • Updated project ignore list to exclude local package artifacts (.yarn/)

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

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 923471ab-479a-4c40-b925-61c7ac4b9dac

📥 Commits

Reviewing files that changed from the base of the PR and between b92b5af and df602e4.

📒 Files selected for processing (1)
  • .gitignore
✅ Files skipped from review due to trivial changes (1)
  • .gitignore

📝 Walkthrough

Walkthrough

Redesign the connection card Edit schema control into a labeled Material button with icons, add gap: 10px spacing and refine card hover to trigger only when the logo preview is hovered; wrap credentials-copied markup in ng-container in three dialog templates and add .yarn/ to .gitignore.

Changes

UI polish and button redesign

Layer / File(s) Summary
Connection card layout and hover behavior
frontend/src/app/components/connections-list/own-connections/own-connections.component.css
Adds gap: 10px to .connection and changes hover selector to .connection:has(.connectionLogoPreview:hover) for normal and dark modes.
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
Replaces icon-only mat-icon-button with a labeled mat-button (Edit schema) including auto_awesome and arrow_forward icons, and introduces a new .connectionSchemaButton CSS block for layout, icon sizing, hover arrow transition, and dark-mode color overrides.
Dialog credentials-copied UI refinements
frontend/src/app/components/connections-list/hosted-database-success-dialog/hosted-database-success-dialog.component.html, frontend/src/app/components/hosted-databases/hosted-database-reset-password-dialog/hosted-database-reset-password-dialog.component.html, frontend/src/app/components/edit-database-schema/edit-database-schema.component.html
Wraps the check icon and "Credentials copied" text (and the "Apply All" label) inside ng-container elements so they render as grouped nodes; adds a check icon to the "Apply All" label when not applying.
Git ignore update
.gitignore
Adds .yarn/ to .gitignore.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • gugu
  • lyubov-voloshko

Poem

🐇 A button blooms with label and light,
Icons align, the arrow takes flight,
Cards breathe with gaps, hovers refine,
Tiny wrappers make markup fine,
A yarn ignored — the rabbit's delight.

🚥 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 accurately describes the main change: surfacing the Edit schema button as a text row on connection cards, moving it from an icon-only element in the logo banner to a prominent full-width text row.
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 PR implements secure UI changes with proper access control (accessLevel === 'edit' gate), no XSS vulnerabilities, AuthGuard route protection, safe CSS patterns, and correct event handling.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
⚔️ Resolve merge conflicts
  • Resolve merge conflict in branch connection-card-schema-edit-button

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.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@coderabbitai coderabbitai Bot requested a review from gugu May 28, 2026 13:12
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 28, 2026

Actionable comments posted: 0

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 28, 2026

Actionable comments posted: 0

@lyubov-voloshko lyubov-voloshko enabled auto-merge May 28, 2026 16:10
@lyubov-voloshko lyubov-voloshko disabled auto-merge May 29, 2026 10:09
@lyubov-voloshko lyubov-voloshko merged commit 52edbf2 into rocket-admin:main May 29, 2026
10 of 13 checks passed
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.

4 participants